Charm Tech pulse 2024#20

What has Charm Tech been busy with in pulse #20? We released Ops 2.17.0, worked on moving the state transition testing library (“Scenario”) into the Ops repo, built a working proof-of-concept to remove AllWatcher from python-libjuju, worked to bring python-libjuju code generation up to date, and added integration tests for pebble run.

The ops library

  • Released ops 2.17.0, which includes first-class support for state transition testing (“Scenario”) via pip install ops[testing], fixes for secret handling, and more. Read the release notes for details. And if you’re not familiar with Scenario / state transition testing, see the new docs page – we recommend this over Harness for new charm tests.
  • Produced an almost-complete PR that pulls the ops-scenario code into the Ops repo, to make code changes simpler and more consistent.
  • Reworked ops.main() type annotations to avoid requiring type: ignore on that call.

Charming

  • Work-in-progress PR for python-libjuju to do live Juju RPC calls using separate events in a helper thread. This is part of the Great AllWatcher-ectomy of '24.
  • Investigated flakey python-libjuju integration tests.
  • Spent time cleaning up the python-libjuju schemas and code generation and bringing them up to date (work in progress).
  • Added a charmcraft analyse checker to ensure the ops.main() call is present, and a tweak to use the new ops.main type hints in charmcraft init templates.
  • Adjusted the charmcraft init templates to use state transition (Scenario) tests.
  • Spent some time brainstorming what we think the future of integration tests should look like.

Pebble

1 Like