Charm Tech pulse 2025#05

We’re happy to share new versions of ops (2.19.4) and ops-scenario (7.19.4) this pulse, with a new release practice of keeping ops & ops-scenario versions tied together. As well as releasing the new versions, we continued working on exciting new capabilities for charms - including tracing support, integration testing with Jubilant, and a pathlib-like API for file operations. We also continued improving Pebble, including a new way to inspect and run health checks, which will be available in the next version. Last but not least, work is ongoing to improve the Ops documentation about best practices and testing. Stay tuned!

Request for help! If you haven’t already done so, please could you take 20 minutes to fill out our 25.04 Charming Survey? The survey will be open until end of day Friday, March 21 (midnight US Pacific) and will really help us understand how you’re finding Ops, Pebble, and charm development in general. Thank you!

Ops

  • Released ops 2.19.4 and ops-scenario 7.19.4. This introduces a new practice of tying together the version of ops-scenario specified by ops[testing] and the version of ops that ops-scenario depends on, so that it’s always exactly the same pair of versions. Those versions will also have the same minor and micro version numbers, and we’ll always release both packages.
  • Added charm-user to CharmMeta (#1598) and updated the Charmcraft documentation to make it clear that this field can be used in charmcraft.yaml (#2195).
  • Changed the errors raised in unit tests to match those raised when using real Pebble (#1599).
  • Fixed a bug introduced in Scenario 7.0 where the input state could be mutated during the event run, and increased the immutability of lists and dictionaries in testing.State components (such as the content in testing.Secret) (#1617).
  • Added a convenience method remove_revision() to SecretRemoveEvent and SecretExpiredEvent, so that charmers can ignore revision numbers (#1624).
  • Fixed a variety of issues merging Pebble layers in unit tests, particularly when using multiple layers with different names, and added checks and log targets to testing.Container.plan (#1627).
  • Added a consistency check when unit testing to ensure that the testing.CheckInfo objects in a testing.Container match the layers in that container (#1630).
  • Drafted support for using a fresh charm instance for deferred events (#1631).
  • Continued work on a spec and proof-of-concept for validating config and relation data.

Charming

  • The shape of ops[tracing] deliverable and the API have been decided. Charms should depend on ops[tracing] which pulls in the new ops-tracing extension package, which in turn vendors otlp-json and the required charm libs.
  • Created a spec to unify the way that charm projects provide format, lint, and testing commands.
  • Continued work on Jubilant, the joyful integration testing library. We released a very early pre-release this week, jubilant==1.0.0b1. More coming soon!
  • Implementation is almost complete for our new Python package for machine/K8s agnostic file operations, following a pathlib-like API. Initial release coming soon!

Pebble

  • Implemented a new environment variable PEBBLE_VERBOSE (similar to the --verbose flag) to write service logs to stdout (#576).
  • Implemented a new subcommand pebble check <chk> (#574) to get the details of a single health check. If the optional flag --refresh is provided (pebble check <chk> --refresh), run the check immediately and return the result (#577). Docs.
  • Prepared a spec for a purely in-memory state option, using environment variable PEBBLE_PERSIST=never.
  • Started a spec to enable Pebble to tail a file or folder of logs.
  • Updated the project to use Go 1.24 now that 1.22 is end-of-life (#585).
  • Fixed panic with malformed health checks URLs (#580). Also added staticcheck, which found this issue. Thanks Allan Vidal!

Documentation

  • Opened PRs that migrate charm development best practices from the Juju documentation to Ops (#1615) and Charmcraft (#2203). These are now located next to the documentation on each specific feature, and we’ll be adding a process to collect all of the best practices together to use as a checklist for charm review.
  • Opened a PR to remove the shared field from charmcraft.yaml documentation (#2205). This field was never implemented in Juju.
  • Started working on unifying docs on charm tests.
  • Published a (very!) initial documentation website for Jubilant.
2 Likes