toolkit
toolkit copied to clipboard
Cache upload does not handle 429 error
Describe the bug Occasionally, caching actions fail at Post step:
Post job cleanup.
/usr/bin/tar --posix --use-compress-program zstdmt -cf cache.tzst --exclude cache.tzst -P -C /runner/_work/beam/beam --files-from manifest.txt
Warning: Failed to save: Cache service responded with 429 during upload chunk.
/runner/_work/_actions/actions/setup-java/v3.8.0/dist/cleanup/index.js:401
throw new Error(`Cache upload failed because file read failed with ${error.message}`);
^
Error: Cache upload failed because file read failed with EBADF: bad file descriptor, read
at ReadStream.<anonymous> (/runner/_work/_actions/actions/setup-java/v3.8.0/dist/cleanup/index.js:401:31)
at ReadStream.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at errorOrDestroy (node:internal/streams/destroy:220:7)
at node:internal/fs/streams:262:9
at FSReqCallback.wrapper [as oncomplete] (node:fs:671:5)
Example run: https://github.com/apache/beam/actions/runs/6307333506/job/17123805683?pr=28079
A solution could be ignore this transient error similar to here: https://github.com/coursier/cache-action/issues/131
Additional context original issue: https://github.com/actions/setup-java/issues/543
We hit this many times tonight. Example.
I have the same issue downloading from the cache fails often because Ratelimit exceeded:
As noted in https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28#exceeding-the-rate-limit The delay needed for a retry can bei read in the http response.
Also seeing this issue.
Example workflow from open source repo (this was on https://github.com/synapsecns/sanguine/pull/2739 )
Seeing this issue regularly today