Repository navigation
docs: update the release agent to match the actual release process - #509
Conversation
The release agent only bumped Chart.yaml and the CHANGELOG, built the CHANGELOG from date ranges, named the wrong workflows and pushed unsigned commits to origin. Rewrite it to follow how the 1.0.0, 1.1.0, 1.1.1 and 1.2.0 releases were actually prepared: - List every file that carries the operator version (Helm test image tags, index.md, before-you-start.md, release-strategy.md, upgrades.md) and grep for leftovers. - Promote [Unreleased] and check it against git log <last-tag>..main so every shipped PR is listed. - Ask whether documentDbVersion changes and hand that to the database release workflows. - Detect CRD changes and require "apply CRDs before helm upgrade" plus upgrade-guide updates. - Validate with helm unittest/lint, mkdocs build --strict and a kind upgrade, rollback and fresh-install test. - Commit with -s, push to the fork, and give the correct post-merge steps (operator workflow names and inputs including source_ref, plain X.Y.Z tag, E2E_UPGRADE_PREVIOUS_VERSION). Co-authored-by: Copilot <[email protected]> Copilot-Session: 9f1a71b4-9969-4456-9f65-8d19dd550d8e Signed-off-by: Rayhan Hossain <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The release instructions omit required test setup and rollback configuration, can skip upgrade coverage, and may use a stale fork as the release base.
5 open issues
Release preparation must use upstream main, not fork origin · New Pod identity check must allow expected rolling restarts · New Rollback command omits the release namespace · New Fresh cluster lacks cert-manager and local image setup · New Upgrade test also requires the current chart and must be verified · New
What changed in this PR
Updates the release agent’s documentation to reflect the operator’s current release process, using recent releases and the 1.2.0 release preparation as reference.
Changes:
- Expands preparation to cover version references, changelog completeness, database-track coordination, and CRD upgrade guidance.
- Documents Helm, documentation, and kind upgrade, rollback, and fresh-install validation.
- Corrects fork-based PR creation, DCO sign-off, and post-merge workflow names, inputs, tagging, and verification.
| File | Description |
|---|---|
.github/agents/release-agent.md |
Rewrites the operator release checklist from preparation through post-release verification. |
Review effort: Balanced
| ### Bug Fixes | ||
| - Fix description from commit | ||
| ```bash | ||
| git fetch origin main --tags |
There was a problem hiding this comment.
Fixed in 22fb046. Step 0 now identifies <upstream> (the remote whose URL is documentdb/documentdb-kubernetes-operator) and <fork-remote> by URL instead of assuming origin is upstream. The fetch, release-branch base, CRD diff, CHANGELOG range and rebase all use <upstream>/main.
| 2. Create a `DocumentDB` (and a `ScheduledBackup`) using the API version that release served, and insert test data through the gateway with `mongosh` (`mongodb://…@documentdb-service-<name>.<ns>.svc:10260/?directConnection=true&authMechanism=SCRAM-SHA-256&tls=true&tlsAllowInvalidCertificates=true`). | ||
| 3. **Apply the new CRDs** with `kubectl apply --server-side --force-conflicts -f operator/documentdb-helm-chart/crds/`, and check that the old operator still works. | ||
| 4. **`helm upgrade`** to the release-branch chart with `--set image.documentdbk8soperator.repository=localhost/documentdb-operator --set image.sidecarinjector.repository=localhost/documentdb-sidecar --set image.documentdbk8soperator.pullPolicy=Never --set image.sidecarinjector.pullPolicy=Never`. | ||
| 5. **Verify**: the database pod UID is unchanged and has 0 restarts, the cluster is healthy, all data is intact, and the operator logs show no errors besides first-reconcile `object has been modified` retries. Create a new cluster with the current API version and do a read/write. If CRDs changed, check the webhook rejects an invalid change (for example a PVC shrink) through every served API version, and run any migration commands from the upgrade guide. |
There was a problem hiding this comment.
Good catch, fixed in 22fb046. The pod-identity check now applies only when database images and pod configuration are unchanged. If the default engine version or rendered pod spec changes, the agent expects unpinned clusters to roll: it checks for a normal rolling restart onto the new images with data intact, and that pinned clusters keep their images.
| 3. **Apply the new CRDs** with `kubectl apply --server-side --force-conflicts -f operator/documentdb-helm-chart/crds/`, and check that the old operator still works. | ||
| 4. **`helm upgrade`** to the release-branch chart with `--set image.documentdbk8soperator.repository=localhost/documentdb-operator --set image.sidecarinjector.repository=localhost/documentdb-sidecar --set image.documentdbk8soperator.pullPolicy=Never --set image.sidecarinjector.pullPolicy=Never`. | ||
| 5. **Verify**: the database pod UID is unchanged and has 0 restarts, the cluster is healthy, all data is intact, and the operator logs show no errors besides first-reconcile `object has been modified` retries. Create a new cluster with the current API version and do a read/write. If CRDs changed, check the webhook rejects an invalid change (for example a PVC shrink) through every served API version, and run any migration commands from the upgrade guide. | ||
| 6. **Rollback**: `helm rollback documentdb-operator <first revision>` and check the previous operator still works against the new CRDs (existing clusters healthy, it can create a new cluster). Then roll forward again with `helm upgrade`. |
There was a problem hiding this comment.
Fixed in 22fb046. The rollback step now runs helm history documentdb-operator -n documentdb-operator and then helm rollback documentdb-operator <first revision> -n documentdb-operator --wait.
| 4. **`helm upgrade`** to the release-branch chart with `--set image.documentdbk8soperator.repository=localhost/documentdb-operator --set image.sidecarinjector.repository=localhost/documentdb-sidecar --set image.documentdbk8soperator.pullPolicy=Never --set image.sidecarinjector.pullPolicy=Never`. | ||
| 5. **Verify**: the database pod UID is unchanged and has 0 restarts, the cluster is healthy, all data is intact, and the operator logs show no errors besides first-reconcile `object has been modified` retries. Create a new cluster with the current API version and do a read/write. If CRDs changed, check the webhook rejects an invalid change (for example a PVC shrink) through every served API version, and run any migration commands from the upgrade guide. | ||
| 6. **Rollback**: `helm rollback documentdb-operator <first revision>` and check the previous operator still works against the new CRDs (existing clusters healthy, it can create a new cluster). Then roll forward again with `helm upgrade`. | ||
| 7. **Fresh install**: on a new kind cluster, `helm install` the release-branch chart and create a cluster with the current API version. |
There was a problem hiding this comment.
Fixed in 22fb046. Cluster setup (create, load the local images, install cert-manager) is now a setup_kind function, and the image overrides are a shared LOCAL_IMAGES array. The fresh-install step runs setup_kind release-fresh and installs the release-branch chart with "${LOCAL_IMAGES[@]}".
| curl -sfo /dev/null -w '%{http_code}\n' \ | ||
| https://raw.githubusercontent.com/documentdb/documentdb-kubernetes-operator/X.Y.Z/operator/documentdb-helm-chart/crds/documentdb.io_dbs.yaml # 200 | ||
| ``` | ||
| 7. Set the repository variable `E2E_UPGRADE_PREVIOUS_VERSION` to `X.Y.Z`. The E2E control-plane upgrade spec (`test/e2e/tests/upgrade/upgrade_control_plane_test.go`) skips when it is unset; once set, it tests upgrades from this release. |
There was a problem hiding this comment.
Agreed, and the issue goes further: E2E_UPGRADE_CURRENT_CHART has to be the chart built by that CI run (a per-architecture artifact), so a repository variable cannot enable the spec. Fixed in 22fb046. I removed the advice to set E2E_UPGRADE_PREVIOUS_VERSION; Step 9 now says the control-plane upgrade spec is skipped in CI and a green E2E run is not chart-upgrade coverage (the Step 7 kind test is). The agent only counts CI coverage if the job log shows the spec ran, and flags the gap otherwise. Wiring the built chart into test-e2e.yml should be a separate change.
- Identify the upstream and fork remotes by URL and base everything on <upstream>/main instead of assuming origin is upstream. - Kind test: share cluster setup and local-image overrides between the upgrade and fresh-install clusters, pass -n to helm rollback, and only require unchanged database pods when the release doesn't change the engine version or pod configuration. - Post-merge: the control-plane upgrade E2E spec also needs E2E_UPGRADE_CURRENT_CHART, which CI leaves empty, so it is skipped; don't treat a green E2E run as chart-upgrade coverage. Co-authored-by: Copilot <[email protected]> Copilot-Session: 9f1a71b4-9969-4456-9f65-8d19dd550d8e Signed-off-by: Rayhan Hossain <[email protected]>
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (docs); effort from diff stats (206+316 LOC, 1 files) If a label is wrong, ping |
- Release date 2026-11-17. - Add CHANGELOG entries for changes merged after the release PR was opened: OTel Collector outbound proxy (documentdb#476), documentdb_core upgraded with documentdb (documentdb#507), and stable documentation links and checks (documentdb#513, documentdb#514). documentdb#508 already added its own entry; documentdb#509 is internal. Co-authored-by: Copilot <[email protected]> Copilot-Session: 9f1a71b4-9969-4456-9f65-8d19dd550d8e Signed-off-by: Rayhan Hossain <[email protected]>

Summary
Rewrites
.github/agents/release-agent.mdso it matches how releases are actually prepared (1.0.0, 1.1.0, 1.1.1 and the 1.2.0 release PR #506). The old agent only bumpedChart.yamland the CHANGELOG, named the wrong workflows, and pushed unsigned commits toorigin.What changed in the agent
Chart.yaml,CHANGELOG.mdonly; "stage only these two"index.md,before-you-start.md,release-strategy.md,upgrades.md), split by patch vs minor, plusgit grepfor leftoversgit log --since=<date>[Unreleased], then checks it againstgit log <last-tag>..origin/mainso every shipped PR is listed. The 1.1.1 entry missed #496 and #493. Also checks the previous release date.documentDbVersionchanges. If it does, the database workflows run first and their auto PR is merged before the operator release.helm upgrade", and the upgrade-guide version ranges and rollback notes get updated.make testhelm unittest,helm lint, a rendered-image check,mkdocs build --strict, and a kind test: upgrade from the published previous chart, rollback, roll forward and fresh installrelease/vX.Y.Zpushed toorigin, no sign-off<user>/release-X.Y.Zfrom<upstream>/main, pushed to the fork,git commit -sversion), then RELEASE - Promote Operator Images and Publish Helm Chart (candidate_version: X.Y.Z-test,version,source_ref: <merge-sha>). PlainX.Y.Ztag and verification commands. Notes that the control-plane upgrade E2E spec is skipped in CI (it needs the run's built chart inE2E_UPGRADE_CURRENT_CHART), so the kind test is the chart-upgrade check.Kept: the version-format validation (command-injection guard), the increment check, and the patch/minor/major bump commands.
Validation
Docs-only change. I checked that every path, workflow name, workflow input, Helm value and E2E variable the agent references exists on
main.