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

validate: catch problems with misspelled inputs.files and similar directives #562

Closed
tiborsimko opened this issue Sep 24, 2021 · 0 comments · Fixed by #564
Closed

validate: catch problems with misspelled inputs.files and similar directives #562

tiborsimko opened this issue Sep 24, 2021 · 0 comments · Fixed by #564

Comments

@tiborsimko
Copy link
Member

Current behaviour

The errors in directives such as inputs, parameters etc are not caught:

$ cd reana-demo-helloworld
$ sed -i 's,files:,fls:,g' reana.yaml 
$ git diff         
diff --git a/reana.yaml b/reana.yaml
index 50d1bd8..9597909 100644
--- a/reana.yaml
+++ b/reana.yaml
@@ -1,6 +1,6 @@
 version: 0.3.0
 inputs:
-  files:
+  fls:
     - code/helloworld.py
     - data/names.txt
   parameters:
@@ -19,5 +19,5 @@ workflow:
               --outputfile "${outputfile}"
               --sleeptime ${sleeptime}
 outputs:
-  files:
+  fls:
    - results/greetings.txt
$ reana-client validate
==> Verifying REANA specification file... /home/tibor/private/project/reana/src/reana-demo-helloworld/reana.yaml
  -> SUCCESS: Valid REANA specification file.
==> Verifying REANA specification parameters... 
  -> SUCCESS: REANA specification parameters appear valid.
==> Verifying workflow parameters and commands... 
  -> SUCCESS: Workflow parameters and commands appear valid.
==> Verifying dangerous workflow operations... 
  -> SUCCESS: Workflow operations appear valid.

This workflow appears to be valid, but it is actually not and it won't run properly.

Expected behaviour

Instead of seeing:

-> SUCCESS: Valid REANA specification file.

one would expect to see:

-> ERROR: The `reana.yaml` directive `inputs.fls` is not valid.

The validate should catch these kinds of error situations with inputs.files, inputs.parameters etc for the user and should end with an error exit status. (See also #561.)

marcdiazsan added a commit to marcdiazsan/reana-client that referenced this issue Sep 27, 2021
marcdiazsan added a commit to marcdiazsan/reana-client that referenced this issue Sep 29, 2021
Update validate schema to restrict the directives allowed and to be consisten with the documentation

Closes reanahub#562, Closes reanahub#404
marcdiazsan added a commit to marcdiazsan/reana-client that referenced this issue Sep 29, 2021
Update validate schema to restrict the directives allowed and to be consisten with the documentation

Closes reanahub#562, Closes reanahub#404
marcdiazsan added a commit to marcdiazsan/reana-client that referenced this issue Sep 30, 2021
Update validate schema to restrict the directives allowed and to be consisten with the documentation

Closes reanahub#562, Closes reanahub#404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant