Fix IllegalArgumentException when process.resourceLabels is a closure#7068
Merged
pditommaso merged 1 commit intomasterfrom Apr 24, 2026
Merged
Fix IllegalArgumentException when process.resourceLabels is a closure#7068pditommaso merged 1 commit intomasterfrom
pditommaso merged 1 commit intomasterfrom
Conversation
In the nf-seqera executor, computeRunResourceLabels read the raw process.resourceLabels value from the session config. When the directive is defined dynamically (as a closure), the value was passed to Labels.toStringMap which rejected it as a non-Map, aborting execution. Closure-based resourceLabels typically reference task-scoped bindings (task.process, task.hash, ...) and cannot be meaningfully evaluated at the run level. Skip them at run level with a debug log; per-task resolution via TaskConfig.getResourceLabels continues to resolve the closure with the task binding as before. Signed-off-by: Paolo Di Tommaso <paolo@seqera.io> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
✅ Deploy Preview for nextflow-docs-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SeqeraExecutor.computeRunResourceLabels(introduced in Honour process.resourceLabels in nf-seqera executor #7048) reads the rawprocess.resourceLabelsvalue from the session config and passes it toLabels.toStringMap. When the directive is defined dynamically (as a closure), the value is not aMapand execution aborts withIllegalArgumentException: Invalid value for 'resourceLabels' directive - expected a map of key/value pairs, got '..._closure...'.resourceLabelstypically reference task-scoped bindings (task.process,task.hash, ...) and cannot be meaningfully evaluated at the run level. Skip them at run level with a debug log; per-task resolution viaTaskConfig.getResourceLabelscontinues to resolve the closure with the task binding as before.Test plan
should skip run resource labels when process.resourceLabels is a closurefails before the fix and passes after.SeqeraExecutorTestsuite still green.process { resourceLabels = { [...] } }against the Seqera executor.Generated with Claude Code