toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

Cache upload does not handle 429 error

Open dsame opened this issue 1 year ago • 4 comments

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

dsame avatar Nov 30 '23 08:11 dsame

We hit this many times tonight. Example.

paulschreiber avatar Mar 30 '24 04:03 paulschreiber

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.

sidey79 avatar Apr 21 '24 08:04 sidey79

Also seeing this issue.

Example workflow from open source repo (this was on https://github.com/synapsecns/sanguine/pull/2739 ) image

trajan0x avatar Jun 20 '24 05:06 trajan0x

Seeing this issue regularly today

dan-blanchard avatar Jun 26 '24 15:06 dan-blanchard