Repository navigation
fix(release): retry a flaky PyPI in preflight; wait for the log sink's flush - #928
Merged
Merged
Conversation
…s flush Release run 43482181032 failed twice over: - preflight: one TLS handshake timeout to pypi.org failed the release. _probe now retries network errors and 5xx (3 attempts, 2s/4s back-off); a 404 and other 4xx still answer at once. - test_sink_writes_are_not_retained_again: a fixed 1.5s sleep raced the writer thread's 1s flush deadline, so a slow runner read 0 rows, then 6. Poll until the app lines are stored before the observation window. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Deploying simple-module-python with
|
| Latest commit: |
eb3fa25
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fb8f9206.simple-module-python.pages.dev |
| Branch Preview URL: | https://fix-log-sink-loop-flake.simple-module-python.pages.dev |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Why
Release run 43482181032 (the re-run after #927) failed in two places, and neither was caused by the 0.0.46 changes:
simple_module_inertia: cannot check PyPI: <urlopen error _ssl.c:994: The handshake operation timed out>. A single network error to pypi.org failed the whole release.test_sink_writes_are_not_retained_againfailed withassert 6 == 0. The test slept a fixed 1.5 s while the log-sink writer flushes on its own 1 s deadline. On a slow runner the first count ran before the flush (0 rows) and the second ran after it (6 rows).What
scripts/release_preflight.py:_proberetries network errors and HTTP 5xx, 3 attempts with 2 s and 4 s back-off. A 404 (missing project / pending publisher) and other 4xx errors still fail straight away. A real PyPI outage still fails closed, after about 2.5 min in total.scripts/tests/test_scripts_release_preflight_retry.pycovers three cases: a transient error is retried, a persistent one still fails, and a 404 is not retried. The existing fail-closed test now stubssleep. Without the stub, the retries made it take minutes, which I hit locally.Verification
assert 6 == 0and the new one passes.make lint✅,make test-py✅ (8467 passed, 48 skipped).No CHANGELOG entry: release tooling and tests only.
https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4