frictionlessdata / datapackage-pipelines

Framework for processing data packages in pipelines of modular components.
https://frictionlessdata.io/
MIT License
119 stars 32 forks source link

Running dpp with nonexistent dataset reference exists silently #118

Open jbothma opened 6 years ago

jbothma commented 6 years ago

In order to submit an issue, please ensure you can check the following. Thanks!

Running

GOBBLE_AUTH_TOKEN=mytoken dpp run ./2017-18/national/estimates-of-national-expenditure-south-africa-2017-18

outputs

INFO    :Main                            :Skipping redis connection, host:None, port:6379
INFO    :Main                            :RESULTS:

and exists with exit code zero giving no feedback that something went wrong or what went wrong.

OriHoch commented 6 years ago

this is the relevant code - https://github.com/frictionlessdata/datapackage-pipelines/blob/master/datapackage_pipelines/cli.py#L110

I think that we need to add a condition there, something like -

if len(results) == 0:
  exitcode=1
OriHoch commented 6 years ago

also, output a friendly error message -

no results, please check the pipeline id / processor names
OriHoch commented 6 years ago

also, you can add this condition to our cli exit codes test.. https://github.com/frictionlessdata/datapackage-pipelines/blob/master/tests/exit-codes/test_cli_exit_codes.sh

akariv commented 6 years ago

Good suggestion. On it.