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

ci(trivy): fix scan failures due to TOOMANYREQUESTS DB error #3659

Merged

Conversation

aldousalvarez
Copy link
Contributor

Commit to be reviewed


ci(trivy): fix scan failures due to TOOMANYREQUESTS DB error

Primary Changes
----------------
1. Updated the ci.yaml to make the trivy scan 
   run only on the weekends

Fixes #3652

Pull Request Requirements

  • Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.
  • Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.
  • Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

  • Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
  • Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

@outSH
Copy link
Contributor

outSH commented Nov 29, 2024

Looks fine, but I'd rather have a separate "weekly" job triggered by cron (https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule), it will be easier to see and add new weekly jobs, and it doesn't convolute our CI job with more prerequisites. @petermetz any thoughts?

@aldousalvarez aldousalvarez force-pushed the aldousalvarez/issue3652 branch from 6cb6a17 to 7b88789 Compare November 29, 2024 12:21
@petermetz
Copy link
Contributor

Looks fine, but I'd rather have a separate "weekly" job triggered by cron (https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule), it will be easier to see and add new weekly jobs, and it doesn't convolute our CI job with more prerequisites. @petermetz any thoughts?

@outSH Can't say I disagree. I would love to remove the code from the diff that calculates the day of the week.

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@aldousalvarez Looks good in general, but please incorporate the change request from @outSH

@aldousalvarez
Copy link
Contributor Author

Hello @petermetz and @outSH, done with the requested changes and incorporated it. Re-requested for review. Thank you

@aldousalvarez aldousalvarez force-pushed the aldousalvarez/issue3652 branch 2 times, most recently from 11063bb to 88be4d0 Compare December 2, 2024 11:33
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

LGTM

@petermetz petermetz force-pushed the aldousalvarez/issue3652 branch from 55a86d1 to 597cf11 Compare December 4, 2024 16:07
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@aldousalvarez On second thought, are you sure you didn't just disable running ci.yaml in pull requests completely? I noticed after a rebase that the jobs are not running at all. Could be a coincidence but it could also be that the new scheduling overrides the other declarations that make it so that ci.yaml should run for each PR? Could you please double check the github docs?

@aldousalvarez
Copy link
Contributor Author

@petermetz Okay, I will take a look into this. I think the scheduled workflow will only run on the default branch so I will test it on my fork.

@petermetz
Copy link
Contributor

@petermetz Okay, I will take a look into this. I think the scheduled workflow will only run on the default branch so I will test it on my fork.

@aldousalvarez Thank you! As I'm typing this, the checks on this PR are still stuck in 'waiting for status to be reported' so it is looking more and more like the schedule is having some sort of negative side effect here (I'd love to be wrong here though)

build-dev Expected — Waiting for status to be reported
Required
cactus-common Expected — Waiting for status to be reported
Required
cactus-core Expected — Waiting for status to be reported
Required
cactus-core-api Expected — Waiting for status to be reported
Required
yarn_codegen Expected — Waiting for status to be reported
Required
yarn_custom_checks Expected — Waiting for status to be reported
Required
yarn_lint Expected — Waiting for status to be reported
Required
yarn_tools_validate_bundle_names Expected — Waiting for status to be reported
Required

@aldousalvarez aldousalvarez force-pushed the aldousalvarez/issue3652 branch from 597cf11 to 5c643ef Compare December 5, 2024 03:38
@aldousalvarez
Copy link
Contributor Author

aldousalvarez commented Dec 5, 2024

@petermetz It is now working. What I did was I cleaned the code and added the changes again, I think it is some lint error or whitespaces that is why it did not read the condition from before.

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@aldousalvarez Got it, thank you!

Primary Changes
----------------
1. Updated the ci.yaml to make the trivy scan
   run only on the weekends

Fixes hyperledger-cacti#3652

Signed-off-by: aldousalvarez <[email protected]>
@petermetz petermetz force-pushed the aldousalvarez/issue3652 branch from 5c643ef to 97b727c Compare December 6, 2024 16:14
@petermetz petermetz merged commit 389f376 into hyperledger-cacti:main Dec 6, 2024
134 of 137 checks passed
@petermetz petermetz deleted the aldousalvarez/issue3652 branch December 6, 2024 17:25
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.

ci(trivy): fix scan failures due to TOOMANYREQUESTS DB error
3 participants