Repository navigation
Make release-prep refuse a version the repository has already tagged - #11
Closed
glaubersilva wants to merge 1 commit into
Closed
glaubersilva wants to merge 1 commit into
glaubersilva wants to merge 1 commit into
Conversation
A release branch cut from main right after a release still carries that release's version, and preparing it again put the next changes under a version that was already out; the only check was that the version was not lower than the branch's. The tag is now read through the GitHub API before pup runs, so the shallow checkout does not matter, and an existing tag fails the step naming the fix.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
Member
Author
|
Closed by a branch rename, not on purpose: the branch moved to |
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.
Follow-up to SOFT-5187
The release-prep action now refuses a version the repository has already tagged. Independent of #10; the two can merge in either order.
Why
A release branch cut from
mainright after a release still carries that release's version. Preparing it with the same version passed every check (the version is not lower than the branch's, which is the rule that catches a wrong branch), and the next changes ended up under a version that was already out. That is what happened on the test plugins today: bothrelease/M26.test40branches were cut after 2.1.36 and 1.1.10 had been released, the prepare accepted those versions, and the deploy found their tags already published.What changes
refs/tags/<version>through the GitHub API. A 404 lets the run go on; an existing tag fails the step: "The tag 4.17.0 already exists in owner/repo: that version is out … Give the release a new version. Nothing was changed." Any other API error fails the step too, rather than being read as an absent tag.inputs.tokento the prepare step asgithub-token, as the commit step already did. A pinnedpup-versionstill makes no API call for pup; the tag read is the one request a prepare makes.GITHUB_REPOSITORYis required, as it already was for the commit step.Tests
node --test: 216 pass (213 before). New: the tag exists (refused before any download or pup call, no outputs), the read fails (refused, not taken for an absent tag),GITHUB_REPOSITORYmissing, and the pinned-pup test now asserts the one request is the tag read. Removing the check fails three tests.actionlint1.7.12 is clean on the template.Verified end to end
Not yet. Once #10 lands, a prepare of
release/M26.test40on release-test-plugin-a with its current version 2.1.36 should fail with the message above, and one with a new version should go on as before. Runs will be listed here.