Skip to content
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

Schema validation of time resources doesn't work when param loaded from config #973

Closed
jfy133 opened this issue Mar 26, 2021 · 1 comment · Fixed by #974
Closed

Schema validation of time resources doesn't work when param loaded from config #973

jfy133 opened this issue Mar 26, 2021 · 1 comment · Fixed by #974
Labels
bug Something isn't working

Comments

@jfy133
Copy link
Member

jfy133 commented Mar 26, 2021

Description of the bug

I've just come across an issue which I'm 100% what's going on, but I think its related to the new JSON schema validation in nf-core/tools 1.13.

Command: nextflow run nf-core/eager -r dev -profile shh,singularity
The error:
N E X T F L O W  ~  version 20.10.0
Launching `nf-core/eager` [Eager2_Gubbio_Iron_Italy_20210326] - revision: c0cb097fa2 [dev]
------------------------------------------------------
                                        ,--./,-.
        ___     __   __   __   ___     /,-._.--~'
  |\ | |__  __ /  ` /  \ |__) |__         }  {
  | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                        `._,._,'
  nf-core/eager v2.3.3dev
------------------------------------------------------
ERROR: Validation of pipeline parameters failed!
* --max_time: string [24d 20h 31m 24s] does not match pattern ^[\d\.]+\.*(s|m|h|d)$ (24d 20h 31m 24s)

--max_time is defined in the nf-core/configs under https://github.com/nf-core/configs/blob/26b5904df15ab28edcd4447cfe8e290e7da85a4f/conf/shh.config#L8 as max_time = 720.h

However, nextflow on load is resolving this as max_time = '24d 20h 31m 24s'

I can confirm this if I run: nextflow config nf-core/eager -profile shh,singularity

  config_profile_description = 'nf-core/eager SHH profile provided by nf-core/configs'
   config_profile_contact = 'James Fellows Yates (@jfy133)'
   config_profile_url = 'https://shh.mpg.de'
   max_memory = '2 TB'
   max_cpus = 128
   max_time = '24d 20h 31m 24s'
}

Maybe the validation check of this values doesn't work if loaded via a config rather than supplied at the CLI/JSON?

Steps to reproduce

Try loading an nf-core/config profile, where --max_time is defined as e.g. 720.h.

Expected behaviour

The schema REGEX to account for Nextflow-resolved duration objects

System

  • Hardware: HPC
  • Executor: SLURM
  • OS: Ubuntu 18.04
  • Version of nf-core/tools:

Nextflow Installation

  • Version: 20.10.0

Additional context

@jfy133 jfy133 added the bug Something isn't working label Mar 26, 2021
@jfy133
Copy link
Member Author

jfy133 commented Mar 26, 2021

Note, this was originally reported by GitHub newcomer @mrgvanni

This was referenced Mar 26, 2021
@ewels ewels closed this as completed Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants