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

Path existance check assumes "definisions" in schema #13

Open
mateuszpawlik opened this issue Dec 4, 2023 · 7 comments
Open

Path existance check assumes "definisions" in schema #13

mateuszpawlik opened this issue Dec 4, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@mateuszpawlik
Copy link

I have a simple schema with three parameters. One of them is a required path. I used the nf-core schema build which generated that schema. Since I have only three parameters, I didn't think about grouping them. The "exists" key wouldn't work. It took me some time to figure out that collecting parameters with "exists" key set assumes "definitions" key in the schema:

https://github.com/nextflow-io/nf-validation/blob/26f56310c397ca987ba9510abbddcc3d77abf0c6/plugins/nf-validation/src/main/nextflow/validation/SchemaValidator.groovy#L306

Once I grouped my parameters in "definitions" the existence check was triggered.

Are group "definitions" mandatory?

@nvnieuwk nvnieuwk added the bug Something isn't working label Dec 4, 2023
@nvnieuwk
Copy link
Collaborator

nvnieuwk commented Dec 4, 2023

Hi, thanks for reporting! This should not happen. We'll fix this once we find some time, can you just add the definitions there in the meantime?

@mateuszpawlik
Copy link
Author

Yes, I solved it for myself by adding the "definitions". For me it doesn't matter.

I hope I linked the right source code lines. Let me know if you need more information. I used the latest plugin version and the latest Nextflow.

@nvnieuwk
Copy link
Collaborator

Hi this should be solved in version 2.0 of nf-validation. I'm not sure when it will come out because it's a big change overall, but keep an eye on it :p

@nvnieuwk
Copy link
Collaborator

Hi @mateuszpawlik we just released the new version of nf-validation with improved JSON schema validation. Can you please retry with version 2.0.0? (Please keep in mind that we changed some stuff in this update. You can see the full migration guide here)

@mateuszpawlik
Copy link
Author

mateuszpawlik commented Feb 20, 2024

I first tried to update the plugin to the new version but got an error:

Feb-20 19:26:28.010 [main] INFO  nextflow.cli.CmdRun - Launching `main.nf` [big_hoover] DSL2 - revision: 1c103ce112
Feb-20 19:26:28.010 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins declared=[[email protected]]
Feb-20 19:26:28.011 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins default=[]
Feb-20 19:26:28.011 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins resolved requirement=[[email protected]]
Feb-20 19:26:28.011 [main] DEBUG nextflow.plugin.PluginUpdater - Installing plugin nf-validation version: 2.0.0
Feb-20 19:26:28.014 [main] INFO  nextflow.plugin.PluginUpdater - Downloading plugin [email protected]
Feb-20 19:26:28.600 [main] ERROR nextflow.cli.Launcher - @unknown
org.pf4j.PluginRuntimeException: Plugin nf-validation with version @2.0.0 does not exist in the repository

Nextflow version 23.10.1

Shall I wait a bit longer?

@nvnieuwk
Copy link
Collaborator

We sadly had to revert the update for now because a lot of pipelines were breaking (because they didn't pin the plugin version). We'll need to update those pipelines first before re-releasing the update. Sorry, but I hope the new version will be out soon

@nvnieuwk nvnieuwk transferred this issue from nextflow-io/nf-validation Apr 23, 2024
@nvnieuwk
Copy link
Collaborator

nf-schema has now been released, this contains all improvements + more from nf-validation v2.0. Can you try again with the new plugin?

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

No branches or pull requests

2 participants