Repository navigation
ci(unit-tests): cache the tshark .deb files and retry apt on a fallback mirror (#1432) - #1438
Conversation
|
Coverage: 89.45% (unit tier, Python 3.14,
Per-file detail: the |
|
Verdict: NEEDS CHANGES at
The worker is adding the tests. |
…ck mirror (#1432) The apt install in engine-tests and pypcap-parity kept failing on a slow, not dead, azure.archive.ubuntu.com: ~75 kB/s on 2026-10-08, so timeout 180 killed both attempts at the 23.7 MB libwireshark17t64, three times. - Cache the downloaded .deb files with actions/cache, keyed on ImageOS, arch, the job's package set and a digest of `apt-get install -s`'s `Inst` lines, so a warm run downloads nothing and any new version is a new key. Only the installed versions are collected, and only one job per key saves (APT_CACHE_SAVE), so the parity cells do not race. - Before the retry, drop azure from /etc/apt/apt-mirrors.txt, since apt only fails over on an error; the partial download resumes. - The install step's update/install loop, its 60s/180s bounds, the 10-minute cap and the ::warning annotations are unchanged. - Add tests/project/test_workflow_apt_cache.py: mirror drop, package lists vs install operands, key format, one saver per key. - Shift the docs' unit-tests.yml line citations by the added 188 lines. tests/project: 420 tests OK. Both jobs' scripts dry-run in ubuntu:24.04. Closes #1432
650fa45 to
bc76d3e
Compare
|
Verdict: GOOD TO GO at
|
make pylint,make mypy,make isort)make testpasses, and a test case covers the change (tests/project: 420 OK; newtest_workflow_apt_cache.pypins the mirror fallback, package-list agreement, cache key and single saver;TestAptRetrystill pins the install loop)What is the purpose of your pull request?
ci— workflows or build toolingDescription of your pull request and other information
Closes #1432. Both apt sites (
engine-tests,pypcap-parity) now plan, restore, seed, install, collect and save:.debcache (actions/cache, which works undercontents: read). The key is ImageOS + arch + package set + a digest ofapt-get install -s'sInstlines, so any new version makes a new key.restore-keysreuses an older set, apt checks each file's hash against the signed index, and only the installed versions get saved./etc/apt/apt-mirrors.txt, because apt only fails over on an error. The partial download resumes.::warnings are unchanged.TestAptRetrypins the bounds.unit-tests.yml:Ncitations move by +188 lines (pinned byTestDocCitationsResolve).Checked in
ubuntu:24.04. A cold run at 600 kB/s with a 50s bound failed attempt 1, switched to archive.ubuntu.com, fetched only 11.2 of the 24.4 MB left, and succeeded. A warm run printedNeed to get 0 B(7s).What to look for in this PR's CI: every job is a cold miss. Expect
Plan …to print a key andSave …to store it. A rerun should showSeeded N .deb filesandNeed to get 0 B.APT_CACHE_SAVE), so the matrix cells no longer race on one key.