Repository navigation
ci: backport release workflow changes to release/2.34 (#29793, #32209, #32211) - #32231
Merged
Merged
Conversation
…29793) The `Publish Helm Chart` step does an unguarded read-modify-write of `gs://helm.coder.com/v2/index.yaml`: download, `helm repo index --merge` with only this run's three charts, upload. The workflow `concurrency` group is keyed on `github.ref`, so releases for different tags run in parallel. When two of them reach this step at about the same time, both merge into the same old index and the second upload silently drops the first release's entries. This is how 2.36.6 (and, going by the current index, probably 2.36.2) went missing from the `coder-v2` chart repo after back-to-back manual re-runs. Treat the index like a compare-and-swap: - Read the object's GCS `generation` before and after downloading `index.yaml`, and fail if it changed underneath us. - Upload with `x-goog-if-generation-match:<generation>` so a concurrent writer causes a `412` instead of a clobber. - On either failure, exit with a `::error::` telling the operator to re-run the job. No automatic retry; a re-run merges against the fresh index. Chart tarballs are still uploaded before the index, so an index entry is never published ahead of its tarball. The OCI pushes to `ghcr.io/coder/chart` are unchanged; they have no shared index and were never affected. Serializing all release runs through a single `concurrency` group was considered and rejected: GitHub keeps only the newest pending run per group, so a third dispatch would silently cancel a queued release. - `actionlint` and `shellcheck` on the step script pass. - Exercised the step locally with a fake `gsutil`: the happy path uploads and bumps the generation; bumping the generation between read and upload makes the precondition fail and the step exit 1 with the re-run message. - Not exercised against the real bucket. The `x-goog-if-generation-match` header and `gsutil stat` `Generation:` field are standard GCS behaviour, but a dry-run cannot cover this because the step is skipped when `dry_run` is set. This does not repair the already-missing entries; #29794 adds a one-off workflow for that. --- _Generated by Coder Agents on behalf of @f0ssel._ --------- Co-authored-by: McKayla はな <kayla@tree.camp> (cherry picked from commit 54bd34d)
Contributor
|
👋 Hey @sreya! This PR is targeting the Only bug fixes should be cherry-picked to release branches. If this is a bug fix, please update the PR title to match the conventional commit format: If this is not a bug fix, it likely should not target a release branch. |
kylecarbs
approved these changes
Nov 16, 2026
deansheather
approved these changes
Nov 16, 2026
This branch had an error being deployed
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.
Backports release workflow changes from
mainso releases cut fromrelease/2.34(ESR) use the current publish guard and signing flow:Each commit is a
git cherry-pick -xof the original commit on main.Conflicts: #29793 conflicted in the release.yaml helm publish step because main's step also publishes the
ai-gatewaychart, which does not exist on 2.34; the GCS generation guard was applied onto the branch's existing chart list (coder + provisioner) without importing the ai-gateway lines. #32209 applied cleanly. #32211 conflicted in ci.yaml and release.yaml only on the "Install rcodesign" step (the branch still had the older inline wget install); resolved by taking the new./.github/actions/install-rcodesigncomposite action. The branch already has.github/scripts/retry.sh(an older revision without--timeout, which the new action does not use), so no retry.sh copy was needed, and all ci.yaml hunks applied without dropping any, so dry-run signing coverage in CI matches main.Validation:
go build ./scripts/gpgkms/andgo test ./scripts/gpgkms/pass;bash -n scripts/sign_with_gpg.sh scripts/sign_darwin.sh scripts/build_go.shpasses;actionlint .github/workflows/release.yaml .github/workflows/ci.yamlpasses; repo pre-commit hooks (shfmt, terraform fmt, markdown fmt/lint, shellcheck, actionlint, typos, helm lint, migrations) passed on each commit. The residualrelease.yamldiff vs main is fully attributable to known non-backported changes: dependabot action SHA bumps, the mise tooling migration, ai-gateway chart publishing,retry.sh --timeoutusage, an em dash cleanup in a log message, andenvironment:key ordering in publish-homebrew/publish-winget.Requested by @sreya.