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 the robustness of creating and uploading debug artifacts #2486

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

henrymercer
Copy link
Contributor

Tolerate failures when creating and uploading debug artifacts, and add a fallback such that if bundling the database with the CLI fails, we will fall back to creating a partial database bundle.

Also use a helper function to simplify the common pattern wrapError(e).message.

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 16, 2024 21:13
Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

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

Just a jsdoc comment that can be improved. Otherwise, 👍🏼 .

Comment on lines +69 to +73
/**
* Try to get the SARIF result path for the given language.
*
* If an error occurs, log it and return an empty list.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment and the function name are a little misleading because this function has a side effect that is not mentioned or implied.

Copy link
Contributor Author

@henrymercer henrymercer Sep 17, 2024

Choose a reason for hiding this comment

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

Good point, I'll get the PR in and address this as follow up.

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.

Also looks good to me! Makes sense, the original refactor dropped some of the error catching where the original debug artifact upload methods were called 👍

@henrymercer henrymercer merged commit 782de45 into main Sep 17, 2024
312 checks passed
@henrymercer henrymercer deleted the henrymercer/improve-debug-artifact-robustness branch September 17, 2024 07:47
@github-actions github-actions bot mentioned this pull request Sep 19, 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.

3 participants