Charm Tech pulse 2025#21

The latest version of ops is a beta release with a new low-level API matching the Juju hook commands, refactoring ops to use the new API internally. Please help us by running your charms’ integration tests with ops==3.4.0b1!

If you’re a Canonical employee that will be in Sweden in the next two weeks, DM @tony-meyer myer your results, and he’ll reward you with a small, sweet, New Zealand treat! If you’re not there but do run the tests, message him to see what he can do. Read the release post for more.

This pulse also features a new process for requesting public listing on Charmhub, a guide on how to migrate charm unit tests from Harness to state-transition tests, and new guides on the charmlibs documentation site.

Ops

  • Added ops.hookcmds, a low-level API for the Juju hook commands, aimed at making it simpler for people to build experimental APIs or frameworks for charming (#2109, #2116).
  • Fixed issues with cleaning up when exceptions are raised during with testing.Context() (#2117, #2121).
  • Fixed loading the Juju machine ID when it is not an integer (#2108).
  • Released 3.4.0b1, featuring ops.hookcmds and a collection of other improvements; and 3.3.1 with the Juju machine ID fix.
  • Extended our testing against the Charmcraft profiles to handle Charmcraft 4 (#2103).
  • Updated our compatibility testing to support the charm monorepos we know about (#2100).
  • Updated the pebble client methods to accept pathlib.Path objects as well as strings (#2097).
  • Added a set of tests to validate equivalence in secrets behaviour between ops[testing] and Juju (#2078, #2130).
  • Continued work to refactor secrets backend code (#2143).
  • Made secret description visible to the charm in state transition tests (#2115).
  • Normalised Secret.owner to 'app' for ops[testing] output state (#2127).

Charming

Charmlibs

  • Refreshed the charmlibs documentation site homepage.
  • Updated how to distribute charm libraries to reflect the charmlibs namespace approach.
  • Added a new how to guide for library authors, covering how to migrate a library to the monorepo.
  • Added a new how to guide for charmers, covering how to manage charm libraries.
  • Added the tls-certificates interface definition to the charmlibs monorepo (#174). In future, all interface definitions and tests will be hosted in the charmlibs repo alongside their libraries, and charm-relation-interfaces will be archived.
  • Added a workflow for charmers to use to run interface tests. It’s not very useful yet, because it only runs the tests for the interfaces that have been migrated to charmlibs, and only for charms that explicitly claim to implement them. As we migrate more interfaces to the monorepo, and expand the charms that we test, we’ll start recommending that charmers use it in their CI.
  • Added CI to automatically tag the commit that a library was published from (#210).
  • Added CI to ensure changelogs are updated before publishing libraries (#217), and added changelog entries for all past library releases from the monorepo.
  • Added CI to enforce conventional commit format PR titles (#234).
  • Added zizmor code scanning to the monorepo (#236).

Pebble

Documentation

2 Likes