Repository navigation
Stop the release waiting on unpublished apps and stale indexes - #30
Merged
Merged
Conversation
release_all.py waited for every package to reach PyPI, but vintasend-api and vintasend-templates-management-api have no publish workflow and never do, so a run stalled until its timeout. A package without .github/workflows/publish.yml is now released by its tag alone: it is done once the tag is on origin, and the wave map marks it (tag-only). release_waves refuses a package pinning such a sibling. on_pypi also counted a version as live once the JSON API listed it, while pip resolves against the simple index, which can lag. In 3.2.0 that failed two Python 3.12 publish jobs. A version now counts as live only once the simple index lists it too.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
=======================================
Coverage 86.04% 86.04%
=======================================
Files 37 37
Lines 3117 3117
Branches 438 438
=======================================
Hits 2682 2682
Misses 307 307
Partials 128 128
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What changed
Two gaps in the release scripts that stalled the 3.2.0 release.
1.
release_all.pywaited on apps that never publishtools/vintasend-apiandtools/vintasend-templates-management-apiare applications. They have aci.ymlbut nopublish.yml, and they've never been on PyPI.release_all.pystill waited for them to appear there, so in 3.2.0 it would have sat until its 45-minute timeout and stopped. I had to finish wave 3 with the individual scripts.Package.publishes(_packages.py) is true when the package has.github/workflows/publish.yml.release_all.released()replacespublished(). A publishing package counts as released when it's on PyPI. A tag-only one counts oncev<version>is on origin.release_wavewaits on PyPI only for the publishing packages it tagged. A wave of tag-only packages doesn't wait at all.vintasend-api (tag-only), and the "already released" summary shows them as(tagged).release_waves: a package that version-pins a tag-only sibling raisesPackageError, because that pin could never resolve. Path dependencies are still allowed.lock_subpackages.pyandtag_subpackages.pyneeded no change. They only ask PyPI about dependencies, and nothing depends on the apps.2. A version counted as live before pip could install it
on_pypi()asked only the JSON API (/pypi/<name>/<version>/json). pip resolves against the simple index, which can lag behind it. In 3.2.0,vintasend-fastapi-mailandvintasend-jinjafailed their Python 3.12 publish job with "No matching distribution found for vintasend==3.2.0". That was a couple of minutes after the JSON API had answered yes, and their 3.11 and 3.13 jobs moments later installed it fine. Re-running the failed jobs on the same tag published both.on_pypi()now returns true only when the JSON API and the simple index list the version. It reads the simple index in its PEP 691 JSON form, normalizes the name per PEP 503, and checks the PEP 700versionslist.None("unknown"), never "no".One limit: this checks the index as seen from the machine running the script. A CI runner reaching a different CDN edge could in principle still see a stale page. The skill doc now says to re-run the failed jobs if that happens, since nothing was uploaded.
Docs
ai-tools/skills/release-package/SKILL.mddescribes tag-only packages and the simple-index rule.Verification
There's no test setup for
scripts/(pytest and mypy covervintasend/only), so I checked it with a scratch script against the real packages and live PyPI:vintasend-apiandvintasend-templates-management-apiare detected as tag-only.released()is true for all 12 at 3.2.0 (the apps by tag) and false for all at 9.9.9.on_pypi: true forvintasend==3.2.0, false for an unreleased version and for an unknown project, and true for an odd spelling (Vintasend_Django.Templates-Manager) through normalization.None.release_wavewith the script calls and the PyPI wait stubbed out: wave 2 waits on 8 packages (notvintasend-api), wave 3 onvintasend-django-templates-manageronly, and a tag-only wave doesn't wait.release_all.py --dry-runlists all 12 as already released, the apps as(tagged).Repo gates:
ruff check .andruff format --check .clean,mypyclean,pytest716 passed.Downstream impact / breaking
None. Release tooling only. No library code and no seam change.
🤖 Generated with Claude Code