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

Tolerate unexpected processing statuses for unsuccessful execution SARIF uploads #1732

Merged
merged 2 commits into from
Jun 19, 2023

Conversation

henrymercer
Copy link
Contributor

There is a known transient issue with the code scanning API where it sometimes reports complete for an unsuccessful execution submission. The API should always report failed with a single "unsuccessful execution" processing error.

Previously the CodeQL Action threw an error when it received an unexpected processing status. This PR relaxes this behaviour to:

  • If we receive complete, print a debug log instead, since this transient issue does not typically indicate that code scanning status information will be out of date.
  • If we receive failed with other processing errors, print a warning, such that Actions will focus on the earlier failure when a user views the workflow run. The failure that caused us to upload an unsuccessful execution SARIF file is probably more relevant than the failure to upload this SARIF file.

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 June 14, 2023 13:20
@henrymercer henrymercer force-pushed the henrymercer/tolerate-unexpected-processing-statuses branch from 4419fb4 to 4d7934a Compare June 14, 2023 13:21
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 for the detailed description, just a suggestion for the debug log!

src/upload-lib.ts Outdated Show resolved Hide resolved
angelapwen

This comment was marked as duplicate.

@henrymercer henrymercer force-pushed the henrymercer/tolerate-unexpected-processing-statuses branch from 1a27e21 to d6201b5 Compare June 16, 2023 10:18
@henrymercer henrymercer merged commit de74ca6 into main Jun 19, 2023
@henrymercer henrymercer deleted the henrymercer/tolerate-unexpected-processing-statuses branch June 19, 2023 09:06
@github-actions github-actions bot mentioned this pull request Jun 21, 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