The most exciting news from the Charm Tech team in pulse #4 is that @ironcore864 (Tiexen) joined us! Other than that, some small improvements to ops, progressing the defer work and the work to promote Scenario as a first-class Charm testing framework, and fixing the Pebble deadlock as well as other minor issues.
The ops library
-
We’ve made a change so that additional events cannot be
defer()
ed -StopEvent
,RemoveEvent
, and all theLifeCycle
events. We’ve run the unit tests of over 135 charms with this change without any new failures, so we’re hopeful that no-one was doing this anyway. We attempted to entirely remove thedefer()
method from events that can’t be deferred, but weren’t able to do that and maintain backwards compatibility in other areas. -
ActionEvent
objects now have an.id
attribute, which is pulled from the JujuJUJU_ACTION_UUID
environment varible. This is probably most useful when converting old charms, but can also be used to create unique identifiers for action invocations. -
We moved to using Ruff for linting last Pulse, and extended that this time by enabling several additional linters, as well as making a few small improvements that they picked up.
-
The
Container.can_connect()
method is often used where we feel it’s unnecessary or problematic, and this is at least partly due to how it has been presented in the docs, so we’ve adjusted the API docs, the tutorial, and other documentation to encourage its use as a point-in-time check only, and written about handling temporary errors more generally. -
We’re also working on making ops and Harness more consistently provide the
.app
in relation-broken events, since an investigation concluded that this is what modern Juju does.
Charming
-
Tony continued work on his “super tox” tool, to run the unit tests of ~150 of Canonical’s charms against different branches of Ops. As part of this, he worked through each of the tests that failed when the latest version of ops was used, and opened issues or PRs to resolve those.
-
We continued work looking over the ops-scenario API with a view to polishing it before making it more official.
Pebble
-
Ben continued working through the Pebble deadlock issue that the MAAS team had discovered last Pulse, and was able to find a way to reproduce and then fix this. He’s also spent some time looking into locking in Pebble in general to see what can be improved at a higher level. He also put out three new releases, 1.4.1, 1.7.1, and 1.8.0, so the fix will appear in the next versions of Juju 3.3, 3.4, and 3.5. v1.8.0 also contains some small improvements ported over from snapd.
-
Ben has also continued working on designing and reviewing other upcoming Pebble changes, including PEBBLE_COPY_ONCE, part of the rootless work, and the change-update work that will be cross-ported from snapd. He also spent time with the Juju and Data teams looking into an issue they’re seeing with demanding workloads causing unwanted K8s pod recycling.
-
Tony also contibuted his first PR to pebble, to fix a bug with add-layer validation.