google / shipshape

Program analysis platform
Apache License 2.0
269 stars 35 forks source link

[CLI] Always show docker errors on stderr #53

Closed llbit closed 9 years ago

llbit commented 9 years ago

When I run the CLI now I get some docker errors, but they are only visible when I add the flag --stderrthreshold=INFO:

$ bazel-bin/shipshape/cli/shipshape --categories="ExtendJ" --analyzer_images=gcr.io/extendj_service/servic
e:latest --tag=local --stderrthreshold=INFO .                                                             
I0626 10:31:02.948521   89407 shipshape.go:150] Starting shipshape using gcr.io/shipshape_releases/service:local on /usr/local/google/home/joqvist/git/shipshape
I0626 10:31:02.948578   89407 shipshape.go:413] Waiting for dockerized analyzers to start up...
I0626 10:31:03.169525   89407 shipshape.go:392] Reusing analyzer gcr.io/extendj_service/service:latest started at localhost:10010
I0626 10:31:03.169611   89407 shipshape.go:415] Analyzers up
I0626 10:31:03.169631   89407 shipshape.go:281] Starting shipshape...
I0626 10:31:03.210703   89407 shipshape.go:292] Restarting container with gcr.io/shipshape_releases/service:local
I0626 10:31:03.210752   89407 shipshape.go:361] Stopping and removing shipping_container
I0626 10:31:03.234766   89407 shipshape.go:426] stderr:
Error response from daemon: no such id: shipping_container
Error: failed to stop containers: [shipping_container]
I0626 10:31:03.234826   89407 shipshape.go:365] Could not stop shipping_container: exit status 1
I0626 10:31:03.234909   89407 docker.go:166] Running 'docker [run -p=127.0.0.1:10007:10007 -v=/usr/local/google/home/joqvist/git/shipshape:/shipshape-workspace -v=/tmp:/shipshape-output -e="START_SERVICE=true" -e="ANALYZERS=localhost:10005,localhost:10006,localhost:10008" --name=shipping_container -d gcr.io/shipshape_releases/service:local]'
I0626 10:31:04.186082   89407 shipshape.go:426] stderr:
Unable to find image 'gcr.io/shipshape_releases/service:local' locally
Pulling repository gcr.io/shipshape_releases/service
Tag local not found in repository gcr.io/shipshape_releases/service
E0626 10:31:04.186159   89407 shipshape.go:218] HTTP client did not become healthy: exit status 1

When I omit the --stderrthreshold flag I only get the very undescriptive error message HTTP client did not become healthy: exit status 1