anchore / anchore-engine

A service that analyzes docker images and scans for vulnerabilities
Apache License 2.0
1.58k stars 271 forks source link

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

Open brahankv opened 3 years ago

brahankv commented 3 years ago

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:

dspalmer99 commented 3 years ago

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.

brahankv commented 3 years ago
  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 commented 3 years ago

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

dspalmer99 commented 3 years ago

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

dspalmer99 commented 3 years ago

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?