setup-rust icon indicating copy to clipboard operation
setup-rust copied to clipboard

rate limit failed ci due to failure to upload cache

Open alon-dotan-starkware opened this issue 1 year ago • 5 comments

we using lot of steps in our ci, which brings use pretty often to scenarios when we hit the API rate limits... for example:

Warning: Failed to save: Cache service responded with 429 during upload chunk.
/home/runner/work/_actions/moonrepo/setup-rust/v1/dist/post/index.js:475
                        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> (/home/runner/work/_actions/moonrepo/setup-rust/v1/dist/post/index.js:475:31)
    at ReadStream.emit (node:events:519:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at errorOrDestroy (node:internal/streams/destroy:238:7)
    at node:internal/fs/streams:[27](https://github.com/starkware-libs/sequencer/actions/runs/10980431063/job/30486199032?pr=913#step:25:27)2:9
    at FSReqCallback.wrapper [as oncomplete] (node:fs:682:5)

Is it possible to make the upload cache flow optional and to do not failed the entire ci when the upload is not available?

alon-dotan-starkware avatar Sep 22 '24 10:09 alon-dotan-starkware

@alon-dotan-starkware Do you happen to know in what situations this triggers?

milesj avatar Sep 23 '24 04:09 milesj

When we have many actions running and we reaching github API rate limits

alon-dotan-starkware avatar Sep 23 '24 05:09 alon-dotan-starkware

#24

alon-dotan-starkware avatar Sep 23 '24 08:09 alon-dotan-starkware

@alon-dotan-starkware Does the rate limit go away if you set the following?

env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

milesj avatar Sep 23 '24 16:09 milesj

No, its very common issue you can see it a cross multiple plugins, its based in poor impl.of the http client under the toolkit package

alon-dotan-starkware avatar Sep 23 '24 16:09 alon-dotan-starkware