build: fetch LFS test data before the suites run - #4106
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #4106 +/- ##
==========================================
- Coverage 78.60% 78.59% -0.01%
==========================================
Files 1460 1460
Lines 138234 138234
Branches 11881 11881
==========================================
- Hits 108656 108644 -12
- Misses 26240 26245 +5
- Partials 3338 3345 +7
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
| include=() | ||
| for f in data/.lfs/*.tar.gz; do | ||
| n=$(basename "$f" .tar.gz) | ||
| if grep -rqF -e "\"$n\"" -e "'$n'" --include='test_*.py' --include='conftest.py' dimos; then |
There was a problem hiding this comment.
Dynamic archives skip prefetch
This scan only matches complete archive roots written as quoted literals. The parametrized gradient test constructs gradient_{method}.png at runtime, so gradient_simple.png.tar.gz and gradient_voronoi.png.tar.gz are not included. Those tests still download LFS data while running, which can exhaust their timeout and leave the test session waiting.
Artifacts
- Authored and executed shell validation AST-resolves the gradient test's parametrized f-string and applies the changed script's exact scan predicate, showing the two required archive names are excluded.
- Captured output from `bash trex-artifacts/pr4106-archive-discovery-validation.sh` in `/home/user/repo` exits 0 and shows both existing required gradient archives are undiscovered, confirming the finding.
295837e to
5e4ad09
Compare
Problem
Tests pull their LFS archives lazily inside the test. On a normal link a 1.2 GB archive takes longer than the 600 s per-test timeout: the worker is killed and the session hangs. Same root cause as #2119.
Solution
bin/fetch-test-data pulls every archive a test references; pytest-slow/all/coverage call it first, like build-test-natives. Three setup lines in docs/development/testing.md (fetch, playwright browsers, -n 8 on laptops).
How to test
bin/fetch-test-data && bin/pytest-all --numprocesses=8Lists 40 archives; no in-test LFS pull afterwards.
AI assistance
Used Fable 5.1 extensively for root cause analysis, fix and testing.
Checklist