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

Different prevention of duplicate test PyPI uploads #15

Merged
merged 1 commit into from May 17, 2020

Conversation

chrisjbillington
Copy link
Collaborator

@chrisjbillington chrisjbillington commented May 17, 2020

If not triggered by a tag-create event, delete all tags pointing to the
current commit so that it is always treated as a development version.

This prevents a race condition where a commit tagged soon after being
pushed may either end on on test PyPI as a .dev version and a
release, or only the latter, depending on timing. If there is a matrix
of jobs running, which of these happens could be different for each job,
leading to some platforms having an extra dev version on test PyPI that
others platforms don't.

This makes it deterministic: unless we're in a tag event, don't use any
tags from the current commit, and determine the version from previous
tags only.

And we can get rid of the if statement that was designed to prevent
duplicate PyPI uploads.

Relevant: #10, #13

If not triggered by a tag-create event, delete all tags pointing to the
current commit so that it is always treated as a development version.

This prevents a race condition where a commit tagged soon after being
pushed may or may either end on on test PyPI as a .dev version *and* a
release, or only the latter, depending on timing. If there is a matrix
of jobs running, which of these happens could be different for each job,
leading to some platforms having an extra dev version on test PyPI that
others platforms don't.

This makes it deterministic: unless we're in a tag event, don't use any
tags from the current commit, and determine the version from previous
tags only.

And we can get rid of the if statement that was designed to prevent
duplicate PyPI uploads.
@chrisjbillington
Copy link
Collaborator Author

If github-actions fix actions/checkout#249, we can hopefully then just delete the Unshallow step and not have to change anything else.

@rpanderson
Copy link
Owner

Looks good.

@rpanderson rpanderson closed this May 17, 2020
@rpanderson rpanderson deleted the deterministic-push-and-tag branch May 17, 2020 17:38
@rpanderson rpanderson restored the deterministic-push-and-tag branch May 17, 2020 17:40
@rpanderson rpanderson reopened this May 17, 2020
@rpanderson rpanderson merged commit c28fe94 into master May 17, 2020
@rpanderson rpanderson deleted the deterministic-push-and-tag branch May 17, 2020 17:41
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.

None yet

2 participants