reanahub / reana-client

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

cli: cannot run workflow without inputs #689

Closed mdonadoni closed 7 months ago

mdonadoni commented 7 months ago

Consider this simple serial workflow:

workflow:
  type: serial
  specification:
    steps:
      - environment: 'docker.io/library/ubuntu:20.04'
        commands:
          - sleep 5

reana-client reports the YAML file as valid (with some warnings):

$ reana-client validate
==> Verifying REANA specification file... .../reana.yaml
  -> SUCCESS: Valid REANA specification file.
==> Verifying REANA specification parameters... 
  -> WARNING: Workflow "inputs" are missing in the REANA specification.
==> Verifying workflow parameters and commands... 
  -> SUCCESS: Workflow parameters and commands appear valid.
==> Verifying dangerous workflow operations... 
  -> SUCCESS: Workflow operations appear valid.

But running the workflow fails:

reana-client run 
==> Creating a workflow...
==> Verifying REANA specification file... .../reana.yaml
  -> SUCCESS: Valid REANA specification file.
==> Verifying REANA specification parameters... 
  -> WARNING: Workflow "inputs" are missing in the REANA specification.
==> Verifying workflow parameters and commands... 
  -> SUCCESS: Workflow parameters and commands appear valid.
==> Verifying dangerous workflow operations... 
  -> SUCCESS: Workflow operations appear valid.
==> Verifying compute backends in REANA specification file...
  -> SUCCESS: Workflow compute backends appear to be valid.
workflow.1
==> SUCCESS: File /reana.yaml was successfully uploaded.
==> Uploading files...
Traceback (most recent call last):
  [...]
  File "/home/madonado/data/reana/src/reana-client/reana_client/cli/files.py", line 400, in upload_files
    for filepath in filenames:
TypeError: 'NoneType' object is not iterable
mdonadoni commented 7 months ago

(this is a good example of an issue that might have been prevented by static analysers, see https://github.com/reanahub/reana/issues/557)