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

Improve reporting failed runs via SARIF #1444

Merged
merged 7 commits into from
Jan 4, 2023

Conversation

henrymercer
Copy link
Contributor

This PR makes some minor improvements to the way we report failed runs via SARIF. The first commit adjusts the pre-check to check whether the analyze Action has completed, to allow a quicker short circuit exit when upload: false is specified but the workflow run was successful. The remaining commits improve error messages.

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.

This doesn’t affect the overall behaviour, but means we can
short-circuit slightly more quickly when `analyze` is passed
`upload: false`.
We now report errors via telemetry, and this feature will shortly be
enabled by default.
@henrymercer henrymercer requested a review from a team as a code owner December 21, 2022 11:42
angelapwen
angelapwen previously approved these changes Dec 21, 2022
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.

✅, optionally could rename uploadFailedSarif function 😸

Test results directly via return value of `testFailedSarifUpload` vs
via checking log messages.
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, thanks for renaming + adding extra tests! 😄

@henrymercer henrymercer merged commit ff3337e into main Jan 4, 2023
@henrymercer henrymercer deleted the henrymercer/reporting-failed-run-improvements branch January 4, 2023 10:43
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