Repository navigation
chore: update changelog and versions for 3.8.4 release - #60
Merged
Merged
Conversation
tonyandrewmeyer
added a commit
to canonical/operator
that referenced
this pull request
Oct 7, 2026
This replaces `.github/release.py` with two workflows, so that a release happens in Actions rather than on a maintainer's machine, and the human steps become reviewing a PR and publishing a draft release (the flow agreed in #2224). * "Propose a release" (`workflow_dispatch`) works out the version from the conventional commits since the last tag (or takes one as input), updates the version files and `CHANGES.md`, drafts the release notes via OpenRouter, and opens the bump PR with the notes in the description. If the version it works out from the commits is already tagged elsewhere, it stops and asks for an explicit version. The changelog, the version inference and the notes drafting come from canonical/charm-tech-code (the `changelog` and `draft-release-notes` tools), so our other repos can use them too. It also credits contributors from outside the team, which we've been doing by hand (and sometimes forgetting). * "Create the draft release" (`workflow_dispatch`, given the number of the merged bump PR) checks that the PR was merged to `main` or a `*-maintenance` branch and moved to a non-dev version, and creates a draft release from the PR description plus the `CHANGES.md` entry, targeting the merged commit. It never publishes anything or creates a tag. It then opens the PR that moves the branch back to a dev version. * Both workflows run from `main`, including for a maintenance release: both are dispatched, so the workflow always comes from the default branch, and the scripts and release-note examples are read from `main` rather than from the branch being released. That means nothing has to be backported to `2.23-maintenance` (or any other maintenance branch) for this to work there. * `publish.yaml` now triggers on `release: published` rather than on a tag push, so publishing the draft is explicitly what sends the package to PyPI rather than a side effect of the tag being created. `test-publish.yaml` is folded into it as the `workflow_dispatch` job. * `release.py`, its tox environments, and the `release` dependency group are removed. The check for open "update charm pins" PRs goes with it and isn't replaced (as written it only fired with two or more open, and I don't think we want it). The `.github/` script tests now run as part of `tox -e unit`. * The release section of `CONTRIBUTING.md` is rewritten for the new process. To review, I'd start with the release section of `CONTRIBUTING.md`, which walks through the whole flow, then `propose-release.yaml`, `create-draft-release.yaml`, and `publish.yaml`, and finally `update-release-versions.py` and its tests. I've run the flow on my fork, with this branch merged into the fork's `main`: a [dry run without a version](https://github.com/tonyandrewmeyer/operator/actions/runs/37292054966), which stops because 3.8.3 is tagged outside `main`'s history, a [dry run with 3.8.4](https://github.com/tonyandrewmeyer/operator/actions/runs/37292158459), the [proposal](https://github.com/tonyandrewmeyer/operator/actions/runs/37292271500) ([fork#60](tonyandrewmeyer#60)), the [draft release and post-release PR](https://github.com/tonyandrewmeyer/operator/actions/runs/37294123074) ([fork#61](tonyandrewmeyer#61)), publishing the [draft](https://github.com/tonyandrewmeyer/operator/releases/tag/3.8.4) (which created the tag on the merge commit), and merging the post-release PR. I haven't run a pre-release or a maintenance release through the workflows, but I have run `update-release-versions.py` against `2.23-maintenance` and `3.3-maintenance` in both modes, and it rewrites the four version files and skips the versions doc that neither branch has. There are also two settings changes: a `release-notes` environment with an `OPENROUTER_API_KEY` secret and an `OPENROUTER_MODEL` variable (without them the workflow puts a placeholder where the notes would go, rather than failing), and the Test PyPI trusted publisher needs to point at `publish.yaml` instead of `test-publish.yaml`. Separately, both workflows open their PRs with `GITHUB_TOKEN`, so checks don't start on those PRs until someone closes and reopens them. A token that starts checks (an app token, or a PAT in a repository secret) would fix that, but I'd rather do that after the first release with this. Fixes #2224 --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepares the 3.8.4 release from
main.CHANGES.mdhas a new entry for 3.8.4.The GitHub release is titled
3.8.4:followed by the summary under "Release title", and its body is the notes under "Release notes". Edit both here: this description is where they are read from. Each is wrapped in hidden markers, which you will see when you edit; keep them.Release title
relation data access fixes
Release notes
This is a fixes release. Most of the changes are to how relation data access is checked and reported. There are no new features.
Changes that may affect your charm
Relation databag read permissions are now enforced on every access path (fix: enforce relation databag read permissions on all access paths canonical/operator#2738). Previously, some ways of reading a relation databag skipped the permission check. If your charm, or a library it uses, reads a databag it is not allowed to read, expect an error where it used to get the data. Check any code that reads other applications' or units' databags. Unsure: the inputs do not say which access paths were unchecked, or whether this applies to the runtime,
ops.testing, or both. Please confirm before publishing.A relation that has gone away now raises
RelationNotFoundErrorinstead of a "permission denied" error (fix: a gone relation raises RelationNotFoundError, not "permission denied" canonical/operator#2748). If you handle this case by catching the permission error, catchops.RelationNotFoundErrorinstead:Unsure: the inputs do not say exactly which call raises this, so the example above may need adjusting.
Other fixes worth knowing about
_CharmSpecis covariant in its charm type (fix: make _CharmSpec covariant in its charm type canonical/operator#2715). Type checkers should accept charm subclasses where they did not before. Unsure:_CharmSpecis private, so this probably matters only to type checking of tests. Confirm whether charm authors would notice.Documentation
There is a new how-to guide for securing a charm (canonical#2721), and the tool versions page is now easier to find (canonical#2712). Unsure: add links to both pages; we could not confirm their addresses from the inputs.
Contributors
Thank you to @cristiangirlea, Tony Meyer and Claude.
Unsure: Claude is credited on several changelog entries, but is an AI assistant rather than a person. Decide whether to list it here.