nix copy --substitute-on-destination
shouldn't fail if a substituter isn't reachable #686
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#686
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
Part of my deployment process is to do
nix copy --substitute-on-destination /nix/store.. --to ssh-ng://target-host
.If said host has broken DNS or my binary cache is down, it fails like this:
This is a little problematic because I usually encounter these situations when I broke something with a bad configuration and I try to deploy a fix.
I do have a
connect-timeout
configured and I know that this works as documented. Given the logs of the progress bar it seems as ifqueryValidPaths
on the remote side is what's failing hard.Steps To Reproduce
systemctl stop kresd@1
on the target host (or whatever you need to do to not have DNS)nix copy --substitute-on-destination $(nix-build '<nixpkgs>' -A hello) --to ssh-ng://target-host
Expected behavior
In the case above the store-path in question existed on my local machine. Hence, I'd expect Nix to ignore the unavailable substituter and copy the path.
If the path doesn't exist on my local machine, it should fail hard, but with a different error (something along the lines of "remote host can't reach the substituter, path cannot be uploaded since it's not in $store").
nix --version
outputlocal side:
remote side:
Additional context
Add any other context about the problem here.
i believe there are some related substitution failure issues somewhere on the tracker but thanks for reporting this one!