-
-
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
Allow substituting paths when building remotely using ssh-ng://
#4180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent change!
f1c0300
to
db19618
Compare
@edolstra does this look OK to you as well? :) |
ping @edolstra anything missing to get this merged? %) |
|
@edolstra so you mean that the daemon (and store) workers should invoke |
Until now, it was not possible to substitute missing paths from e.g. `https://cache.nixos.org` on a remote server when building on it using the new `ssh-ng` protocol. This is because every store implementation except legacy `ssh://` ignores the substitution flag passed to `Store::queryValidPaths` while the `legacy-ssh-store` substitutes the remote store using `cmdQueryValidPaths` when the remote store is opened with `nix-store --serve`. This patch slightly modifies the daemon protocol to allow passing an integer value suggesting whether to substitute missing paths during `wopQueryValidPaths`. To implement this on the daemon-side, the substitution logic from `nix-store --serve` has been moved into a protected method named `Store::substitutePaths` which gets currently called from `LocalStore::queryValidPaths` and `Store::queryValidPaths` if `maybeSubstitute` is `true`. Fixes NixOS#2770
db19618
to
3a63fc6
Compare
@edolstra the |
ping @edolstra anything else tbd here to get this merged? :) |
@edolstra any updates here? :) |
Thanks! |
Until now, it was not possible to substitute missing paths from e.g.
https://cache.nixos.org
on a remote server when building on it usingthe new
ssh-ng
protocol.This is because every store implementation except legacy
ssh://
ignores the substitution flag passed to
Store::queryValidPaths
whilethe
legacy-ssh-store
substitutes the remote store usingcmdQueryValidPaths
when the remote store is opened withnix-store --serve
.This patch slightly modifies the daemon protocol to allow passing an
integer value suggesting whether to substitute missing paths during
wopQueryValidPaths
. To implement this on the daemon-side, thesubstitution logic from
nix-store --serve
has been moved into aprotected method named
Store::substitutePaths
which gets currentlycalled from
LocalStore::queryValidPaths
andStore::queryValidPaths
if
maybeSubstitute
istrue
.Fixes #2770
cc @elaforge @edolstra @Ericson2314 @lheckemann