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

Refactoring: Simplify upload SARIF flow and reuse loaded flags #2361

Merged
merged 7 commits into from
Jul 8, 2024

Conversation

henrymercer
Copy link
Contributor

Minor refactoring to simplify the flow for uploading SARIF files, and to reuse the loaded feature flags if we've already loaded them from disk or from the API.

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 July 1, 2024 12:01
@henrymercer henrymercer force-pushed the henrymercer/simplify-actions-only branch from eae5c66 to bfdafbc Compare July 1, 2024 12:40
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.

Looks like a general improvement, but just want to make sure about the payload change.

analysisKey,
analysisName,
category,
Copy link
Contributor

Choose a reason for hiding this comment

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

Previously, this was analysisName, but that doesn't look right since the util.getRequiredEnvParam("GITHUB_WORKFLOW") was being passed in. Now you're using category. This seems to be correct now, but will that mess up anything with our teleemtry since we're changing what we're stuffing into the analysis_name field of the payload?

Copy link
Contributor Author

@henrymercer henrymercer Jul 8, 2024

Choose a reason for hiding this comment

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

You're right, let's keep it the same. My understanding is the category in the SARIF overrides what we have in the analysis_name field, and GITHUB_WORKFLOW gives the job name, which we could use as a fallback. We might be able to stop specifying the analysis_name field if we're sure we're always specifying a category in the SARIF, but I'll leave that cleanup for later.

@henrymercer henrymercer merged commit 6e04d51 into main Jul 8, 2024
310 checks passed
@henrymercer henrymercer deleted the henrymercer/simplify-actions-only branch July 8, 2024 15:47
@angelapwen
Copy link
Contributor

💭 The submit SARIF after failure workflow on main seems to be failing now after this was merged 😢 (though I'm not sure why it didn't fail in this PR's checks).

@aeisenberg
Copy link
Contributor

The latest run on main is passing, but I see the run associated with #2364 is failing. I'm rerunning since it might be transient.

@aeisenberg
Copy link
Contributor

...and it passed! So, guessing the error came from the server side.

@henrymercer
Copy link
Contributor Author

henrymercer commented Jul 8, 2024

This was due to an internal experiment on the API endpoints (unrelated to this PR). The relevant feature flag is now disabled. I've cced you in Slack.

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