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.hookcmdsand 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
pebbleclient methods to acceptpathlib.Pathobjects 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.ownerto'app'forops[testing]output state (#2127).
Charming
- The new process for requesting public listing on Charmhub is now live! Using the old system on Discourse is still fine for now, but in a couple of weeks we’ll fully deprecate that.
Charmlibs
- Refreshed the charmlibs documentation site homepage.
- Updated how to distribute charm libraries to reflect the
charmlibsnamespace 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-certificatesinterface definition to thecharmlibsmonorepo (#174). In future, all interface definitions and tests will be hosted in thecharmlibsrepo alongside their libraries, andcharm-relation-interfaceswill 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
zizmorcode scanning to the monorepo (#236).
Pebble
- Reviewed and merged PRs to implement a pairing manager and an mTLS pairing endpoint, as well as corresponding client functions.
- Avoid running “start” tasks again to avoid spurious restarts.
Documentation
- Added a Charm maturity page (which will replace the Juju page of the same name), a unified, and automatically updated, list of charming best practices, and a how-to guide explaining the updated process for requesting public listing on Charmhub (#1989).
- Added a guide to help with migrating unit tests from Harness to state-transition tests (#2062).
- Made the navigation pages in the Ops docs more friendly, with short page summaries (#2140).
- Preparing a new tutorial for how to write and test a machine charm (#2119).