Make the SCM 1.0 release path idempotent#8
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR makes the SCM 1.0 release workflow idempotent by detecting when a specific version is already present on PyPI and skipping only the immutable upload step, while keeping trusted publishing for new versions. It also adjusts production concurrency tests to allow a longer deadline for multi-process coordination (notably on macOS cold starts) and documents the new release behavior.
Changes:
- Add a PyPI “version exists” check and conditionally skip the PyPI publish step when the exact version is already published.
- Widen multi-process test timeouts via a shared constant while keeping exit-code and cleanup assertions.
- Update publishing documentation to reflect the idempotent release behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/production/test_concurrency.py |
Replaces hardcoded 30s waits/joins with a shared 60s process timeout constant for improved stability. |
docs/PUBLISH.md |
Documents the new “check PyPI first; skip only upload if version exists” release behavior. |
.github/workflows/release.yml |
Adds a PyPI version existence probe and gates the publish step on it; minor path/glob consistency tweaks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+55
to
+57
| Release reruns first check whether the exact package version already exists on | ||
| PyPI. An existing version skips only the immutable upload; new versions still | ||
| require the configured trusted publisher. |
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.
Summary
Verification
This enables a one-time project-token upload for 1.0.0 without causing the tag workflow or GitHub release asset job to fail.