-
-
Notifications
You must be signed in to change notification settings - Fork 14.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
Nextflow: When using docker and enabling tracing, processes fail within the docker containers due to paths to /nix/store/bash #350183
Comments
Here's a change which will add two more test cases, leading to failures:
|
@stianlagstad Thank you for the detailed report. I vaguely remember that I had looked into the traced-scenario and that something was problematic but I must have lost attention. Sorry about that. I'll have a look into this. |
Please don't apologize! Thank you again for the good work in #339197 💯 I'm trying myself to iterate on a modified Update: I've created an issue for this on the nextflow side: nextflow-io/nextflow#5420 |
Ah, yes, me, too :) I have something working already see here but I'm not totally satisfied. I will iterate and then open a PR upstream. |
Okay, I updated my nextflow-patch and also created a nixpkgs branch that uses this new version and doesn't need to patch anything anymore. You should be able to run it like so
(Mind that it's a newer version of nextflow). Would be great if you could try this out. I have adapted the NixOS-tests based on your suggestions (see here) and they pass. If we're both satisfied, I'll open a PR upstream as well as for nixpkgs. Let's see whether we can get that integrated into upstream. |
Thank you @rollf ! Do I understand this correctly?
If I understand that correctly then there are some objections to this (using
I also pointed to those in my issue in the nextflow repo: nextflow-io/nextflow#5420. I can confirm however that your fix works for my use case. |
Yes.
Yes, I had read those except the issue you raised, so thanks for pointing them out again. I still think what I propose is reasonable because a) it does keep
Okay, I'll open a PR upstream. If it does not get accepted, then we'll need to keep the patch within nixpkgs 🤷 . |
Here is the upstream PR. We'll have to wait for CI, too. |
@stianlagstad I have spent much more time now to improve both on the nextflow as well as on the Nixpkgs side and updated both branches / the upstream PR. |
Describe the bug
I'm using
nextflow
, as packaged in #339197, from the current unstable channel. This new packaging of nextflow has a patch to make sure the correct paths to bash is used depending on whether docker is enabled for the nextflow workflow run or not:nixpkgs/pkgs/development/interpreters/nextflow/default.nix
Lines 36 to 45 in ccc0c21
The problem is in the
.command.run
file, where not all occurrences of paths to bash is handled correctly by the postPath. When I enable tracing in addition to docker, then the command in.command.run
changes from this:to this:
The addition of
nxf_trace
at the end there takes the bash script into the functionnxf_trace_linux
(ornxf_trace_mac
is on mac), where there's a hardcoded path to the nix store-provided bash:This nix store-provided bash path should not be there as I enabled docker, but it remains, and causes the process to fail.
An additional occurrence of the nix store-provided bash path is present in the shebang of the
.command.sh
file, although it makes no difference to the result of the workflow run.Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected the workflow run to succeed, and that the files
.command.run
and.command.sh
should have no occurrences of paths to the nix store.Screenshots
NA
Additional context
NA
Notify maintainers
@edmundmiller @Etjean @rollf
Metadata
The text was updated successfully, but these errors were encountered: