Skip to content
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

Retry trivy when it fails to download the vulnerability database due to rate-limiting #1700

Merged

Conversation

SaschaSchwarze0
Copy link
Member

Changes

Part of #1689

This changes the image processing step to perform a simple retry in case of Trivy failures due to rate limiting.

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

The image-processing step now retries the vulnerability scan using Trivy if that failed to download the vulnerability database due to rate-limiting

@SaschaSchwarze0 SaschaSchwarze0 added the kind/bug Categorizes issue or PR as related to a bug. label Oct 28, 2024
@openshift-ci openshift-ci bot added the release-note Label for when a PR has specified a release note label Oct 28, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 28, 2024
@SaschaSchwarze0
Copy link
Member Author

SaschaSchwarze0 commented Oct 28, 2024

@HeavyWombat just seeing in your PR this error: 2024-10-28T14:13:11Z FATAL Fatal error init error: DB error: failed to download vulnerability DB: OCI artifact error: failed to download vulnerability DB: failed to download artifact from any source

Should I do the retry also for this error (and remove the TOOMANYREQUESTS check) ?

Edit: is also in my PR. :-)

@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 28, 2024
…to rate-limiting

Signed-off-by: Sascha Schwarze <schwarzs@de.ibm.com>
@SaschaSchwarze0
Copy link
Member Author

SaschaSchwarze0 commented Oct 28, 2024

This looks promising, only one failure in the integration test suite which is unrelated and which is a flaky test that I address here: #1701

@SaschaSchwarze0 SaschaSchwarze0 added this to the release-v0.14.0 milestone Oct 28, 2024
Copy link
Contributor

@HeavyWombat HeavyWombat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 28, 2024
Copy link
Contributor

openshift-ci bot commented Oct 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HeavyWombat

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2024
@SaschaSchwarze0 SaschaSchwarze0 added the kind/flake Categorizes issue or PR as related to a flaky test. label Oct 28, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 84aa01c into shipwright-io:main Oct 28, 2024
19 checks passed
@SaschaSchwarze0 SaschaSchwarze0 deleted the sascha-retry-trivy branch October 28, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. kind/flake Categorizes issue or PR as related to a flaky test. lgtm Indicates that a PR is ready to be merged. release-note Label for when a PR has specified a release note size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants