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

Mark limits errors from third-party SARIF uploads as configuration errors #2173

Conversation

henrymercer
Copy link
Contributor

I think this was the intention of the original PR, but the place that we were converting InvalidSarifUploadErrors to ConfigurationErrors wasn't including processing errors.

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.

Nitty: make it a little clearer when this shows up in the logs what type of request we mean
@henrymercer henrymercer requested a review from a team as a code owner February 28, 2024 19:43
@@ -286,7 +286,6 @@ async function run() {
actionsUtil.getRequiredInput("checkout_path"),
actionsUtil.getOptionalInput("category"),
logger,
{ isThirdPartyUpload: false },
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I understand why we can remove isThirdPartyUpload here: wouldn't this mean that we are also marking first-party upload failures as configuration errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've moved the logic where we convert InvalidSarifUploadErrors to ConfigurationErrors to upload-sarif-action.ts, which is the only place where we had isThirdPartyUpload: true. So where we had { isThirdPartyUpload: false }, we will not convert the InvalidSarifUploadErrors to ConfigurationErrors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've also pushed a couple of commits so that we don't convert InvalidSarifUploadErrors to ConfigurationErrors when we're a first-party analysis as determined by our existing status report functionality.

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense 👍

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.

Looks good to me 👍 after this is merged I'll kick off an Action release to get this + the SyntaxError changes in.

@henrymercer henrymercer merged commit ccd3f02 into main Feb 29, 2024
297 checks passed
@henrymercer henrymercer deleted the henrymercer/mark-third-party-limits-errors-as-configuration-errors branch February 29, 2024 11:56
@github-actions github-actions bot mentioned this pull request Feb 29, 2024
8 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.

None yet

2 participants