-
Notifications
You must be signed in to change notification settings - Fork 776
Closed
Labels
Description
Bug report
Expected behavior and actual behavior
use params in pod directive, such as k8s.pod, process.pod.
Steps to reproduce the problem
There are many places in nextflow.config where you can set up the pod configuration, so we need to discuss it in several different scenarios.
- set k8s.pod
[ label: 'label', value: 'label' ], [ env: 'env', value: 'env' ], [ annotation: 'annotation', value: 'annotation' ],
- It works well.
- set k8s.pod
[ label: 'label2', value: "${params.label}" ],
- It throws an error
nextflow.exception.ProcessSubmitException: Failed to submit K8s job -- Cause: class org.codehaus.groovy.runtime.GStringImpl cannot be cast to class java.lang.String (org.codehaus.groovy.runtime.GStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
- set k8s.pod
[ label: 'label', value: 'label' ], [ env: 'env', value: 'env' ], [ annotation: 'annotation', value: 'annotation' ], [ label: 'label2', value: "${params.label}" ],
- It throws an error
nextflow.exception.ProcessSubmitException: Failed to submit K8s job -- Cause: class org.codehaus.groovy.runtime.GStringImpl cannot be cast to class java.lang.String (org.codehaus.groovy.runtime.GStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
- set process.pod
[ label: 'label', value: 'label' ], [ env: 'env', value: 'env' ], [ annotation: 'annotation', value: 'annotation' ],
- It works well.
- set process.pod
[ label: 'label2', value: "${params.label}" ],
- It works well.
- set process.pod
[ label: 'label', value: 'label' ], [ env: 'env', value: 'env' ], [ annotation: 'annotation', value: 'annotation' ], [ label: 'label2', value: "${params.label}" ],
- It throws an error
nextflow.exception.ProcessSubmitException: Failed to submit K8s job -- Cause: class org.codehaus.groovy.runtime.GStringImpl cannot be cast to class java.lang.String (org.codehaus.groovy.runtime.GStringImpl is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
- set process.name.pod
pod label: 'label', value: 'label' pod env: 'env', value: 'env' pod annotation: 'annotation', value: 'annotation' pod label: 'label2', value: "${params.label}" pod label: 'label3', value: "${params.label}"
- It works well.
In conlusion, k8s.pod cannot set params. process.pod can only set one if params is set. process.name.pod works well.
Program output
.nextflow.log
Environment
- Nextflow version: nextflow/nextflow:25.04.6 docker image
- Java version: openjdk 21.0.7 2025-04-15 LTS
- Operating system: Linux
- Bash version: GNU bash, version 5.2.15(1)-release (x86_64-amazon-linux-gnu)
Additional context
The error is throw from K8sTaskHandler.groovy
Reactions are currently unavailable