Skip to content

Better retry, waiting and timeout for 'analyzed' step and getting scan report #3

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vicenteherrera
Copy link

Initial implementation would wait fixed 2x10s after the image was uploaded to Secure because of number of retries code being always executed, then tried to get scan report.

That would be too much if the scan was already cached in Secure and immediately available, or too little if scan result was delayed (when the script says 'analyzed', it means it has received the image, not that the scan has finished).

Now if the scan report is available immediately, there is no delay getting it, and if it's not, a retry for the timeout period is done in incremental steps of 5s, 10s, 15s... to avoid overloading the backend when things get slow.

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

Successfully merging this pull request may close these issues.

1 participant