Skip to content

release: Make the tag step safe to retry in both release files - #1486

Open
marcleblanc2 wants to merge 1 commit into
marc/skip-smoke-test-on-docs-onlyfrom
marc/batch-change-release-tag-retry
Open

marcleblanc2 wants to merge 1 commit into
marc/skip-smoke-test-on-docs-onlyfrom
marc/batch-change-release-tag-retry

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

#1449 made the tag step in release.yaml safe to retry. batch-change/release.yaml has the same step, and still runs a bare git tag, which fails when a finalize job is retried.

  • Copies the block from release.yaml: if the tag already points at the promote commit, keep it; if it points anywhere else, fail.
  • In both files, creates the release branch with git switch -C instead of -c, which failed when a retry ran in a checkout that kept the branch from the first attempt.

Risk: low. The first run of a release does what it did before. Only a retried finalize job behaves differently.

Checklist

  • All images have a valid tag and SHA256 sum (no image changes)

Test plan

Ran the tag step from each file against a local Git remote, with the version set to v9.9.9:

Scenario main, batch-change/release.yaml main, release.yaml This PR, both files
New tag Exit 0 Exit 0 Exit 0, tag and release branch pushed
Retry in a fresh clone Exit 128: tag 'v9.9.9' already exists Exit 0 Exit 0, tag kept
Retry in the same checkout Exit 128: a branch named 'release-v9.9.9' already exists Exit 128, same message Exit 0
Tag exists on another commit Exit 128: tag 'v9.9.9' already exists Exit 1 Exit 1, nothing pushed
  • Not run through sg release; the next release is the first real run
  • Build 16955 passed

Closes FE-583

@marcleblanc2
marcleblanc2 added this pull request to stack #1491 November 11, 2026 10:45
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

@marcleblanc2
marcleblanc2 force-pushed the marc/batch-change-release-tag-retry branch from bac89db to 2f8ec5f Compare November 11, 2026 22:23
@marcleblanc2 marcleblanc2 changed the title release: Make tag creation retry-safe in batch-change/release.yaml release: Make the tag step safe to retry in both release files Nov 11, 2026
@marcleblanc2
marcleblanc2 force-pushed the marc/batch-change-release-tag-retry branch from 2f8ec5f to 3c9eca2 Compare November 11, 2026 23:45
@marcleblanc2
marcleblanc2 removed this pull request from stack #1491 November 12, 2026 22:27
@marcleblanc2
marcleblanc2 force-pushed the marc/batch-change-release-tag-retry branch from 3c9eca2 to 0bb72cc Compare November 12, 2026 22:27
@marcleblanc2
marcleblanc2 changed the base branch from marc/db-only-migrate-three-databases to marc/skip-smoke-test-on-docs-only November 12, 2026 22:27
@marcleblanc2
marcleblanc2 added this pull request to stack #1498 November 12, 2026 22:27
@marcleblanc2
marcleblanc2 force-pushed the marc/batch-change-release-tag-retry branch from 0bb72cc to 2cee007 Compare November 12, 2026 22:56
@marcleblanc2
marcleblanc2 removed this pull request from stack #1498 November 13, 2026 04:58
@marcleblanc2
marcleblanc2 changed the base branch from marc/skip-smoke-test-on-docs-only to main November 13, 2026 04:58
@marcleblanc2
marcleblanc2 force-pushed the marc/batch-change-release-tag-retry branch from 2cee007 to 741cdc5 Compare November 13, 2026 04:58
@marcleblanc2
marcleblanc2 changed the base branch from main to marc/skip-smoke-test-on-docs-only November 13, 2026 04:58
@marcleblanc2
marcleblanc2 added this pull request to stack #1504 November 13, 2026 04:58
@marcleblanc2
marcleblanc2 marked this pull request as ready for review November 13, 2026 05:36
@marcleblanc2
marcleblanc2 requested a review from a team November 13, 2026 05:36
@marcleblanc2
marcleblanc2 enabled stacked auto-merge (squash) November 13, 2026 05:40
stacked auto-merge was automatically disabled November 13, 2026 07:29

Auto-merge was disabled for another pull request in the stack

@marcleblanc2
marcleblanc2 force-pushed the marc/batch-change-release-tag-retry branch from 741cdc5 to dca57d7 Compare November 13, 2026 07:40
Copies the tag step from release.yaml (#1449) to batch-change/release.yaml: keep a tag which already points at the promote commit, and fail if it points anywhere else.

Both files now create the release branch with git switch -C, so a retry in a checkout which kept the branch from the first attempt no longer fails.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1c7a5-6b65-723b-980c-b85e1e9008b5
Co-authored-by: Amp <amp@ampcode.com>
@marcleblanc2
marcleblanc2 force-pushed the marc/batch-change-release-tag-retry branch from dca57d7 to 93654b4 Compare November 13, 2026 07:51
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.

1 participant