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

libstore: consider a resolution error as a NotFound #2934

Closed
wants to merge 1 commit into from

Conversation

grahamc
Copy link
Member

@grahamc grahamc commented Jun 10, 2019

My biggest problem with flights: figuring out how to make nix stop trying to fetch from cache when there is no network.

Would love it to not even try if no network interfaces are up, instead of figuring out what flag to use.

Maybe hack on that?
-- https://twitter.com/ProgrammerDude/status/1138090058727264256

@roberth
Copy link
Member

roberth commented Jun 10, 2019

This may not always be a desirable behavior, for use cases where detecting errors early is desirable, such as in build farms. The expected symptom is a slowdown, the size of which is hard to estimate without real world testing.
Yet, lacking this information, I do expect that this PR is a net improvement.

@grahamc
Copy link
Member Author

grahamc commented Jun 10, 2019

For build farms: do they substitute? I'm not sure builders in a build farm do substitute.

@grahamc
Copy link
Member Author

grahamc commented Jun 10, 2019

ie: I think the controlling system does the substitution on their behalf.

@cleverca22
Copy link
Contributor

https://github.com/NixOS/hydra/blob/5dd4736aedc1d1356c54bd737db813e25192a885/src/hydra-queue-runner/build-remote.cc#L92-L98

PathSet queryValidPaths(const PathSet & paths,
SubstituteFlag maybeSubstitute = NoSubstitute) override
{
auto conn(connections->get());
conn->to
<< cmdQueryValidPaths
<< false // lock
<< maybeSubstitute
<< paths;
conn->to.flush();
return readStorePaths<PathSet>(*this, conn->from);
}

when asking a build slave what it has, you give it a boolean, saying if you will allow it to check the cache

so the queryValidPaths function may infact trigger large amounts of network traffic

@grahamc
Copy link
Member Author

grahamc commented Jul 3, 2019

Nix has a --no-net flag in master, so closing.

@grahamc grahamc closed this Jul 3, 2019
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.

None yet

3 participants