Repository navigation
Conversation
Every test job downloads the test dataset (~30 MB) from OSF. With many jobs running at once OSF starts refusing the downloads with HTTP 403, which makes the test runs fail for reasons unrelated to the change being tested. Keep the downloaded files (tempfile.gettempdir()/tract_querier, i.e. /tmp/tract_querier on the runners) in the Actions cache, keyed on the dataset definitions in tract_querier/tests/datasets.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Every test job downloads the test dataset (~30 MB) from OSF (
tract_querier/tests/datasets.py). With many PRs running CI at once, OSF starts refusing the downloads: the open PRs #123, #124 and #125 fail in 2–5 jobs each withurllib.error.HTTPError: HTTP Error 403: Forbiddenintest_tract_math.py, unrelated to their changes. The same files download fine when requested individually.Change
.github/workflows/test_package.yaml: add anactions/cachestep for the download directory (tempfile.gettempdir()/tract_querier, i.e./tmp/tract_querieron the Ubuntu runners), keyed on the hash oftract_querier/tests/datasets.py, so the key changes whenever the dataset URLs or checksums change.datasets.pyalready skips files whose MD5 matches, so a restored cache means no download at all.Merge order
Merge this early.
pull_requestruns test the PR merged into the currentmaster, so once this is onmaster(and amasterrun has saved the cache), re-running the failed jobs of the open PRs picks up the cache without rebasing them.Testing
datasets.py(tempfile.gettempdir(),/tmpon the runners).🤖 Generated with Claude Code