Skip to content

ci: backport release workflow changes to release/2.34 (#29793, #32209, #32211) - #32231

Merged
sreya merged 3 commits into
release/2.34from
backport/29793-32209-32211-to-2.34
Nov 16, 2026
Merged

sreya merged 3 commits into
release/2.34from
backport/29793-32209-32211-to-2.34

Conversation

@sreya

@sreya sreya commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Backports release workflow changes from main so releases cut from release/2.34 (ESR) use the current publish guard and signing flow:

Each commit is a git cherry-pick -x of the original commit on main.

Conflicts: #29793 conflicted in the release.yaml helm publish step because main's step also publishes the ai-gateway chart, 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-rcodesign composite 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/ and go test ./scripts/gpgkms/ pass; bash -n scripts/sign_with_gpg.sh scripts/sign_darwin.sh scripts/build_go.sh passes; actionlint .github/workflows/release.yaml .github/workflows/ci.yaml passes; repo pre-commit hooks (shfmt, terraform fmt, markdown fmt/lint, shellcheck, actionlint, typos, helm lint, migrations) passed on each commit. The residual release.yaml diff vs main is fully attributable to known non-backported changes: dependabot action SHA bumps, the mise tooling migration, ai-gateway chart publishing, retry.sh --timeout usage, an em dash cleanup in a log message, and environment: key ordering in publish-homebrew/publish-winget.

Requested by @sreya.

garrettatcoder and others added 3 commits November 16, 2026 03:07
…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)
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @sreya!

This PR is targeting the release/2.34 release branch, but its title does not start with fix: or fix(scope):.

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:

fix: description of the bug fix
fix(scope): description of the bug fix

If this is not a bug fix, it likely should not target a release branch.

@sreya
sreya marked this pull request as ready for review November 16, 2026 03:46
@sreya
sreya requested a review from a team November 16, 2026 03:46
@sreya
sreya merged commit 4797707 into release/2.34 Nov 16, 2026
57 of 58 checks passed
@sreya
sreya deleted the backport/29793-32209-32211-to-2.34 branch November 16, 2026 03:47
@linear-code

linear-code Bot commented Nov 16, 2026

Copy link
Copy Markdown

SEC-1432

This branch had an error being deployed

1 failed deployment
docs-preview — 06dada1b Deployed Nov 16, 2026 by sreya via cleanup #84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants