Commit 2026-10-01 21:50 40dfeefd
View on Github āci(cache): bound the snapshot run lookup by creation date (#44171)
The get-cache action picks a master build.yml run and downloads its cache-snapshot artifact to warm the local cache.
GitHub returns at most 1,000 runs for a filtered run search. When more runs match, the answer can omit every recent run. The run queries in get-cache have no date range, so they match thousands of runs. A Build job can then warm from a run that is months old, or get no warm start because the artifact of that run has expired.
This PR makes these changes:
- Each run query has a
createdrange that starts at the retention cutoff. The range innewest_beforeends at the merge-base date, so the first result is the correct run. has_snapshotrejects an artifact after itsexpires_atdate.has_snapshotlogs the artifact dates of each run that it checks.gh apiprints an error response on stdout. Theapiwrapper discards the output of a failed call, so an error response does not become a run-id. š¤ Generated with Claude Code