reanahub / reana-client

REANA command-line client
http://reana-client.readthedocs.io/
MIT License
10 stars 46 forks source link

validate: serial workflow parameters #465

Closed tiborsimko closed 3 years ago

tiborsimko commented 3 years ago

The validate command should discover errors with parameters early.

Take Serial workflow engine, for example reana-demo-worldpopulation, and simulate a typo:

$ cd reana-demo-worldpopulation
$ reana-client validate 
reana.yaml is a valid REANA specification file.
$ sed -i 's,{region},{rgn},g' reana.yaml
$ reana-client validate 
reana.yaml is a valid REANA specification file.

That is, if the user defines a parameter region, but later in the job steps uses rgn, the current validation does not catch these types of errors.

We should check for:

(In the second case, we could emit actually an error, however we have to be careful not to report "good" situtations, such as ${USER} or ${REANA_WORKSPACE} which are perfectly valid environment variables that people may want to use. And, since these are hard to detect outside of the image environment context, we can simply emit warning for now that rgn seems undefined.)

mvidalgarcia commented 3 years ago

Closed by https://github.com/reanahub/reana-client/pull/469