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

✨ Do not error out on SBOM generation, use the sbom ErrorMessage instead #5202

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

preslavgerchev
Copy link
Contributor

@preslavgerchev preslavgerchev commented Feb 10, 2025

This ensures that if the SBOM query pack errors out, we still get an SBOM pack with a status of Failed and the correct error message. If one of the queries error out the whole SBOM generation will fail. For example, this report will fail without the current changes:

// this is just the sbom packages piece, the rest is omitted for brevity
"//local.cnquery.io/run/local-execution/queries/mondoo-sbom-packages": {
                    "content": {
                        "packages.list": {
                            "error": "error fetching sbom packages for some reason"
                        }
                    }
                }

…ead.

Signed-off-by: Preslav <preslav@mondoo.com>
Copy link
Contributor

github-actions bot commented Feb 10, 2025

Test Results

3 288 tests  +2   3 284 ✅ +2   2m 7s ⏱️ +27s
  385 suites ±0       4 💤 ±0 
   29 files   ±0       0 ❌ ±0 

Results for commit bc0dd27. ± Comparison against base commit 4fc37ac.

♻️ This comment has been updated with latest results.

…ore.

Signed-off-by: Preslav <preslav@mondoo.com>
Copy link
Member

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

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

Thank you @preslavgerchev

@preslavgerchev preslavgerchev merged commit e3c2a46 into main Feb 10, 2025
17 checks passed
@preslavgerchev preslavgerchev deleted the preslav/no-fail-sbom branch February 10, 2025 19:41
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants