Ops (the operator framework itself)
We released 0.6.0 of the operator framework! You can grab it via
pip install ops. This is the first “official” release, and includes a few breaking changes from what was in master until very recently. From now on, breaking changes will be announced, and we’ll have a deprecation procedure to ease things in (or rather, out). These breaking changes are:
observemethod’s second argument can no longer be an instance, and must be a method on an instance. That is, where previously you could write
as a shortcut, but we found that this pushes people down a path that actually makes their charms less maintainable. Especially when it comes to writing components, it is better to have clearly named functions and clearly defined targets.
So from now on the only supported way is to explicitly specify the callback method,
(note we also recommend event handlers to be clearly marked as non-public).
roleattribute is now an
enum, and in particular peer relation’s role is now
"peer"(it used to be
"peers"which was just wrong).
This release includes full support for Juju 2.8’s
dispatchmechanism, including both use cases of dispatch being a symlink to the charm code, and dispatch being a small shim that executes the charm. The latter is an incremental improvement over what we mentioned in the last dev summary, and is already being used by
Model objects now have a
nameproperty (populated from
JUJU_MODEL_NAME). This was a feature requested by charmers.
Support for Juju 2.8’s
relation-createdevent. This should’ve been included in the last summary but slipped through the cracks…
charmcraft 0.1.0! You can grab it via
pip install charmcraft
(soon also available as a snap). This is very much an initial release, and there
are a lot of things still to do and things we know we want to do differently,
but it works!
charmcraft build will create a fully functional charm from a
barebones structure, such that you don’t need to care about the
hooks symlinks! Huzzah. We even wrote a nice tutorial (still in progress,
once reasonably “done” we’ll also put it on discourse) on how you can use it.
We’re settling in to a bi-weekly cadence for meetings. If you are working on operator framework charms, and haven’t chatted with us yet, please reach out! No changes in the list of charmers we’ve been talking with since the last dev summary, but some changes will happen in the next few weeks as rotations kick in.