Scenario 6.0 release

Scenario 6.0 has just released with a couple of model changes and a few API changes you should know about.

  • deprecated Secret.granted. As of now, the presence of a secret you don’t own in your State entails that the secret is granted to you. If you can’t read it, you have no reason to know it exists; therefore it should be omitted from the state. This simplifies the API and logic considerably, tightening the close-world assumption the State encapsulates.

  • Charm owners don’t automatically get the newest revisions when they secret-get. This in line with the juju 3.1 (backported) and juju >= 3.4 behaviour (see recent bugfix in Juju)

  • added support for obscure feature nobody will likely use extra_bindings in metadata.yaml. For completeness.

  • State.networks changes signature and semantics. It used to be an exhaustive list of network bindings available to the charm, but in practice Juju provisions a network for each relation a charm has; so the presence of a Relation in your State entails that you’ll have a corresponding network for that binding name. Regardless of the binding name, network-get will always return the same, defaulted network.

    State.networks becomes an override mapping, from binding name to state.Network objects. The default network which you automatically get for each relation endpoint and extra-binding is not good enough, you can override it with a custom-defined one. For the most part, you will probably be fine using the default network, since in theory the charm should not have opinions about what IP it gets.

    Read the full PR description for more details.

Other improvements

  • static type checks on the whole codebase
  • more extensive tests for the secrets access model
  • better test coverage
1 Like