This is a fixes-and-polish release, with most of the work in the state transition testing framework and the documentation.
In state transition testing, entity names are now validated the way Juju itself validates them, and simulated dispatch matches how real Juju invokes hooks, so a test can no longer pass against a charm that Juju would refuse to deploy. Note that tests using names that Juju would reject will now fail. Secret grant and revoke no longer try to mutate immutable state.
In ops itself, Relation.load() now only decodes the fields that your data class declares, so loading a unit databag into a dataclass or Pydantic model no longer trips over the values that Juju sets automatically, such as egress-subnets and private-address. The access field of IdentityDict accepts the IdentityAccess enum as well as the string literals.
On the documentation side, there is a new how-to guide for debugging Kubernetes charms, a new how-to for configuring Jubilant logs, expanded guidance on naming charms, and a series of improvements to the Kubernetes tutorial, including setting and testing the workload version and moving the demo server to a rock.
What's Changed
Fixes
- Align Juju naming rules with testing class rules in #2570
- Drop unsupported cooldown.semver-major-days from github-actions block in #2617
- Do not attempt to mutate secret data in grant/revoke during tests in #2614
- Allow
IdentityDictto be assignedIdentityAccessin #2628 - Only decode fields used by the data class in Relation.load() in #2636
- Use juju.wait for workload version tests in k8s tutorial in #2650
Documentation
- Wait longer for Loki data in K8s tutorial integration tests in #2611
- Add more guidance about charm naming in #2610
- Fix tempo test_deploy url in #2631
- Add how-to guide for debugging Kubernetes charms in #2498
- Revert to installed charmcraft for initing charms in #2635
- Grab workload version in k8s tutorial in #2559
- Separate test_workload_version_is_set in k8s tutorial chapter 3 in #2638
- Add howto configure jubilant logs in #2619
- Use autofunction for
layer_from_rockcraftin #2648 - Remove log_cli and log_file ini options; keep them as cli arguments for integration tests in #2654
- Fix typo in explanation of mock_version fixture usage in #2647
- Switch K8s tutorial charms to rock version of demo server in #2649
Tests
- Type-check testing/src/scenario and fix uncovered errors in #2615
CI
- Add dependency-review-action on PRs in #2587
- Re-enable the tracing integration tests in #2586
- Adopt new dependabot conventions in #2609
- Open an issue if a scheduled workflow fails in #2627
- Hash-pin actions and drop zizmor config in #2612
- Use uv-venv-lock-runner in tracing tox, align deps in #2651
Full Changelog: 3.8.0...3.8.1