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

Refactor repotests #729

Merged
merged 4 commits into from
Nov 20, 2023
Merged

Refactor repotests #729

merged 4 commits into from
Nov 20, 2023

Conversation

Nikemare
Copy link
Contributor

  1. I splitted the big repotests step into multiple smaller steps.
  2. -p flag added were it was missing
  3. Ensured each result is written into bomresults folder
  4. Ensured unique naming of output file
  5. More consistent flag vaules (true/false vs 0/1)
  6. ls -ltr bomresults after all steps writing bom files into this folder

This should help to identify long running repotests or were problems exactly occured.

bin/cdxgen.js -p -r -t java repotests/shiftleft-java-example -o bomresults/bom-java.json --generate-key-and-sign --spec-version 1.4
SBOM_SIGN_ALGORITHM=RS512 SBOM_SIGN_PRIVATE_KEY=bomresults/private.key SBOM_SIGN_PUBLIC_KEY=bomresults/public.key bin/cdxgen.js -p -r -t github repotests/shiftleft-java-example -o bomresults/bom-github.json --spec-version 1.4
FETCH_LICENSE=false bin/cdxgen.js -p -r -t js repotests/shiftleft-ts-example -o bomresults/bom-ts.json --validate --spec-version 1.4
FETCH_LICENSE=1 bin/cdxgen.js -p -r -t js repotests/shiftleft-ts-example --required-only -o bomresults/bom-ts.json --validate --spec-version 1.4
Copy link
Collaborator

Choose a reason for hiding this comment

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

The idea was that some users were using 0 and 1 so we had tests to ensure those continued to work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, restored some FETCH_LICENSE with 0 and 1 instead of true / false

Copy link
Collaborator

@prabhu prabhu left a comment

Choose a reason for hiding this comment

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

Very good idea! Thank you so much!

@prabhu prabhu merged commit ef8675f into CycloneDX:master Nov 20, 2023
17 checks passed
@prabhu
Copy link
Collaborator

prabhu commented Nov 21, 2023

@Nikemare looks like we are running out of disk space which is a known github issue.

https://github.com/CycloneDX/cdxgen/actions/runs/6937263539/job/18870984681

could you add the trim ci agent to the job?

https://github.com/CycloneDX/cdxgen/blob/master/.github/workflows/npm-release.yml#L28

@Nikemare
Copy link
Contributor Author

@prabhu I saw you already did add the trim ci agent. Anything else I can support here. I hope my change did not trigger the failing of repotests now.

@prabhu
Copy link
Collaborator

prabhu commented Nov 21, 2023

@Nikemare, trim doesn't seem to be helping. Not sure when the tests started failing but any help would be appreciated!

@Nikemare
Copy link
Contributor Author

@prabhu created a pullrequest with step ha-android temporirly commented out. Lets see if it will run through. Also I registered at Slack for more direct communication if you prefer.

@Nikemare Nikemare deleted the refactor-repotests branch November 21, 2023 20:22
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.

2 participants