anchore-engine icon indicating copy to clipboard operation
anchore-engine copied to clipboard

Enahncement: Jenkins anchore plugin should have customizable polling interval for engine retries

Open brahankv opened this issue 3 years ago • 5 comments

Is this a request for help?: Yes

Is this a BUG REPORT or a FEATURE REQUEST? (choose one): FEATURE REQUEST

Version of Anchore Engine and Anchore CLI if applicable: anchore-container-scanner-1.0.23

What happened: While scanning large images using Jenkins anchore-container-scanner-plugin, the polling interval of 1 sec for every engine retries is too small. This will cause too many requests when the image is large.

What did you expect to happen: Polling interval for engine retries should be made configurable. So the polling interval can be increased based on the usage/image size.

Any relevant log output from /var/log/anchore: NIL

What docker images are you using: NIL

How to reproduce the issue: NIL

Anything else we need to know:

brahankv avatar Jul 19 '21 07:07 brahankv

Hi @brahankv , thanks for filing this issue. Could you provide a little more detail about the issue you are having?

  1. Could you confirm this is the retry from the jenkins plugin to the policy engine in anchore engine, or some other retry?
  2. What is the effect this is having? Failing or slower builds? Higher traffic on your anchore engine instance?

Having some extra context will help us triage this.

dspalmer99 avatar Jul 19 '21 14:07 dspalmer99

  1. Could you confirm this is the retry from the jenkins plugin to the policy engine in anchore engine, or some other retry? Yes the retry from jenkins plugin to anchore policy engine to check the status of the scan. http:///v1/images//check?tag=&detail=true

  2. What is the effect this is having? Failing or slower builds? Higher traffic on your anchore engine instance? In our case, image policy evaluation/analysis takes more than 5 minutes. So it does not required to check status every second. We have seen random timeout and failure in the jenkins job.

brahankv avatar Jul 21 '21 13:07 brahankv

https://github.com/jenkinsci/anchore-container-scanner-plugin/compare/master...brahankv:master

brahankv avatar Jul 21 '21 15:07 brahankv

@brahankv Thanks for the feedback, and for the PR! We'll review the PR and get back to you with some feedback.

dspalmer99 avatar Jul 21 '21 17:07 dspalmer99

Oh actually, I see now that the link you provided is comparing your branch with master. Could you open a PR for that for us to review?

dspalmer99 avatar Jul 21 '21 17:07 dspalmer99