reanahub / reana-db

REANA database utilities
http://reana-db.readthedocs.org
MIT License
0 stars 31 forks source link

Job: cvmfs_mounts are saved as text #33

Closed roksys closed 5 years ago

roksys commented 5 years ago

cvmfs_mounts field of Job model is saved as a text. It should be Boolean.

tiborsimko commented 5 years ago

Actually it should well be the text in the models, since the value is not Boolean but a list of CVMFS volumes that the user wanted to mount for the workflow to run, such as "atlas.cern.ch,atlas-condb.cern.ch". See also https://reana.readthedocs.io/en/latest/userguide.html#declare-necessary-resources

(IIRC a special value "false" was used to indicate that no CVMFS volume should be mounted, because empty string as a default value was causing some troubles with False values in Bravado client scenarios)

diegodelemos commented 5 years ago

Exactly, it is text right now. This issue should go to RWC, where we conciously set it to 'false' when there are no CVMFS resource requests.

I guess that to be congruent, we should just not set the variable when there are not CVMFS resources requested and change in the engines to fall back to an empty string instead of 'false', and then send it to RJC only if it actually contains any CVMFS repo (the field is not required in the API) so we avoid problems with Bravado's empty strings/booleans etc...

The motivation behind this is mainly because we end up inside RJC code having a CVMFS mount called false and it is confusing.

diegodelemos commented 5 years ago

Moved to RWC, https://github.com/reanahub/reana-workflow-controller/issues/206.