Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jul 8, 2025

This PR contains the following updates:

Package Change Age Confidence
ops (changelog) 2.23.1 -> 3.4.0 age confidence
ops (changelog) ^2.23.1 -> ^3.4.0 age confidence

Release Notes

canonical/operator (ops)

v3.4.0

Compare Source

Breaking Changes

  • Fix: Change JujuContext.machine_id from int to str (#​2108)
  • Fix: Ensure that the testing context manager is exited when an exception occurs (#​2117)

Features

  • Add a low-level API for the Juju hook commands (#​2019)
  • Make PebbleClient file methods also accept pathlib.PurePath (#​2097)
  • Log the total number of deferred events (#​2161)
  • Allow setting the Juju availability zone and principal unit in the testing Context (#​2187)

Fixes

  • Allow actions without params or descriptions in ops[testing] (#​2090)
  • Ensure ops.Pebble.pull cleans up temporary files if it errors (#​2087)
  • Make secret info description visible to the charm in ops[testing] (#​2115)
  • Raise ActionFailed when using Context as a context manager (#​2121)
  • Detect categories with an exclamation mark indicating breaking changes (#​2132)
  • Normalise Secret.owner to 'app' for ops[testing] output state (#​2127)
  • Don't cache secret metadata in Ops (#​2143)
  • Secret-info-get cannot be provided with both an ID and a label (#​2170)
  • Minor hookcmds fixes (#​2175)

Documentation

  • Update referenced examples for managing interfaces (#​2068)
  • Tidy up spelling and formatting in several places (#​2060)
  • Add missing assignment to state_out in unit tests how-to (#​2075)
  • Update the holistic/delta explanation with the reconciler pattern (#​2029)
  • Fix broken setup/teardown links in README (#​2094)
  • Update info about release docs, mark testing changelog as not maintained (#​2074)
  • Switch to makefile for building the docs (#​2073)
  • Document how to extract the charm instance from the testing context (#​2084)
  • Add a how-to guide for migrating away from Harness (#​2062)
  • Rename hook tools to hook commands (#​2114)
  • Remove legacy how-to guide for Harness (#​2122)
  • Update the Juju release the metrics functionality is removed from 4.0 to 3.6.11 (#​2126)
  • Clarify that Context is the testing context not only the Juju context (#​2123)
  • Explain the Charmhub public listing process and add a reference list of best practices (#​1989)
  • Expand next steps for K8s tutorial (#​2034)
  • Remove mention of the simple Charmcraft profile (#​2138)
  • Expand landing pages with summaries of pages (#​2140)
  • Update environment setup for integration tests and K8s tutorial (#​2124)
  • Replace machine charm tutorial by an improved tutorial (#​2119)
  • Change HACKING.md instructions for maintaining Charmcraft profiles (#​2151)
  • In integration tests, use consistent approach to logging and packing (#​2150)
  • In integration testing how-to, clarify that Juju model is destroyed after all tests in the model complete (#​2154)
  • Remove Charmcraft channel specifier from machine charm tutorial (#​2148)
  • Add AI contribution note and style guideline for type annotation of return values (#​2168)
  • Add ops[testing] to the ops.testing docstring (#​2171)
  • Add links to the Juju hook from each event class (#​2176)
  • Add a short umask note (#​2184)

Tests

  • Re-enable testing consistency checks after disabling them (#​2141)
  • Expand secrets integration and state transition tests (#​2130)

Refactoring

  • Use ops.hookcmds in _ModelBackend (#​2116)
  • Don't get the storage details from --help (#​2172)
  • Drop 3.8 and 3.9 compatibility code (#​2173)
  • Use json.dumps to produce the YAML in relation-set and state-set (#​2174)
  • Rely on type annotations instead of casts in hookcmds (#​2179)

CI

  • Add integration and state transition tests for the secrets API (#​2078)
  • Temporarily disable tracing integration tests (#​2102)
  • Add secrets tests follow-up (#​2105)
  • Support monorepos in ops charm compatibility testing (#​2100)
  • Test both Charmcraft 3 and Charmcraft 4 profiles (#​2103)
  • Add automated doc checks (and related starter pack updates) (#​2099)
  • Clean up accidental workflow trigger (#​2144)
  • Test if package versions match dependency versions before publishing (#​2139)
  • Update spelling (#​2167)
  • Test against 4.0/stable (#​2186)
  • Store charmcraft logs if smoke tests fail (#​2192)
  • Use Juju channel 4/stable in Ops smoke tests (#​2190)

v3.3.1: : fix loading the Juju machine ID

Compare Source

This is a bug-fix release to fix an issue introduced in Ops 3.3.0 (in production) and Ops 3.2.0 (in testing), where loading the Juju machine ID would fail if the ID was not an integer.

The type of the machine ID (both in ops.JujuContext and testing.Context) is changed from int to str, so some code or tests may need to be adjusted to use the correct type.

What's Changed
Fixes
  • Change JujuContext.machine_id from int to str (#​2108)

Full Changelog: canonical/operator@3.3.0...3.3.1

v3.3.0

Compare Source

Features

  • Expose the Juju hook context in ops.JujuContext (#​1996)

Fixes

  • In testing, separate relation data cache from mock Juju backend (#​2052)

Documentation

  • Use uv for testing and packing the httpbin charm (#​2011)
  • Improve intro to ops.testing reference (#​2023)
  • In httpbin charm integration tests, add env var for charm file to deploy (#​2018)
  • Update get_cloud_spec doc now that credential-get works on K8s (#​2031)
  • Note that arbitrary_types_allowed is required when ops.Secret is used in a Pydantic class (#​2038)
  • Clean up Resources.fetch docstring, add ModelError exception (#​2039)
  • Note that the peer databag isn't usable during the install event (#​2051)
  • Fix testing code in actions how-to guide (#​2054)

CI

  • Nicer logging output in the release script using rich (#​2017)
  • Clean up PYTHONPATH in tox.ini (#​2058)

v3.2.0

Compare Source

Features

  • Add security event logging (#​1905)
  • Surface JUJU_MACHINE_ID envvar in testing env (#​1961)
  • Add a new log target type opentelemetry (#​1937)

Documentation

  • Update links and config for switch to documentation.ubuntu.com/ops (#​1940)
  • Update the required Python version and note the 2.x documentation site (#​1946)
  • Be consistent with recommending self.config (#​1947)
  • Use latest styles from starter pack and remove .html extensions (#​1951)
  • Remove .html extensions from hardcoded links (#​1955)
  • Fix broken URLs in sitemap (#​1956)
  • Add related doc links to homepage (#​1959)
  • Use classes from ops instead of ops. (#​1968)
  • Fix unstyled error pages (#​1969)
  • Add Google Analyics integration and cookie consent banner (#​1971)
  • Refresh docs homepage with more context about Ops (#​1964)
  • Update link to Charmlibs docs (#​1985)
  • Remove unnecessary pages from sitemap (#​1979)
  • Update the httpbin example charm to Jubilant (#​1987)
  • Update the Zero to Hero tutorial to Jubilant (#​1988)
  • Add model-config best practice note (#​1990)
  • Change some best practices to tips (#​2001)
  • Add integration test for invalid config in httpbin charm (#​2002)
  • Make a Layer instead of a LayerDict in the httpbin charm (#​2003)
  • Update how-to to feature Jubilant (#​2000, #​2004)
  • Use Charmcraft-style format and lint for example charms, not Ops-style (#​2008)
  • Update broken link to HookVars source code (#​2006)

CI

  • Fixes for the SBOM and security scan workflow, and trigger it on publishing (#​1916)
  • Store the charmcraft logs if packing fails (#​1936)
  • Install release dependencies for the TIOBE analysis (#​1930)
  • Add Juju 4/beta to the smoke test matrix (#​1963)
  • Adjust permissions block in publish workflow (#​1984)
  • Update actions/checkout to v5 (#​1993)
  • Enable doctests (#​1991)
  • Ignore juju/4 timeouts (#​1998)
  • Remove the token for SBOM and security scan workflow (#​2009)
  • Speed up integration test (#​1978)

v3.1.0

Compare Source

Features

  • Release automation script (#​1855)
  • Add app_name and unit_id attributes to testing.context (#​1920)

Fixes

  • If an event ends with _abort(0) tests should behave as if it ended successfully (#​1887)
  • If self.app is not actually set avoid a new crash location (#​1897)
  • Only add the remote unit for departed and broken relation events, fix ordering (#​1918)
  • Add the remote unit to relation.data but not relation.units (#​1925)

Documentation

  • Use load_config in the httpbin example charm (#​1852)
  • Update HACKING.md with how to bump ops version in Charmcraft profiles (#​1872)
  • Change title of docs site (#​1890)
  • Use config and action classes in the Kubernetes tutorial (#​1891)
  • Reference example charms from K8s tutorial and fix consistency (#​1898)
  • Update style guide (#​1720)
  • Fix issues in how-to guide for stored state (#​1901)
  • Link out to the 12-factor tutorials from the tutorial index page (#​1902)
  • Replace broken link in testing explanation (#​1913)
  • Expand the storage how-to with content from Juju docs scheduled for removal (#​1915)
  • Ops tracing how to (#​1853)
  • Add a security explanation doc (#​1904)

Tests

  • Replace Python version to 3.10 for observability charm tests (#​1914)

CI

  • Use httpbin demo charm for the Charmcraft pack test (#​1895)
  • Move TIOBE workflow to self-hosted runners (#​1912)
  • Add SBOM generation and secscan workflow (#​1906)
  • Build and publish in one step (#​1857)
  • Update the name and email when updating the charm pins (#​1924)
  • Drop smoke test against 20.04 (#​1923)

v3.0.0

Compare Source

The minimum version of Python for Ops 3.x is 3.10.

Documentation

  • Be consistent with recommending self.app and self.unit (#​1856)

CI

  • Hotfix, publish job for ops-tracing (#​1865)

Configuration

📅 Schedule: Branch creation - Between 01:00 AM and 05:59 AM, only on Tuesday ( * 1-5 * * 2 ) in timezone Etc/UTC, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested review from a team, dragomirp, marceloneppel and taurus-forever and removed request for a team July 8, 2025 02:30
github-actions[bot]
github-actions bot previously approved these changes Jul 8, 2025
@github-actions github-actions bot added the Libraries: Out of sync The charm libs used are out-of-sync label Jul 8, 2025
@codecov
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.80%. Comparing base (20abada) to head (1b57d6e).

❌ Your project check has failed because the head coverage (65.80%) is below the target coverage (70.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff            @@
##           16/edge    #1027   +/-   ##
========================================
  Coverage    65.80%   65.80%           
========================================
  Files           18       18           
  Lines         4068     4068           
  Branches       600      600           
========================================
  Hits          2677     2677           
  Misses        1189     1189           
  Partials       202      202           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO PG16 will stay on ops 2 until we release the first 16/stable.

@renovate renovate bot force-pushed the renovate/16/edge-major-python-dependencies branch 2 times, most recently from 65a87ff to 0dc8d64 Compare August 5, 2025 02:12
@renovate renovate bot force-pushed the renovate/16/edge-major-python-dependencies branch from 0dc8d64 to 1a90244 Compare August 12, 2025 02:30
@renovate renovate bot force-pushed the renovate/16/edge-major-python-dependencies branch 2 times, most recently from 4515912 to 72b195f Compare September 2, 2025 02:08
@renovate renovate bot force-pushed the renovate/16/edge-major-python-dependencies branch from 72b195f to dcd0d5f Compare September 3, 2025 12:59
@renovate renovate bot changed the title Update dependency ops to v3 (16/edge) Update Python dependencies (16/edge) (major) Sep 23, 2025
@renovate renovate bot force-pushed the renovate/16/edge-major-python-dependencies branch 2 times, most recently from 08620ea to fbf2e7c Compare September 30, 2025 01:15
@renovate renovate bot force-pushed the renovate/16/edge-major-python-dependencies branch from fbf2e7c to 9eb7eef Compare October 7, 2025 01:41
@renovate renovate bot changed the title Update Python dependencies (16/edge) (major) Update dependency ops to v3 (16/edge) Oct 14, 2025
@renovate renovate bot force-pushed the renovate/16/edge-major-python-dependencies branch from 9eb7eef to 22859fb Compare October 14, 2025 02:16
@renovate renovate bot force-pushed the renovate/16/edge-major-python-dependencies branch from 22859fb to 4e22547 Compare October 21, 2025 02:38
@renovate renovate bot force-pushed the renovate/16/edge-major-python-dependencies branch from 4e22547 to 77d31cc Compare November 11, 2025 04:32
@renovate renovate bot changed the title Update dependency ops to v3 (16/edge) Update Python dependencies (16/edge) (major) Nov 11, 2025
@renovate renovate bot force-pushed the renovate/16/edge-major-python-dependencies branch 2 times, most recently from 5cc0acd to 759d9e9 Compare November 25, 2025 02:49
@renovate renovate bot changed the title Update Python dependencies (16/edge) (major) Update dependency ops to v3 (16/edge) Dec 2, 2025
@renovate renovate bot force-pushed the renovate/16/edge-major-python-dependencies branch from 759d9e9 to 1b57d6e Compare December 2, 2025 03:48
@github-actions github-actions bot added Libraries: OK The charm libs used are OK and in-sync and removed Libraries: Out of sync The charm libs used are out-of-sync labels Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Libraries: OK The charm libs used are OK and in-sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants