Repository navigation
Conversation
Creating the promote branch builds its first commit, the internal config commit "release: vX". `--config-from-commit` accepts that config, so the build runs the promote test and finalize jobs too, and its finalize tags the promote branch head. The build the release worker monitors, for the "promote-release: vX" commit, then fails finalize with "tag already exists", and the promote workflow fails. v8.1.1335 hit this in the k8s and Helm repos; docker only avoided it because the extra build was cancelled by a newer push. Run the promote jobs only when the commit message starts with "promote-release:", the message both the release worker and release.yaml's manual flow use for the promote config commit. Make git:tag skip creating the tag when it already points at the promote branch head, and fail only when it points elsewhere, so a retried finalize succeeds. The release registry already treats re-promoting a release as a no-op. Same change as sourcegraph/deploy-sourcegraph-helm#979. Amp-Thread-ID: https://ampcode.com/threads/T-01a13c8e-c52e-7584-ab27-1a7fb05bc3b7
devdinu
approved these changes
Oct 23, 2026
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.
In v8.1.1335, the k8s and Helm repos both failed their promotion the same way: creating the promote branch builds its first commit, the internal config commit "release: vX".
--config-from-commitaccepts that config, so the build runs the promote test and finalize jobs too. Its finalize tags the promote branch head, and the build the release worker monitors, for the "promote-release: vX" commit, then fails finalize withfatal: tag 'vX' already exists. The promote workflow fails and skips closing the release PRs and opening "Update main". See sourcegraph/deploy-sourcegraph-k8s builds #1197/#1201 and sourcegraph/deploy-sourcegraph-helm builds #3093/#3095.This repo has the same pipeline conditions and
git:tagstep. It got through v8.1.1335 only because the build of the internal config commit (#16700) was cancelled 10 seconds after it started, when newer commits arrived. That depends on a pipeline setting, not on anything in this repo.This is the same change as sourcegraph/deploy-sourcegraph-helm#979 and sourcegraph/deploy-sourcegraph-k8s#497:
(promote) Release: testandfinalizenow also requirebuild.message =~ /^promote-release:/. Both the release worker and this repo'srelease.yamlmanual flow write that message.git:tagis retry-safe. IfvXalready points at the promote branch head, it skips creating the tag and continues. If it points anywhere else, it fails. The release registry's promote endpoint already treats re-promoting as a no-op (200), so a retried finalize now succeeds end to end.How this was tested
63f7963"promote-release: v8.1.1335" runs them;8f0974d"release: v8.1.1335" and6845a34(image update) skip them. This PR's Buildkite build validates that the pipeline, with its new conditionals, uploads.git:tag. I extracted the step from this repo'srelease.yaml, stubbedghandbuildkite-agent, and ran it in fresh clones against a scratch bare remote:release-vXare on the promote head.main's step on the retry case exits 128 withfatal: tag 'v9.9.9' already exists.Rollout
Buildkite reads
pipeline.yamlandrelease.yamlfrom the commit it builds, so patch releases need this on theirX.Y.xbranch. It's labelledbackport 8.1.x; both files are identical on8.1.x, so the backport applies cleanly.