Skip to content

Remove git checks in SBOM payload generation#1487

Merged
tanishq-dubey merged 8 commits into
masterfrom
tdubey/STAL-3069/specify-missing-fields
Nov 18, 2024
Merged

Remove git checks in SBOM payload generation#1487
tanishq-dubey merged 8 commits into
masterfrom
tdubey/STAL-3069/specify-missing-fields

Conversation

@tanishq-dubey

@tanishq-dubey tanishq-dubey commented Oct 31, 2024

Copy link
Copy Markdown
Contributor

What and why?

STAL-3069

  • If all required git tags are not in our analysis, we returned a generic failure message on payload upload. This made debugging difficult for users. We are now returning the specific git tags that are missing to make debugging easier.

How?

This change adds a new error message renderer for missing git fields, and changes the tag requirement logic to share it between the error renderer and the generatePayload check

Must of this ticket was completed in #1489, this PR finishes up the error handling in the payload.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)

@tanishq-dubey tanishq-dubey self-assigned this Oct 31, 2024
@tanishq-dubey tanishq-dubey added enhancement New feature or request static-analysis Related to [sarif, sbom] chores Related to the CI or developer experience labels Oct 31, 2024
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Nov 12, 2024

Copy link
Copy Markdown

Datadog Report

Branch report: tdubey/STAL-3069/specify-missing-fields
Commit report: 51f88f0
Test service: datadog-ci-tests

✅ 0 Failed, 152 Passed, 0 Skipped, 1m 13.86s Total duration (2m 16.3s time saved)

@tanishq-dubey tanishq-dubey force-pushed the tdubey/STAL-3069/specify-missing-fields branch from 5456445 to 820afe8 Compare November 12, 2024 20:34
@tanishq-dubey tanishq-dubey marked this pull request as ready for review November 12, 2024 20:36
@tanishq-dubey tanishq-dubey requested review from a team as code owners November 12, 2024 20:36
@tanishq-dubey tanishq-dubey force-pushed the tdubey/STAL-3069/specify-missing-fields branch from 820afe8 to e21c8c0 Compare November 12, 2024 20:41
@tanishq-dubey tanishq-dubey changed the title Show missing git fields instead of a generic message Remove git checks in SBOM payload generation Nov 12, 2024
Comment thread package.json Outdated
{
"name": "@datadog/datadog-ci",
"version": "2.45.0",
"version": "2.46.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This won't be a breaking change, so we might want to bump the patch version only?

@Drarig29 Drarig29 Nov 13, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@tanishq-dubey can you undo this change in your PR? Bumping the version in package.json is part of the release process and should be done in its own PR 🙇

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Drarig29 I can remove the version bump from this PR and create a new one for the release.

@dastrong dastrong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

None blocking nit

Comment thread src/commands/sbom/payload.ts
Comment thread src/commands/sbom/payload.ts Outdated
@tanishq-dubey tanishq-dubey force-pushed the tdubey/STAL-3069/specify-missing-fields branch from 402b287 to f063dd5 Compare November 18, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chores Related to the CI or developer experience enhancement New feature or request static-analysis Related to [sarif, sbom]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants