Skip to content

Support multiple config option types in config spec#6720

Merged
bentsherman merged 5 commits intomasterfrom
config-option-types
Jan 14, 2026
Merged

Support multiple config option types in config spec#6720
bentsherman merged 5 commits intomasterfrom
config-option-types

Conversation

@bentsherman
Copy link
Member

Fix #6718

This PR updates the config spec to support multiple types for config options.

For example, process.publishDir can be supplied with a String, Map, or List, as shown in ProcessDsl. The config spec needs to be able to allow for all of these types, especially as we extend type checking to config files.

For now, this PR fixes a bug in the runtime config validation. The ConfigValidator needs to know whether a config option has type Map in order to distinguish between "map" options and scopes in the resolved config.

As a bonus, this PR adds support for the types field in the ConfigOption annotation, which allows config options to specify "additional types". See for example the k8s.pod option defined in K8sConfig. The config spec JSON has been updated to include these additional types in a non-breaking way. These will eventually be used by the type checker.

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman bentsherman requested a review from jorgee January 13, 2026 19:10
@bentsherman bentsherman requested a review from a team as a code owner January 13, 2026 19:10
@netlify
Copy link

netlify bot commented Jan 13, 2026

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit e3ae914
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/6967a12bd3ee3100083e618d

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Copy link
Contributor

@jorgee jorgee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, just a very minor comment.

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman bentsherman merged commit ebb0890 into master Jan 14, 2026
25 checks passed
@bentsherman bentsherman deleted the config-option-types branch January 14, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v2 config spec check: false positive around process.publishDir attributes

2 participants