ci: stop force-pushing exact release tags#15
Open
mldangelo wants to merge 1 commit into
Open
Conversation
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.
Companion to promptfoo/promptfoo#9991, addressing finding 3 of promptfoo/promptfoo#9985: exact version tags (e.g.
v0.1.8) were created withgit tag -faand pushed with--forcealongside the floatingv0/v0.1aliases, so pinning to an exact patch tag was not immutable.With this change:
--force. If the tag already exists at a different commit (a same-version re-release), the job fails loudly instead of silently re-pointing the release — bump the version to release again.GITHUB_SHAis left as-is; the non-force push is a no-op).v0,v0.1) continue to move, which is their documented purpose.Note this makes exact tags immutable by process, not cryptographically — a repo admin can still delete/re-push tags. Two settings-level follow-ups worth considering (not possible via PR):
v*from deletion and non-fast-forward updates, scoped so the release workflow can still create tags and move onlyv0/v0.xaliases.Verification: exact-tag creation/push logic exercised against the failure matrix (fresh release, re-run same commit, same-version re-release, raced remote) — see the inline comments.