Skip to content

ops 2.20.0 and ops-scenario 7.20.0 remove_revision, remote_model, config metadata, custom events in testing, pebble layer merging fixes in testing, and docs improvements

Compare
Choose a tag to compare
@james-garner-canonical james-garner-canonical released this 31 Mar 20:40
· 226 commits to main since this release
1500719

What's Changed

This release of ops features a new remove_revision() convenience method to avoid working directly with revision numbers in secret-remove and secret-expired events. A new remote_model property has been added for Relation. The efficiency of RelationData.Content.update has also been improved, and the config metadata is now exposed in CharmMeta.

This ops-scenario release features the ability to emit custom events, as well as additional data verification and stronger immutability. Additionally, Pebble layer merging has been fixed, both in this package and in Harness.

Our documentation continues to improve. We migrated best practices from the Juju docs and made the Kubernetes charm tutorial shorter and more focused. We also reorganised the testing docs into a single how-to guide about unit testing and a more accessible explanation about testing in general.

Features

  • Add a remove_revision() method to SecretRemoveEvent and SecretExpiredEvent in #1624
  • Add Relation.remote_model property in #1610
  • Efficient implementation of RelationDataContent.update in #1586
  • Expose the config metadata in CharmMeta in #1648
  • Add the ability to emit custom events in unit tests in #1589
  • Check that the check-infos in testing.Container match the plan in #1630
  • ops.testing.State components are less mutable in #1617

Fixes

  • Assorted fixes for Pebble layer merging in Harness and Scenario in #1627

Documentation

  • Add a docs link to the Harness deprecation warning in #1513
  • Add best practices and a "manage charms" how-to in #1615
  • Add section about services with long startup time in #1604
  • Clarify how to use mounts in ops.testing.Container in #1637
  • Fix code snippet indentation in #1649
  • Fix Scenario example in #1616
  • Move hooks-based charm migration guide in #1636
  • Putting test into each chapter of the tutorial in #1647
  • Refactor how-to unit test according to comments in #1642
  • Refactor test docs to 1 explanation and 2 how-tos in #1628
  • Remove the charm-tech@lists.launchpad.net email address in #1632
  • Remove tutorial chapters that are covered by the how-to guide in #1511
  • Stack args vertically for long signature lines in #1641
  • Testing explanation in #1635
  • Unify charm test docs how to in #1639

CI

  • Exclude vault-k8s-operator until the system can handle monorepos in #1650
  • Use the latest version of ops-scenario in the compatibility tests in #1608

Full Changelog: 2.19.2...2.20.0