Repository navigation
Immutable
release. Only release title and notes can be modified.
This release makes ModelError easier to diagnose, tightens how relation data permissions are enforced, and fixes a set of typing and ops.testing issues. There is also a new how-to guide on securing a charm.
New and improved
ModelErrornow tells you which hook command failed, and during which event (#2786). When a call to Juju fails, a traceback notes line now shows what was running, so you no longer have to work it out the long full traceback chain.
Traceback (most recent call last):
...
ops.model.SecretNotFoundError: db-password
Hook command 'secret-get' (label='db-password', refresh=False, peek=False) failed during the 'config-changed' hook.Fixes worth knowing about
- A relation that no longer exists raises
RelationNotFoundError(#2748). Before this fix, it raised aModelErrorwith "permission denied" text. - Tracing errors say which destination rejected the data (#2714). This helps when you send traces to more than one destination.
- Set
onin charms and libraries without# type: ignore(#2775). Remove anytype: ignorecomments you added to get past the type checker.
In ops.testing
- If your charm's
__init__ends with_Abort(0)(such as aload_config()status set), the test treats it as a success (#2780). Before this fix,_Abort(0)counted as a success only when it came from an event handler.
What's Changed
Features
- Add an exception note when
ModelErroris raised (#2786)
Fixes
- Make
_CharmSpeccovariant in its charm type (#2715) - Say which tracing destination rejected the data (#2714)
- Detect Pydantic dataclasses from before 2.11 when mapping aliases (#2768)
- Enforce relation databag read permissions on all access paths (#2738)
- Use cached leadership in security logging, renew lease on success by @cristiangirlea (#2778)
- A gone relation raises
RelationNotFoundError, not "permission denied" (#2748) - Treat an
_Abort(0)from the charm's__init__as success in ops.testing (#2780) - Record trace data in every ops.testing run with opentelemetry-sdk 1.45 (#2787)
- Let charms and libraries set
onwithout a type: ignore (#2775)
Documentation
- Surface the tool versions page (#2712)
- Update Concierge links and intersphinx URLs in doc source (#2725)
- Add retry loop to version check in K8s tutorial charm (#2689)
- Merge HACKING.md into CONTRIBUTING.md, fewer files in root (#2734)
- Add a how-to guide for securing a charm (#2721)
- Condense and trim CONTRIBUTING.md (#2754)
- Fix the self-review command in the discoverability how-to (#2764)
- Mount the project directory to a target relative to the home directory (#2765)
- Pull tutorial code snippets from examples/ (#2544)
Tests
- Add conformance tests for the tracing and certificate_transfer interfaces (#2711)
- Make pyright check whole trees rather than a list of directories (#2779)
Refactoring
- Drop typing.cast where narrowing can do the work (#2723)
- Only import pdb when a debugger is actually requested (#2740)
CI
- Enrich scheduled-failure issues with an LLM triage pass (#2663, #2781)
- Stop tox writing a .venv redirect file in the examples (#2769)
- Move the release process from release.py to workflows (#2772)
Full Changelog: 3.8.2...3.9.0
Thanks @cristiangirlea for your contribution to this release!