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
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
2 participants