Skip to content

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

@jtmoon79

Description

@jtmoon79

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0most importantbugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions