fix: retry transient failures in the weekly online fixture refresh - #188
Merged
Merged
Conversation
The weekly "Refresh online fixtures" workflow failed three weeks running. _download had no retries, and http.client.RemoteDisconnected is not a URLError, so a single dropped connection from archive.ics.uci.edu escaped the per-dataset handler and aborted the whole run. - scripts/fixture_download.py: shared download() with exponential backoff for OSError/HTTPException, 429 and 5xx; permanent 4xx raise immediately. - fetch_online_fixtures.py: continue per dataset, separate network failures from dataset (parse/empty/hash/permanent HTTP) failures, add --max-failures for the network budget, emit GitHub warning annotations. - tests/expectations.py: the live-fetch helper reuses download(). - fetch-fixtures.yml: --max-failures 2, always run the offline verify step with -m "not online", open a nightly-failure issue on scheduled failures.
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
kevincostner17
added a commit
that referenced
this pull request
Sep 14, 2026
test-matrix (3.9) has failed on main since #187: with pandas 1.5, the streaming state converted numeric columns via pd.to_numeric(s).to_numpy(dtype="float64"), which raises "cannot convert to 'float64'-dtype NumPy array with missing values" for nullable (masked) integer columns with NA. fd.clean_timeseries and StreamingCleaner hit it on any Int*/UInt* column with gaps. Pass na_value=np.nan there and in the time-series interpolation helper, which has the same conversion. Also pin the alert step #188 added to fetch-fixtures.yml, which #190's SHA sweep predated.
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 scheduled Refresh online fixtures workflow has failed three weeks running (08-31, 09-07, 09-14). The 09-14 run died on:
_downloadmade a singleurlopencall with no retry.RemoteDisconnected(andIncompleteRead) subclassHTTPException/OSError, notURLError, so the per-datasetexceptdidn't catch them. One dropped connection fromarchive.ics.uci.eduaborted the entire run, and every remaining dataset was skipped. Caught failures (e.g. the 08-31Connection reset by peer) also turned the job red, because any single failure exited 1.Changes
scripts/fixture_download.py(new):download()retriesOSError/HTTPException, HTTP 429 and 5xx with exponential backoff and jitter (4 attempts). Permanent 4xx errors are raised immediately; once retries run out it raisesTransientFetchError.scripts/fetch_online_fixtures.py:--max-failures Nsets how many network failures are tolerated (default 0). Dataset failures always fail the run.::warning::annotations under GitHub Actions.tests/expectations.py: the live-fetch helper reusesdownload()..github/workflows/fetch-fixtures.yml:--max-failures 2.if: always()and-m "not online"; the live fetch already ran in the previous step.nightly-failureissue on scheduled failures, like the other nightly lanes.Tests
New
tests/test_fixture_download.py(11 tests, no network):RemoteDisconnectedand connection reset, with backoffmain()keeps going after a network failure and respects the budgetResults:
pytest tests/test_fixture_download.py: 11 passedpytest tests/test_online_datasets.py -m "not online": 170 passedruff checkon the changed files: clean