Skip to content

Add config error checking to run command #5998

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bentsherman
Copy link
Member

This PR adds the same error checking for config files to the run command as provided by the lint command / language server

Unit tests have been updated to reflect the strict syntax checking

@bentsherman bentsherman requested a review from pditommaso April 22, 2025 21:08
@bentsherman bentsherman requested a review from a team as a code owner April 22, 2025 21:08
Copy link

netlify bot commented Apr 22, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 3c53340
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/68080538e77f1000080a7c17

@bentsherman
Copy link
Member Author

bentsherman commented Apr 23, 2025

@pditommaso the CI is failing because rnaseq-nf has errors in the config file

+ /home/runner/work/nextflow/nextflow/nextflow run nextflow-io/rnaseq-nf -with-docker -with-tower
nextflow-io/rnaseq-nf
N E X T F L O W  ~  version 25.03.0-edge
Pulling nextflow-io/rnaseq-nf ...
 downloaded from https://github.com/nextflow-io/rnaseq-nf.git

nextflow.config:130:24: `AZURE_BATCH_ACCOUNT_NAME` is not defined
130 |         accountName = "$AZURE_BATCH_ACCOUNT_NAME"
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^

nextflow.config:131:23: `AZURE_BATCH_ACCOUNT_KEY` is not defined
131 |         accountKey = "$AZURE_BATCH_ACCOUNT_KEY"
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^

nextflow.config:137:24: `AZURE_STORAGE_ACCOUNT_NAME` is not defined
137 |         accountName = "$AZURE_STORAGE_ACCOUNT_NAME"
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^

nextflow.config:138:23: `AZURE_STORAGE_ACCOUNT_KEY` is not defined
138 |         accountKey = "$AZURE_STORAGE_ACCOUNT_KEY"
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^


ERROR ~ Config parsing failed

It is using implicit environment variables which are not supported in the strict syntax. But I think these vars are used by nf-azure implicitly anyway so I think they can be removed. I made a PR here: nextflow-io/rnaseq-nf#33

@pditommaso
Copy link
Member

if i'm understanding correctly this check config using parser v2 ahead of run? is it correct?

@bentsherman
Copy link
Member Author

It was already using config parser v2 in the run command, but it wasn't reporting the syntax errors, so this PR correctly reports config parser v2 errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants