-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
flakes: Locking on effective urls breaks fetching github releases (and probably other things) #4672
Comments
As the author of #4595, I was unaware of this situation and I think it is fine to revert it |
Would it be possible to introduce a switch (e.g. similiar to |
I don't think it's worth it, considering that using redirect to work with channels is pretty niche, and it's also surprising. Any other use case for locking on the redirect destination? |
I don't know of any other case... and working with channels in flakes is probably also rather niche... |
You could have a |
This reverts commit fc6bfb2. Locking on the redirect destination proved to be problematic for some URLs. For example, GitHub releases downloads redirect to URLs that expire after some time, which would be broken by this behavior. Fixes NixOS#4672.
Thanks, I've reverted it. |
Describe the bug
Before #4595 was merged we used flakes to lock and fetch github releases. Github uses redirects to so-called signed urls which expire after some time. This means that any flake.lock will, after the merge of #4595, contain unusable urls.
The intention of the merged pull request seems to have been to enable locking of nixos channels which ALSO uses redirects but for a different purpose. I see how that might be useful but I still question the point of enabling the use of nixos channels when flakes are supposed to replace them in the end.
In any case - that merge broke many of of our projects so that we cannot update flake inputs anymore unless we use an older version of Nix.
Steps To Reproduce
nix flake update
.Expected behavior
The old behavior of NOT following the redirect.
nix-env --version
nix-env (Nix) 2.4pre20210317_8a5203dThe text was updated successfully, but these errors were encountered: