chore(deps): update dependency ops to v2
Metadata
Current evaluation
Merged automated dependency update upgrading ops from v1.5.4 to v2.0.0. Approved by a reviewer, passed CI checks, and successfully integrated.
Suggested action: —
No scores available.
Issue body
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ops](https://togithub.com/canonical/operator) | `==1.5.4` -> `==2.0.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
<details>
<summary>canonical/operator</summary>
### [`v2.0.0`](https://togithub.com/canonical/operator/releases/tag/2.0.0): final
[Compare Source](https://togithub.com/canonical/operator/compare/1.5.4...2.0.0)
This is version 2.0.0 of `ops`, which includes the following changes:
##### Major changes
- **APIs to interact with Juju Secrets**, along with a testing harness. [Read the tutorial](https://juju.is/docs/sdk/add-a-secret-to-a-charm) or the [code (#​861)](https://togithub.com/canonical/operator/pull/861).
- **Ops 2.0.0 requires Python 3.8+** (ops 1.5.x works down to Python 3.5). Note that Python 3.8 is the version installed by default on Ubuntu 20.04 (Focal), where Python 3.5 was installed on Ubuntu 16.04 (Xenial). As a result, ops 2.0.0 is intended for use with Juju 3.0+, which only supports Ubuntu 20.04 and above. We started using some Python 3.8 features in [#​871](https://togithub.com/canonical/operator/issues/871), and plan to use more in future ops 2.x releases.
- **Removed `SIMULATE_CAN_CONNECT`** from the testing harness ([#​871](https://togithub.com/canonical/operator/issues/871)). When we introduced `can_connect` it would have been a breaking change to enable it by default, so we added the `SIMULATE_CAN_CONNECT` global to enable it, with a warning that we'd enable it by default in a future release. This release removes the global flag and enables simulation by default.
- **Made `begin_with_initial_hooks()` trigger pebble-ready** in the testing harness ([#​871](https://togithub.com/canonical/operator/issues/871)). The default value of `container.can_connect()` is still False when using `begin()` ("manual mode"), but this release updates `begin_with_initial_hooks()` to set `can_connect` to True and fire pebble-ready for all containers in the charm's metadata.
Note that the `SIMULATE_CAN_CONNECT` and `begin_with_initial_hooks()` changes won't change or break your charms, however, they may break charm *tests* -- for example, tests that aren't expecting `pebble-ready` to be fired when calling `begin_with_initial_hooks()`.
##### Other breaking changes
- Deprecate controller storage: [#​882](https://togithub.com/canonical/operator/issues/882). This deprecate `use_juju_for_storage=True` (it's intended for pod-spec charms).
- Remove Windows support: [#​872](https://togithub.com/canonical/operator/issues/872). Juju 3.0 no longer supports Windows deployments, so ops doesn't need to either.
##### Minor changes
- Fix logging in can_connect, add tests; remove pebble.Error methods: [#​860](https://togithub.com/canonical/operator/issues/860). This fixes a couple of logging calls, but also removes the `name()` and `message()` methods from the `ops.pebble.Error` exception subclass. This is theoretically a breaking change, but it is very unlikely these methods were used by charms.
- Add ErrorStatus [#​875](https://togithub.com/canonical/operator/issues/875). This adds a missing unit status value, `error`.
- Add Pebble idempotency behavior [#​876](https://togithub.com/canonical/operator/issues/876). This makes the testing harness's emulated versions of `start()` and `stop()` match Pebble's current behaviour, which makes them idempotent: `start()` now does nothing if the service is already started, and similarly `stop()` does nothing if the service is already stopped.
- Clarifies the warning message when local storage is chosen: "not a Kubernetes *podspec* charm" instead of "not a kubernetes charm" (the latter is incorrect). This was done in [#​882](https://togithub.com/canonical/operator/issues/882).
- Removes the long-deprecated `key` argument to charm's `__init__`. This was done in [#​882](https://togithub.com/canonical/operator/issues/882).
- Removes the deprecated (and private!) `Harness._oci_resources` attribute. This was done in [#​882](https://togithub.com/canonical/operator/issues/882).
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "every weekend" in timezone Etc/UTC, Automerge - "after 1 am and before 7 am" in timezone Etc/UTC.
🚦 **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 this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/canonical/charmcraft).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMTEuMSIsInVwZGF0ZWRJblZlciI6IjM0LjExMS4xIn0=-->
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged automated dependency update upgrading ops from v1.5.4 to v2.0.0. Approved by a reviewer, passed CI checks, and successfully integrated. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Automated dependency update merged, upgrading the ops library from v1.5.4 to v2.0.0. The change was applied without conflicts or comments. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged automated dependency update upgrading ops from v1.5.4 to v2.0.0. The pull request was successfully merged without conflicts or additional comments. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1041 chore(deps): update dependency ops to v2.2.0 - autoclosed | charmcraft | closed | Renovate automatically closed the PR updating ops to v2.2.0. No manual review or merge occurred, likely due to staleness or a newer update superseding it. | |
| #964 chore(deps): update dependency attrs to v22.2.0 | charmcraft | merged | Merged automated dependency update upgrading attrs from v22.1.0 to v22.2.0. Approved by a reviewer, passed CI checks, and merged with minimal changes across two files. | |
| #1342 chore(deps): update dependency craft-cli to v2.3.0 | charmcraft | merged | Merged automated dependency update for craft-cli from v2.1.0 to v2.3.0. Passed CI checks and reviewer approval before integration. | |
| #1648 chore(deps): update dependency referencing to v0.34.0 | charmcraft | merged | Merged automated dependency update for referencing from v0.33.0 to v0.34.0. Approved by three reviewers, passed CI checks, and applied with minimal changes across two files. | |
| #1188 chore(deps): update dependency pytest-check to v2.2.0 | charmcraft | merged | Automated dependency update for pytest-check merged from v2.1.5 to v2.2.0. Approved by a reviewer, passed CI checks, and successfully integrated into the codebase. | |
| #392 chore(deps): update dependency craft-cli to v2.3.0 | rockcraft | merged | Merged the automated dependency update upgrading craft-cli from v2.1.0 to v2.3.0. The change passed all CI checks, received approval from two reviewers, and modified three files. | |
| #1353 chore(deps): update all dependencies | charmcraft | merged | Merged dependency update across three files, changing 23 additions and 24 deletions. Approved by two reviewers with zero unresolved comments. Changes integrated successfully. | |
| #1289 chore(deps): update dependencies | charmcraft | merged | Approved by two reviewers and merged, the dependency update modified three files with 45 additions and 34 deletions to refresh project packages. | |
| #42 chore(deps): update dependency coverage to v7.2.1 | starbase | merged | Merged automated dependency update upgrading coverage from v7.1.0 to v7.2.1. Approved by a reviewer, passed CI checks, and successfully integrated. | |
| #4448 chore(deps): update dependencies | snapcraft | merged | Merged PR updating project dependencies across 8 files. Approved by two reviewers, passed CI checks, and maintained test coverage. Changes involve standard dependency version bumps and minor configuration adjustments. |