Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github step moonrepo/setup-rust fails with Cache service responded with 429 #360

Open
jtmoon79 opened this issue Dec 16, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers P0 most important

Comments

@jtmoon79
Copy link
Owner

jtmoon79 commented Dec 16, 2024

Describe the bug

Any github workflow step in .github/workflows/rust.yml that uses moonrepo/setup-rust@v1 often fails when multiple Actions occur simultaneously.

Cache upload failed because file read failed with EBADF: bad file descriptor, read

During the automatic follow-on step Post Run moonrepo/setup-rust@v1, a failure like the following will occur

 Saving cache with key setup-rustcargo-v1-win32-40904461f021bd34a5185af363990422ea730a62
"C:\Program Files\Git\usr\bin\tar.exe" --posix -cf cache.tzst --exclude cache.tzst -P -C D:/a/super-speedy-syslog-searcher/super-speedy-syslog-searcher --files-from manifest.txt --force-local --use-compress-program "zstd -T0"
Warning: Failed to save: Cache service responded with 429 during upload chunk.
D:\a\_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> (D:\a\_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:272:9
    at FSReqCallback.wrapper [as oncomplete] (node:fs:682:5)

This often occurs with dependabot as it posts all of it's PRs at the same second on Sunday night.

To Reproduce

Run more than one github Action at once. Three usually induces it.

Environment:

  • OS: windows-latest, macos-latest, linux-latest

Solution

Replace moonrepo/setup-rust@v1 with an equivalent caching solution, or remove it entirely.

@jtmoon79 jtmoon79 added bug Something isn't working good first issue Good for newcomers P0 most important labels Dec 16, 2024
@jtmoon79 jtmoon79 changed the title github moonrepo/setup-rust fails with 'bad file descriptor' github step moonrepo/setup-rust fails with _bad file descriptor) Dec 16, 2024
@jtmoon79 jtmoon79 changed the title github step moonrepo/setup-rust fails with _bad file descriptor) github step moonrepo/setup-rust fails with _bad file descriptor_ Dec 16, 2024
@jtmoon79
Copy link
Owner Author

jtmoon79 commented Dec 16, 2024

Relates to moonrepo/setup-rust#23 , moonrepo/setup-rust#24

@jtmoon79 jtmoon79 changed the title github step moonrepo/setup-rust fails with _bad file descriptor_ github step moonrepo/setup-rust fails with _Cache service responded with 429_ Dec 16, 2024
jtmoon79 added a commit that referenced this issue Dec 21, 2024
@jtmoon79 jtmoon79 changed the title github step moonrepo/setup-rust fails with _Cache service responded with 429_ github step moonrepo/setup-rust fails with Cache service responded with 429 Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers P0 most important
Projects
None yet
Development

No branches or pull requests

1 participant