moonrepo / setup-rust

A maintained GitHub action for setting up Rust and Cargo.
98 stars 9 forks source link

rate limit failed ci due to failure to upload cache #23

Open alon-dotan-starkware opened 1 month ago

alon-dotan-starkware commented 1 month ago

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?

milesj commented 1 month ago

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

alon-dotan-starkware commented 1 month ago

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

alon-dotan-starkware commented 1 month ago

24

milesj commented 1 month ago

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

env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
alon-dotan-starkware commented 1 month ago

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