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

Fix TOOMANYREQUESTS failure in Trivy Action #7357

Merged
merged 2 commits into from
Nov 13, 2024
Merged

Conversation

TharmiganK
Copy link
Contributor

@TharmiganK TharmiganK commented Nov 13, 2024

Purpose

$Subject

Failure: https://github.com/ballerina-platform/module-ballerina-jballerina.java.arrays/actions/runs/11805232960/job/32887228609#step:6:157

The rate limiting is for the downloads from the GitHub container registry. As a solution, this PR adds the public ECR registry as a fallback option when the rate limit hits with the GitHub container registry.

Workflow run with this fix: https://github.com/ballerina-platform/module-ballerina-time/actions/runs/11810431587/job/32902393393#step:6:170

Reference: aquasecurity/trivy-action#389

@TharmiganK TharmiganK marked this pull request as ready for review November 13, 2024 04:12
@daneshk
Copy link
Member

daneshk commented Nov 13, 2024

According to the reference, they are suggesting adding the following two envs. Don't we need to add both?

TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db

@TharmiganK
Copy link
Contributor Author

According to the reference, they are suggesting adding the following two envs. Don't we need to add both?

TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db

When I inspect the trivy action step, only the general vulnerability db is getting downloaded.
Anyway, I have add this as well via b58b2ff

@TharmiganK TharmiganK merged commit 19e2c43 into main Nov 13, 2024
2 checks passed
@TharmiganK TharmiganK deleted the fix-trivy-rate-limit branch November 13, 2024 05:01
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.

3 participants