Harden docker.yml against PyPI CDN propagation race#7
Merged
Conversation
The v0.3.0 push triggered docker.yml ~90s after the tag landed; the old curl-on-JSON poll loop saw pypi.org/pypi/.../json was ready, but pip inside buildx hit a different CDN edge that still served only 0.1.0 and 0.2.0 from the simple-index. Build failed; manual workflow_dispatch re-trigger worked. Two hardening changes so the next release doesn't race: 1. Add a workflow_run trigger keyed off Release completing successfully. Once release.yml's PyPI publish step returns, the upload is acknowledged and the CDN has had a head start before docker.yml even starts. Old tag-push + workflow_dispatch triggers stay as fallbacks. 2. Replace the curl-on-JSON poll with a pip simple-index probe: 'pip download --dry-run --no-deps valanistack==X.Y.Z' uses the same resolver pip will use inside docker, so a positive signal means the docker build will actually succeed. Adds a 30-second buffer after the probe passes to let any straggling edges catch up before multi-arch buildx starts hitting them.
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
The v0.3.0 release triggered docker.yml ~90s after the tag landed; the previous curl-on-JSON poll loop saw `pypi.org/pypi/.../json` was ready, but pip inside buildx hit a different CDN edge that still served only 0.1.0 and 0.2.0 from the simple-index. Manual workflow_dispatch retry succeeded once the CDN settled.
Two changes:
Test plan