feat: gracefully handle yanked (head) releases#11
Closed
CoderJoshDK wants to merge 2 commits intoastral-sh:mainfrom
Closed
feat: gracefully handle yanked (head) releases#11CoderJoshDK wants to merge 2 commits intoastral-sh:mainfrom
CoderJoshDK wants to merge 2 commits intoastral-sh:mainfrom
Conversation
feat: ignore yanked releases feat: replace older tag release as new HEAD
This will make the origin easier to create all needed versions
Contributor
Author
|
Hey, just a reminder of this. It isn't super high priority, obviously. But it would be nice to get the pre-commit tags updated. |
Member
|
Sorry about the delay this is just kind of a sensitive process to change so I'll need to read it really carefully. |
Member
|
Just a note that I enabled actions again without this. I still plan on reviewing this though. |
ssbarnea
approved these changes
Oct 28, 2024
Contributor
Author
|
Closing due to inactivity and also because really this PR isn't needed. The edge case it solves adds more complexity. And while a more robust system could exist, it could be even more robust than this PR. If for some unknown reason this PR becomes relevant again,,, feel free to use my code however you see fit. |
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.
Closes #10
This PR fixes the issue with yanked releases. It handles the case where the latest version is the yanked version (the main issue with #9).
The first change is in the GitHub action. Instead of doing the pushes and releases in the action itself, they are being done in the python script (
mirror.py)This has the side effect of fixing 2 bugs. If multiple releases happened in the CRON window, a tag for each would not be created, and the tagged version would be wrong. This is no longer the case.
A release is considered
yankedif any of its artifacts are marked as yanked. Some things to keep in mind:If a release is yanked before any action is run, it won't have a tag created for it.
If the most recent tag is a yanked version, a new commit will be created that sets the version to the most recent valid version → deletes that tagged release → create it again. This will force the
FETCH_HEADtag to be pointing to a valid head.Note
If 1.0 is good and 1.1 is bad, and the client already fetched both 1.0 and 1.1; they must delete 1.0 to be able to fetch its replacement.
This is an edge case on an edge case.