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 develop does not print output in GitLab CI #4228
Comments
Similarly, command |
Maybe what's described in #4234 is the underlying issue here. 👀 |
Technically you can switch to the “old” logging format by passing |
I don't really understand the problem I'm having well, so I am not sure if you are addressing me, @regnat. I did try switching the log format on the weekend and that did not change anything as you can see from the pipeline run that is linked there. |
Oh sorry, I was actually answering @expipiplus1's comment. And it's probably unrelated to your own issue. As for your issue, I think your usage of (I also don't think it's related to #4234 because the gitlab runner isn't using a Nix daemon − besides the output of the |
You're right, thanks. I made that mistake when trying to come up with a simple example to reproduce my issue. Still I think |
Yup', I totally agree. And there's indeed something strange going on with the stderr of $ nix develop nixpkgs#hello --command make
warning: unknown setting 'extra-sandbox-paths'
make: *** No targets specified and no makefile found. Stop.
$ nix develop nixpkgs#hello --command make |& cat
warning: unknown setting 'extra-sandbox-paths'
**hangs** I looked at this a bit, and what I think happens is that I guess this could be fixed either by passing |
This might actually be fixed by #4233 |
I found this issue when
I went searching for answers and this issue seemed the most relevant. In case anyone happens to be here while facing the same problem, adding the Full command in my case:
|
Describe the bug
I'm trying to use the new nix command in CI.
If I run
nix develop nixpkgs#tree --command tree
locally, it produces the following outputIf i run the same thing in a GitLab CI Runner, it produces the following output
So there is no output from the actual
nix develop command
.I ran into this when running actual cargo and python tests via
nix develop
so it's not specific to the tree command. I just could not think of a better minimal example.Steps To Reproduce
I have published a repo with an assigned CI Runner that produces this error. You can take a look at that repo and the output CI pipline in GitLab.
The runner I'm using is a NixOS based GitLab Runner that I have set up in the cloud. The builds I originally ran were run on a completely different host, but I could reproduce it with my own Runner, so I think you should be able to too.
I am happy to try out a few suggested modifications or provide access to my setup. Here is the config for the runner.
Expected behavior
Same output to the terminal in CI as well as I got when running locally.
Additional context
I have created a few different kinds of Runners wit the GitLab Runner module in nixpkgs. Each branch in my repo uses a different kind of runner, but the all run into the same issue.
I never got any output from cargo. Python would at least give me some output when the a builder failed, like so:
Additinally for the python build the
lines were always present. This is something that mach-nix prints.
My suspicion
It looks like there is just no output from the actual execution. Since locally
nix develop
redraws lines while it's downloading I suspect that might cause the issue if there is no graceful fallback for a less capable terminal.One thing I tried was setting
$TERM
toansi
ordumb
, but that did not help and I don't know enough about terminals to know what else to try, or how to try and confirm that suspicion without the GitLab Runner.The text was updated successfully, but these errors were encountered: