-
Notifications
You must be signed in to change notification settings - Fork 369
Remove support for combining SARIF runs with non-unique categories #2959
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a feature-flagged error when attempting to combine multiple SARIF runs that share the same category, and updates related merge logic and tests.
- Add
throwIfCombineSarifFilesDisabled
&shouldDisableCombineSarifFiles
to enforce non-unique-category checks behind theDisableCombineSarifFiles
flag. - Extend
combineSarifFilesUsingCLI
to call the new check and update deprecation messaging. - Register and configure
DisableCombineSarifFiles
in the feature flags and expand test coverage accordingly.
Reviewed Changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/upload-lib.ts | Added new helper functions for feature-flagged enforcement and integrated them into merge flow |
src/upload-lib.test.ts | Added comprehensive AVA tests for the new enforcement logic across GitHub variants |
src/feature-flags.ts | Defined the DisableCombineSarifFiles feature flag and its environment default |
lib/* | Generated JavaScript reflecting the above TypeScript changes (mirrors TS sources) |
Comments suppressed due to low confidence (1)
src/upload-lib.ts:182
- You're using
semver.lt
here but there's no import forsemver
. Please addimport * as semver from "semver";
at the top of the file.
) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this and including a bunch of tests! This generally looks good to me.
await throwIfCombineSarifFilesDisabled( | ||
sarifObjects, | ||
features, | ||
gitHubVersion, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the deprecation warning a few lines further down is not necessary if the conditions for this are true. Should it be removed now or later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true, but we can only remove the deprecation warning when the action drops support for GHES 3.17. In all GHES versions between 3.14 (including) and 3.18 (excluding), the action should still show the deprecation warning and should never give this error. Until support for GHES 3.17 is dropped, customers can still sync their action from dotcom to their GHES instance and expect it to work without breaking changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense -- probably also worth tracking then
This removes support for combining SARIF runs with non-unique categories, and will instead throw a configuration error. This behavior is only enabled behind a feature flag.
This is intentionally not backwards compatible when the feature flag is enabled, as this was announced over a year ago and a deprecation warning is shown for every upload that would run into this error.
Merge / deployment checklist