Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error message for failed step #95

Closed
emgrasmeder opened this issue Feb 25, 2021 · 2 comments
Closed

Misleading error message for failed step #95

emgrasmeder opened this issue Feb 25, 2021 · 2 comments

Comments

@emgrasmeder
Copy link
Member

emgrasmeder commented Feb 25, 2021

If I add a cmd into a step and it fails, the resulting error message is not really indicative of the actual problem.

Here's the relevant logs from the container after a failed request: (Note the cmd: "pip99" "install" "-r" "requirements.txt" - probably failed with something like command not found: pip99). We should see the command not found: pip99 message more prominently than (or entirely in place of) HTTP Error: 400

runner_1     | 2021-02-25T14:44:35.973Z f9633017072a DEBUG [runner.docker:163] - Creating new container with: image: sha256:8a62789c5272a405f7aad44f54ff0d38c99f15b6e6d251ba38151cfbc9f39194 cmd: ["pip99" "install" "-r" "requirements.txt"] evars: [] working-dir: /root/source
runner_1     | 2021-02-25T14:44:36.161Z f9633017072a DEBUG [runner.docker:236] - Starting container a056b490805fa895e2dce757af6f33916c0439dc72509c001ef9375aeb15045e
runner_1     | 2021-02-25T14:44:36.794Z f9633017072a ERROR [runner.docker:255] - Error running container: HTTP Error: 400
runner_1     | 2021-02-25T14:44:36.796Z f9633017072a DEBUG [runner.pipeline:132] - Removing failed container a056b490805fa895e2dce757af6f33916c0439dc72509c001ef9375aeb15045e
runner_1     | 2021-02-25T14:44:36.897Z f9633017072a ERROR [runner.pipeline:172] - Failed executing step {:needs_resource "source", :cmd "pip33 install -r requirements.txt"} with error HTTP Error: 400
runner_1     | 2021-02-25T14:44:36.901Z f9633017072a INFO [runner.pipeline:229] - Marking run r-64c15f4a-e762-4525-9231-6a181e870aa8 as failed with reason: HTTP Error: 400
runner_1     | 2021-02-25T14:44:36.924Z f9633017072a DEBUG [runner.pipeline:63] - Deleting all images for run r-64c15f4a-e762-4525-9231-6a181e870aa8
runner_1     | 2021-02-25T14:44:37.159Z f9633017072a ERROR [runner.errors:23] - Pipeline failure: HTTP Error: 400
@lispyclouds
Copy link
Member

This is caused by a bad request via clj-docker-client with a non-existent path as CMD to the docker daemon which responds with a 400. We should read the response body not just the status code.

@lispyclouds
Copy link
Member

Needs into-docker/clj-docker-client#37 to be released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants