-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
nix log
should also work if the log didn't provide any output
#6051
Conversation
A few notes: * The `echo hi` is needed to make sure that a file that can be read by `nix log` is properly created (i.e. some output is needed). This is known and to be fixed in NixOS#6051. * We explicitly ignore the floating-CA case here: the `$out` of `input3` depends on `$out` of `input2`. This means that there are actually two derivations - I assume that this is because at eval time (i.e. `nix-instantiate -A`) the hash of `input2` isn't known yet and the other .drv is created as soon as `input2` was built. This is another issue on its own, so we ignore the case here explicitly.
3429b18
to
082104b
Compare
@edolstra rebased onto latest master to resolve the merge-conflict. Anything else to fix here? Would love to see this bugfix being merged :) |
A few notes: * The `echo hi` is needed to make sure that a file that can be read by `nix log` is properly created (i.e. some output is needed). This is known and to be fixed in NixOS#6051. * We explicitly ignore the floating-CA case here: the `$out` of `input3` depends on `$out` of `input2`. This means that there are actually two derivations - I assume that this is because at eval time (i.e. `nix-instantiate -A`) the hash of `input2` isn't known yet and the other .drv is created as soon as `input2` was built. This is another issue on its own, so we ignore the case here explicitly.
A few notes: * The `echo hi` is needed to make sure that a file that can be read by `nix log` is properly created (i.e. some output is needed). This is known and to be fixed in NixOS#6051. * We explicitly ignore the floating-CA case here: the `$out` of `input3` depends on `$out` of `input2`. This means that there are actually two derivations - I assume that this is because at eval time (i.e. `nix-instantiate -A`) the hash of `input2` isn't known yet and the other .drv is created as soon as `input2` was built. This is another issue on its own, so we ignore the case here explicitly.
082104b
to
a008722
Compare
this->source = &source; | ||
|
||
if (!raw) { | ||
archive_read_support_filter_all(archive); |
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.
factor out?
Rebased onto latest master to resolve the merge conflict. May I ask if there was any other reason that this didn't land in 2.7 other than the merge-conflict?
Personally I'm not a big fan of delaying (trivial) bugfixes with these kinds of requests, especially if the fix is a single revert. But if you want me to, why not, otherwise I'd suggest to do this in a different PR. |
ping @edolstra @thufschmitt :) |
cc @edolstra @thufschmitt anything missing here? :) |
This reverts commit 50a3586. With this change Nix fails to open bzip2 logfiles that were created from builds with no stdout/stderr.
@edolstra done! (also rebased against master) |
Thanks! |
According to
git bisect
this was introduced by 50a3586To summarize: while trying to update Hydra to use Nix 2.6, I realized that
yath t/queue-runner/notifications.t
is failing because it initially builds a derivation (and the builder doesn't write anything tostdout
/stderr
). After that it's checked if e.g.nix log
succeeds.While this was the case on the Nix 2.4pre rev of Hydra, it isn't the case anymore on Nix 2.6.
While bisecting I found the problem, it seems as if
init()
wrongly setsarchive_read_support_filter_all
ifraw
would betrue
.Also added a regression-test that I used for bisecting.
cc @edolstra