Fix: nextflow inspect not resolving config-based container overrides
#6736
+45
−16
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.
Fixes #6734
The
nextflow inspectcommand was returning containers defined in process source files instead of the overridden values from profile configuration files (e.g., withName selectors).Root cause: In ProcessDef.createTaskProcessor(), the condition
if( !processConfig )was meant to callinitialize()if config wasn't set:nextflow/modules/nextflow/src/main/groovy/nextflow/script/ProcessDef.groovy
Lines 263 to 265 in 24cc59e
But
processConfigis always non-empty (initialized withDEFAULT_CONFIGvalues in the constructor), soinitialize()was never called through this code path.The
initialize() method is responsible for applying config file settings (withName/withLabel` selectors) to the process config, including container overrides.Fix:
initializedflag to track whether config has been appliedinitialize()idempotent by checking the flaginitialize()increateTaskProcessor()(safe due to idempotency)clone()so cloned processes can be re-initializedThis ensures that when
ContainersInspectorcallscreateTaskProcessor()to create task previews, the config file settings are properly applied first.