Actions
Bug #9854
closed[API] Validation checks for containers produce bad errors
Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
0.5
Description
This is an attempt to commit a container request, which fails due to a missing docker image. The bug is that this gets reported to the client as a 404, when it should be a 422 with an error message such as "docker image "arvados/jobs" not found".
2016-08-25_17:00:34.05579 #<ActiveRecord::RecordNotFound: docker image "arvados/jobs" not found> 2016-08-25_17:00:34.05587 Error 1472144434+57194fba: 404 2016-08-25_17:00:34.05669 {"method":"POST","path":"/arvados/v1/container_requests/962eh-xvhdp-vlg2opl987r787x","format":"*/*","controller":"arvados/v1/container_requests","action":"update","status":404,"duration":33.3,"view":0.19,"db":7.76,"params_truncated":"{\"api_token\":\"4xfdfcb299y0627hpysv4q1k58wgso11jahe3jsjjya3lwhrz6\",\"reader_tokens\":\"[false]\",\"container_request\":\"{\\\"properties\\\":{\\\"template_uuid\\\":\\\"962eh-7fd4e-c3mp6v9lpvna8vb\\\"},\\\"state\\\":\\\"Committed\\\",\\\"mounts\\\":{\\\"/var/lib/cwl/cwl.input.json\\\":{\\\"kind\\\":\\\"json\\\",\\\"content\\\":{\\\"ex_file\\\":{\\\"class\\\":\\\"File\\\",\\\"location\\\":\\\"keep:4dc42add2b2430133d0991b63a26a584+85/lightning-2.6.3-sm+tb-linux.xpi\\\",\\\"arv:collection\\\":\\\"962eh-4zz18-suzs3j0s3iwgzqt/lightning-2.6.3-sm+tb-linux.xpi\\\"},\\\"ex_boolean\\\":false,\\\"ex_boolean_opt\\\":false,\\\"ex_dir\\\":{\\\"class\\\":\\\"Directory\\\",\\\"location\\\":\\\"keep:4dc42add2b2430133d0991b63a26a584+85\\\",\\\"arv:collection\\\":\\\"962eh-4zz18-suzs3j0s3iwgzqt\\\"},\\\"ex_double\\\":-2.0,\\\"ex_float\\\":3.0,\\\"ex_int\\\":2,\\\"ex_long\\\":1,\\\"ex_string\\\":\\\"qqq\\\",\\\"ex_enum\\\":\\\"b\\\"}},\\\"stdout\\\":{\\\"kind\\\":\\\"file\\\",\\\"path\\\":\\\"/var/spool/cwl/cwl.output.json\\\"},\\\"/var/spool/cwl\\\":{\\\"kind\\\":\\\"collection\\\",\\\"writable\\\":true},\\\"/var/lib/cwl/workflow.json\\\":{\\\"kind\\\":\\\"json\\\",\\\"content\\\":{\\\"cwlVersion\\\":\\[...]","@timestamp":"2016-08-25T17:00:34Z","@version":"1","message":"[404] POST /arvados/v1/container_requests/962eh-xvhdp-vlg2opl987r787x (arvados/v1/container_requests#update)"}
Workbench reports this error as:
Path not found [API: 404]
Updated by Lucas Di Pentima over 8 years ago
- Status changed from New to In Progress
- Assigned To set to Lucas Di Pentima
Updated by Lucas Di Pentima over 8 years ago
Added a new exception to return 422 http status, and modified mounts_for_container & container_image_for_container, used for resolving the container request. Also updated the existing tests to check for this new exception.
Updated by Lucas Di Pentima over 8 years ago
- Target version set to 2016-08-31 sprint
- Story points set to 0.5
Updated by Lucas Di Pentima over 8 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|commit:7ee36999363fdad6b957747bb96ae3ded5973bc8.
Actions