-
-
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
remote-store: don't log raw stderr by default #3558
Conversation
Actually this breaks build output of nix-build when talking to the daemon. So it seems the daemon case handles this somewhere else. |
For remote stores the log messages are already forwarded as structured STDERR_RESULT messages so the old format is duplicate information. But still included with -vvv since it could be useful for debugging problems. $ nix build -L /nix/store/nl71b2niws857ffiaggyrkjwgx9jjzc0-foo.drv --store ssh-ng://localhost Hello World! foo> Hello World! [1/0/1 built] building foo Fixes NixOS#3556
The raw stderr output isn't logged anymore so the build logs need to be printed by the default logger in order for the old commands like nix-build to still show build output.
@LnL7 Is this ready to be merged (given your last comment)? |
Yeah, that last commit resolves it. Not entirely clear why the daemon doesn't currently suffer from this however, something related to the fact that ssh is going through the protocol twice since I'm not using root? (client -> ssh -> deamon) |
Thanks! |
Oh indeed 😕, I didn't notice that yet. |
Only for fixed output drvs however |
The following works for nix-build, but the new commands still won't show anything without diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 147093fa..a81d0101 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -3695,6 +3695,9 @@ void DerivationGoal::registerOutputs()
/* Throw an error after registering the path as
valid. */
worker.hashMismatch = true;
+ worker.act.result(resBuildLogLine, fmt("hash mismatch in fixed-output derivation '%s':", worker.store.printStorePath(dest)));
+ worker.act.result(resBuildLogLine, fmt(" wanted: %s", h.to_string(SRI)));
+ worker.act.result(resBuildLogLine, fmt(" got: %s", h2.to_string(SRI)));
delayedException = std::make_exception_ptr(
BuildError("hash mismatch in fixed-output derivation '%s':\n wanted: %s\n got: %s",
worker.store.printStorePath(dest), h.to_string(SRI), h2.to_string(SRI)));
|
I'll revert this for now until we figure out what to do. |
This reverts commit 3ebfbec, reversing changes made to c089c52. NixOS/nix#3558
For remote stores the log messages are already forwarded as structured
STDERR_RESULT messages so the old format is duplicate information. But
still included with -vvv since it could be useful for debugging
problems.
Fixes #3556