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

Pass through HTTP 429 to the nix daemon #35

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

Kiskae
Copy link
Contributor

@Kiskae Kiskae commented Nov 10, 2023

Although the README / #17 documents that 429 is known to cause a substitution error, I've not found any reason why this error can't be passed through to the nix-daemon so it will attempt to retry the substitution after a delay rather than completely disabling the cache.

The nix daemon even has specific behavior for this case: https://github.com/NixOS/nix/blob/df9bd755a115ecdcdf6566c39167aad3d1b08da2/src/libstore/filetransfer.cc#L415

@Kiskae
Copy link
Contributor Author

Kiskae commented Nov 10, 2023

Tried to see if there was a source for the current behavior, but the only source appears to be commit f698478 by @zhaofengli

@Kiskae
Copy link
Contributor Author

Kiskae commented Nov 15, 2023

I did consider whether the Retry-After header could be passed on as well, but the nix daemon doesn't honor it and it would require adding another error to the gha crate. So it probably isn't worth the additional complexity.

Copy link

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks eminently sensible to me. @zhaofengli?

@edolstra edolstra merged commit fbf0bbe into DeterminateSystems:main Mar 4, 2024
5 checks passed
@Kiskae Kiskae deleted the pass-through-429 branch March 4, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants