What's Changed
The Ops documentation has been dramatically revamped, with tutorials and how-to guides moved from Juju documentation to Ops where they belong, among with a myriad of other improvements.
The deferred event queue is now deduplicated, which should make charms feel more responsive.
Unit testing has been made faster by using an in-memory state database and a few other tricks.
Features
- Use :memory: as the unit state storage location for ops.testing in #1494
- Don't store duplicate events in the notice queue in #1372
- Make Context and Manager variadic types in testing by @Batalex in #1445
Fixes
- Remove ops.main.main deprecation warning, and avoid warnings in action output in #1496
- Require the same object to be in the testing state as in the event in #1468
- Raise ModelError on unknown/error status set in Scenario in #1417
Documentation
- Use the right ops-scenario for building the docs in #1470
- Go full Diátaxis, ingesting the relevant juju.is/docs/sdk documentation by @tmihoc in #1481
- Update how-to guides to use the new unit testing framework in #1507
- Clearly deprecate Harness in the testing how-tos in #1508
- Update boilerplate links in #1515
- Fix Markdown syntax in ops.testing readme in #1502
- Fix broken links and use cross references instead of absolute links in #1519
- Use explicit framework param instead of *args in #1523
- Add doc style tips to HACKING.md in #1528
- Fix link to Juju docs in Kubernetes charm tutorial in #1529
- Remove the publish badge from the README in #1505
- Add how-to for storing state in #1534
- Improve info about contributing to docs in #1533
- Fix formatting errors in HACKING.md in #1539
Continuous Integration
- All the ops-scenario publish actions need to be done in testing/ in #1479
- Add support for injecting the latest ops when uv is used in #1477
- Don't cancel other unit tests when one fails in #1471
- Correctly point PyPI publishing to the ops-scenario packages in #1514
- Use Concierge to set up the smoke test environments in #1541
- Bump poetry to 2.0 to match downstream in #1542
- Enable the prometheus-k8s revision updates again in #1544
- Include Juju 2.9 in the smoke tests in #1545
Testing
- Handle warnings generated by our own tests in #1469
- Allow check to fail an additional time when running the test in #1531
- Add a small set of ops.testing benchmark tests in #1504
Refactoring
- Use ops._main._Manager in Scenario in #1491
- Don't use the max-positional-args parent class for JujuLogLine in #1495
- Cache signature structure in ops.testing state classes in #1499
- Use _JujuContext in Scenario in #1459
- Fix the testing src-layout structure and use relative imports in #1431
Chores
- Bump version number for next ops release in #1476
- Update and clarify release process in #1478
- Temporarily disable TIOBE reporting in #1510
- Remove file that seems to be accidentally committed in #1509
- Update charm pins in #1517
- Bump CI dependencies in #1535
- Update documentation dependencies in #1526
- Fix compatibility with ops-scenario 7.0.5 in #1543
- Enable the scheduled TIOBE reporting again in #1537
- Update charm pins in #1540
- Bump actions/attest-build-provenance from 1.4.3 to 2.1.0 in #1518
- Minor linting improvements to testing/src/scenario #1456
- Remove compatibility code with older ops in testing in #1418
- Use annotations from the
__future__
in testing in #1433
New Contributor
- Thank you, @Batalex for your first contribution!
- Thank you, Prints Charming (bot) for your contributions, and welcome to the team!
Full Changelog: 2.17.1...2.18.0