CI: the cold cache clear fails when the warm leg's save does not finish

scripts/ci-clear-rolling-cache.py deletes the old rolling entries when
the cache warm leg's Post Setup step starts. It used to exit 0 at that
point, so a save that was canceled or failed afterwards left no rolling
entry while the job passed. The script now keeps polling the leg until
Post Setup completes or the leg ends, within the same 160-minute limit,
and exits 1 unless the save succeeded. A failure in a later post step
does not count once the save has succeeded. The header and the ci.yml
comment describe this, and say that the next run then starts cold.

Three new tests run main() with recorded API answers: a save that
succeeds after the deletion exits 0, and a save that is canceled or
fails after it exits 1.
This commit is contained in:
dotCooCoo committed 2026-11-27 20:58:32 -08:00
1 parent 6927affc24
commit 5df004faff
3 files changed
+86 -11

No files matched your search

+2 -2
View File
@@ -88,8 +88,8 @@ jobs:
# while the cold run saves its own: two entries of about 4.6 GB, which with the others go over the
# 10 GB cache limit and get the corpus, SonarCloud and Windows ARM64 entries evicted. This deletes
# the old entries when the `cache warm` leg starts saving (scripts/ci-clear-rolling-cache.py).
# When the leg fails or is canceled it saves nothing, and this job fails too, so "Re-run failed
# jobs" runs it again beside the re-run leg. The script's 160-minute wait starts when the leg
# When the leg fails or is canceled, before its save or during it, this job fails too, so "Re-run
# failed jobs" runs it again beside the re-run leg. The script's 160-minute wait starts when the leg
# starts, which is after `gate / select legs` and a free runner, so this job's timeout leaves
# 40 minutes for that.
cold-cache-clear: