-
Notifications
You must be signed in to change notification settings - Fork 655
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
Implicit variables are null when using kuberun #1050
Comments
Made some tests but I was not able to replicate this |
@pditommaso Could you be more specific? Do you have a kubernetes cluster that you could test it on? Also I'm using 19.01 but is there an easy way to test the latest build, like a nightly build? |
I'm using a local K8s cluster deployed along with Docker.
Yes, you can try latest edge release using this command:
Or exporting the NXF_VER variable in your (host) environment and using NF as usual. |
It looks like
Could we change nextflow so that it doesn't evaluate variables like |
ah, this helps a lot. Let me check. |
This is quite tricky to solve. Unfortunately, for now, you will need to avoid the use |
Yes I suspected it might be that way. It's no problem, I can work around it pretty easily. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Just wanted to add that |
Paolo pointed me to this issue. I might have similar issue as functions from nextflow.config are not passed when using kuberun which make some pipelines to fail, e.g., nf-core/sarek. Is there any workaround for this? Our workaround is using patched nextflow binaries so that a hook is executed before running nextflow and adding the functions to pod's nextflow.config. Is there any possiblity to do it without patch? Or are you open to implementing some kind of hooks support? Can create PR for hooks. |
What if you include the functions in the main nextflow.config in the github repo? Does it work then? kuberun is really only intended for basic usage of k8s, so it doesn't support everything you might want to do. You can always fall back to doing manually what kuberun does automatically: create a yaml for a submitter pod that launches your nextflow pipeline with whatever options, then create the pod. In fact I created a script to do just this. I made it by reverse engineering the pod yaml that is generated by kuberun. IIRC it does not have any problem with implicit variables, and shouldn't have a problem with extra functions. Feel free to submit a PR based on your work. We might be able to figure out a solution from it. But in general it is recommended that you use an external service like Nextflow Tower to manage submitter pods instead of kuberun. |
Are you able to run nf-core/sarek pipeline then? I think you do not need any data as it fails on the functions. To be more clear, I do not use functions in my local nextflow.config. As can be seen here: (at the very end) there is a function check_resources. kuberun download this config from git (I know you can alter the local copy, but it is a bit ugly to me), it creates a config map from this config. In this config map, the function is missing and it fails as check_resources it not defined. So we created a script, that is injected into command of the master pod, this script simply appends the function to the nextflow.config from the config map. As of PR, I was wondering if adding script name to be executed in the master pod before executing nextflow itself would be accepted? If so, I will happily do PR. I suppose using cmdline option to specify path + scriptname? |
I will try nf-core/sarek with kuberun when I get a chance this week. But I understand the problem you describe. I don't think your general solution of injecting an arbitrary pre-script hook will be accepted into Nextflow. We might be able to fix this particular problem with kuberun. I will look into it when I get a chance, this week or next week hopefully. Either way, you can provision your own submitter node (like a head node on a HPC cluster) and launch the pipeline from that node using |
Well, I see that tower.nf offers to run pre-run script. So why not to add the same for CLI? |
Ah, I haven't played with that feature in Tower, so I'll have to look at it and see how it might be imitated in Nextflow itself. But also, if you're already using Tower then why do you still need kuberun? |
No, I just tried your demo to see what tower offers and see if it can be used by someone that is not familiar with nextflow and pipelines and cmd line. But some users still prefer CLI as they have a single shell script which they just need to run. |
I finally was able to spin up a GKE cluster and test the sarek pipeline. It fails with kuberun as you say, but I was able to get around kuberun by the following:
I provide the PVC through a config setting:
I used With Tower it makes to have a pre-run script because Tower is responsible for provisioning the head node. Nextflow isn't intended to provision head nodes in general, it just so happens that it can hack one together in k8s via If someone prefers the CLI, there is now a Tower CLI too. If they just have a small test and |
OK, thanks for testing. Do you know why We already run To conclude, if you say that |
Eventually I'd like to study how The other script in that repo, |
See also #870 (comment) |
Seems related to this: nextflow-io/rnaseq-nf#13 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing since we are moving away from kuberun. Use a workflow platform (e.g. Tower) to manage your submitter pods, or use Wave+Fusion to run Nextflow without a submitter pod / PVC. |
Bug report
Expected behavior and actual behavior
When I use
${baseDir}
in my config file, it is properly recognized when I run my pipeline usingnextflow run
:Where
nextflow.config
is taken fromnextflow.config.example
in the GEMmaker repo. However, when I try the same thing with kuberun, nextflow does not recognize${baseDir}
:Steps to reproduce the problem
See above example.
Program output
See above example.
Environment
The text was updated successfully, but these errors were encountered: