Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: gracefully handle yanked (head) releases #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CoderJoshDK
Copy link
Contributor

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 yanked if 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_HEAD tag 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.

feat: ignore yanked releases

feat: replace older tag release as new HEAD
This will make the origin easier to create all needed versions
@CoderJoshDK
Copy link
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.

@zanieb
Copy link
Member

zanieb commented Jul 10, 2024

Sorry about the delay this is just kind of a sensitive process to change so I'll need to read it really carefully.

@zanieb
Copy link
Member

zanieb commented Jul 25, 2024

Just a note that I enabled actions again without this. I still plan on reviewing this though.

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.

Mirror script runs for yanked releases
3 participants