Bug #13692

[arvados-cwl-runner] Improve error message when environment variables missing

Added by Tom Morris about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
07/06/2018
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release:
Release relationship:
Auto

Description

I got this:

2018-06-27 16:34:34 arvados.cwl-runner ERROR: 'ARVADOS_API_TOKEN'

as the complete and only error message when I attempted to run arvados-cwl-runner without ARVADOS_API_TOKEN set. We need better error messages.

Similarly, this needs to say what endpoint it's attempting to connect to that it can't verify the cert for:

2018-06-27 16:45:09 arvados.cwl-runner ERROR: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)


Subtasks

Task #13727: Catch Arvados exceptionsResolvedPeter Amstutz

Task #13728: Review 13692-acr-errorResolvedPeter Amstutz

Associated revisions

Revision c584cb69
Added by Peter Amstutz about 1 year ago

Merge branch '13692-acr-error' closes #13692

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <>

History

#1 Updated by Tom Clegg about 1 year ago

Just a thought -- in this situation is it possible to raise an exception in the Python SDK that is both machine-readable (recognizable exception class) and human-readable ("you need to set your API_HOST and TOKEN vars or using a settings file")? It'd be nice to handle this such that humans get useful feedback even from applications that haven't wrapped the error with their own advice.

#2 Updated by Peter Amstutz about 1 year ago

  • Assigned To set to Peter Amstutz

#3 Updated by Peter Amstutz about 1 year ago

13692-acr-error @ 3a7481703542b0c95d5a23cb45b0d2e7c3ac4c9e

https://ci.curoverse.com/job/developer-run-tests/785/

Improves error messages emitted by the Python SDK, and adds an extra API call early in a-c-r initialization so that errors get reported early.

Example errors:

$ arvados-cwl-runner   --api=containers --submit-runner-ram=3333 --create-workflow submit_wf.cwl ../submit_test_job.json 
2018-07-05 17:03:40 arvados.cwl-runner ERROR: ARVADOS_API_TOKEN not set.
Please set in /home/peter/.config/arvados/settings.conf or export environment variable.
$ arvados-cwl-runner   --api=containers --submit-runner-ram=3333 --create-workflow submit_wf.cwl ../submit_test_job.json 
2018-07-05 17:01:48 arvados.cwl-runner ERROR: Could not connect to https://172.17.0.2:8000/arvados/v1/users/current?alt=json
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
Possible causes: remote SSL/TLS certificate expired, or was issued by an untrusted certificate authority.

#4 Updated by Lucas Di Pentima about 1 year ago

This LGTM, please merge.

#5 Updated by Peter Amstutz about 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 50 to 100

#6 Updated by Tom Morris about 1 year ago

  • Release set to 13

Also available in: Atom PDF