Skip to content

Mark invalid SARIF errors as user errors in the upload-sarif Action#1872

Merged
henrymercer merged 3 commits intomainfrom
henrymercer/user-errors-for-upload-sarif
Sep 7, 2023
Merged

Mark invalid SARIF errors as user errors in the upload-sarif Action#1872
henrymercer merged 3 commits intomainfrom
henrymercer/user-errors-for-upload-sarif

Conversation

@henrymercer
Copy link
Contributor

@henrymercer henrymercer commented Sep 6, 2023

Found this while I was looking at CodeQL Action telemetry as I rolled out some other changes.

Categorizing user errors correctly in telemetry helps us detect and respond to incidents faster. This PR starts marking invalid SARIF upload requests as UserError when users use the upload-sarif Action, as here the SARIF is not under our control, and things like invalid paths or invalid SARIF are not problems with our service. On the other hand, when uploading SARIF in the analyze or init-post steps, invalid SARIF upload requests remain Errors, since these could indicate a problem with our service.

Suggestions for a better name for invalidRequestIsUserError welcome — this felt a little awkward.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@henrymercer henrymercer requested a review from a team as a code owner September 6, 2023 20:04
angelapwen
angelapwen previously approved these changes Sep 6, 2023
Copy link
Contributor

@angelapwen angelapwen left a comment

Choose a reason for hiding this comment

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

Thanks!!

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: could we we suffix this with Error?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe considerInvalidRequestUserError makes more sense to me, though it's not more concise 😆

Copy link
Contributor

@angelapwen angelapwen left a comment

Choose a reason for hiding this comment

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

🥳

@henrymercer henrymercer merged commit 43750fe into main Sep 7, 2023
@henrymercer henrymercer deleted the henrymercer/user-errors-for-upload-sarif branch September 7, 2023 21:46
@github-actions github-actions bot mentioned this pull request Sep 13, 2023
6 tasks
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

Comments