Scenario 4.0 release notes

Hi all! Scenario 4.0 just released with a number of interesting updates!

How to get :yum:

pip install ops-scenario==4.0

Added :heavy_plus_sign:

Changed :warning:

  • State cleanup: some things that did not quite belong in State are now lifted to Context:
    • State.juju_log --> Context.juju_log
    • State.[unit|app]_status_history --> Context.[unit|app]_status_history
    • State.workload_version_history --> Context.workload_version_history
  • Status removed. For the sake of flattening some excessively nested data structures:
    • State.status.app --> State.app_status
    • State.status.unit --> State.unit_status
    • State.status.workload_version --> State.workload_version
  • The emitted events pytest plugin (experimental) is removed and instead one can rely on the Context to natively and always expose that information. To get a list of all events emitted on the charm during this execution you can get Context.emitted_events.
  • Definitely removed support for trigger() api.

Bugfixes :bug:

  • Fixed an issue that would break from scenario import *.
  • Fixed an issue with secret events.

Migrating from scenario 3

Is pretty easy. See how I did that in traefik

3 Likes