Version 1.0.0 of ops released!

ops, the Operator Framework, provides a simple, lightweight, and powerful way of
writing Juju charms, the best way to encapsulate operational experience in code.

The framework will help you to:

  • model the integration of your services
  • manage the lifecycle of your application
  • create reusable and scalable components
  • keep your code simple and readable

You can read more about the project, including how to get involved, on github.

Release highlights:

  • We added quite a few docstrings, and a test that will fail if something
    is missing docstrings.

  • We’re more tolerant of missing fields in the output of network-get,
    which can happen in some situations.
    Thanks to @cory_fu for this one.

  • Charm authors can run self.config from a charm method instead of having
    to do self.model.config.
    Thanks to @cory_fu for this one.

  • Some ways of installing ops can result in not loading the libyaml
    extensions from PyYAML, giving a performance penalty. ops will warn
    when this happens so it can be remedied, but it would also warn when
    running the test suite which raises the barrier for developers wanting to
    contribute to ops itself. So now we ignore that.
    Thanks to @cory_fu for this one.

  • The hooks_disabled context manager can now be nested.
    Thanks to @stub for this one.

  • When using Juju for storage (either automatically by running on
    kubernetes with a new enough Juju, or manually via passing
    use_juju_for_storage=True to main), events defered would never be
    re-emitted. This is #438, found with help from @davigar15.

  • ObjectEvents now have a __repr__ which lists all events it knows about,
    which can be helpful when debugging (or even developing) a complex charm.

  • sys.breakpointhook is only set from main, not from
    Framework.__init__, meaning it won’t interfere with using the
    breakpoint() builtin from tests.

  • tests will now fail if a docstring is missing (or malformed).


Nicely done folks! Have had excellent feedback from the early users of the framework and am excited to try it out myself.

1 Like

Nice, is there an entrypoint to documentation on how to work with it up yet?