Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

External analyzers can't run if one was run previously #105

Open
clconway opened this issue Oct 8, 2015 · 2 comments
Open

External analyzers can't run if one was run previously #105

clconway opened this issue Oct 8, 2015 · 2 comments
Assignees
Labels

Comments

@clconway
Copy link
Contributor

clconway commented Oct 8, 2015

$ bazel-bin/shipshape/cli/shipshape --analyzer_images yulin2/ctadetector -categories CTADetector --stderrthreshold=INFO .
I1008 16:53:55.347716   11643 shipshape_lib.go:78] Starting shipshape...
[...]
I1008 16:54:01.766097   11643 shipshape_lib.go:157] Calling with request shipshape_context:<repo_root:"/shipshape-workspace" > triggered_category:"CTADetector" event:"manual" stage:PRE_BUILD 
I1008 16:54:01.766432   11643 shipshape_lib.go:248] Calling to the shipshape service with shipshape_context:<repo_root:"/shipshape-workspace" > triggered_category:"CTADetector" event:"manual" stage:PRE_BUILD 
WARNING: Analyzer CTADetector failed to run: The triggered category "CTADetector" could not be found at the locations [localhost:10005 localhost:10006 localhost:10008]
I1008 16:54:01.819013   11643 shipshape_lib.go:200] End of Results.

It might be something wrong with the image itself:

$ docker pull yulin2/ctadetector
[...]
Status: Downloaded newer image for yulin2/ctadetector:latest
$ docker run -it yulin2/ctadetector /bin/bash
/endpoint.sh: line 7: /shipshape-output/shipshape.CTADetector.log: No such file or directory
@clconway clconway added the P2 label Oct 8, 2015
@ciera
Copy link
Contributor

ciera commented Oct 20, 2015

I think I know what the issue is now. I'm having this problem when any other analyzer image was previously run, but now is not being run. The problem is that the old image is still bound to the ports that we want to use. I'm having this happen for not just the CTA Detector, but any image after I already have android lint running. Docker inspect on the container will confirm if it is the same issue.

The right way to do this is to properly shut down old containers. For now, I may just have all external analyzers go down every time, just to get this working for the tutorial

@ciera ciera added P1 and removed P2 labels Oct 20, 2015
@ciera ciera changed the title CTADetector is failing to run External analyzers can't run if one was run previously Oct 20, 2015
@ciera ciera self-assigned this Oct 20, 2015
ciera added a commit that referenced this issue Oct 20, 2015
Summary: This will take down all third-party analyzers every time, rather than attempting to make them a longer lived service. This is a quick hack to address issue #105. The correct solution would be to attempt to reuse any container which has the same full image name and the right volumes mounted in. It also needs to be more intelligent about port assignment.

Reviewers: emso, rsk, collinwinter

Reviewed By: collinwinter

Differential Revision: https://phabricator-dot-shipshapecode.appspot.com/D155
@ciera
Copy link
Contributor

ciera commented Oct 25, 2015

I put in a hack fix for this (see commit above). This now takes up and down the external analyzers every time. This should be modified to take down existing ones only if they are unused.

@ciera ciera added P2 and removed P1 labels Oct 25, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants