Skip to content

Commit 7273f08

Browse files
authored
Merge pull request #2991 from github/koesie10/remove-disable-combine-sarif-files-ff
Remove `disable_combine_sarif_files` feature flag
2 parents b9b3b12 + 0521b5f commit 7273f08

9 files changed

+28
-98
lines changed

lib/feature-flags.js

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/feature-flags.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js

Lines changed: 6 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.test.js

Lines changed: 12 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/feature-flags.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export enum Feature {
4747
CppBuildModeNone = "cpp_build_mode_none",
4848
CppDependencyInstallation = "cpp_dependency_installation_enabled",
4949
DiffInformedQueries = "diff_informed_queries",
50-
DisableCombineSarifFiles = "disable_combine_sarif_files",
5150
DisableCsharpBuildless = "disable_csharp_buildless",
5251
DisableJavaBuildlessEnabled = "disable_java_buildless_enabled",
5352
DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled",
@@ -137,11 +136,6 @@ export const featureConfig: Record<
137136
envVar: "CODEQL_ACTION_DIFF_INFORMED_QUERIES",
138137
minimumVersion: "2.21.0",
139138
},
140-
[Feature.DisableCombineSarifFiles]: {
141-
defaultValue: false,
142-
envVar: "CODEQL_ACTION_DISABLE_COMBINE_SARIF_FILES",
143-
minimumVersion: undefined,
144-
},
145139
[Feature.DisableCsharpBuildless]: {
146140
defaultValue: false,
147141
envVar: "CODEQL_ACTION_DISABLE_CSHARP_BUILDLESS",

src/upload-lib.test.ts

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import * as path from "path";
33

44
import test from "ava";
55

6-
import { Feature } from "./feature-flags";
76
import { getRunnerLogger, Logger } from "./logging";
8-
import { createFeatures, setupTests } from "./testing-utils";
7+
import { setupTests } from "./testing-utils";
98
import * as uploadLib from "./upload-lib";
109
import { GitHubVariant, initializeEnvironment, withTmpDir } from "./util";
1110

@@ -457,11 +456,10 @@ test("shouldShowCombineSarifFilesDeprecationWarning when environment variable is
457456
);
458457
});
459458

460-
test("throwIfCombineSarifFilesDisabled when on dotcom with feature flag", async (t) => {
459+
test("throwIfCombineSarifFilesDisabled when on dotcom", async (t) => {
461460
await t.throwsAsync(
462461
uploadLib.throwIfCombineSarifFilesDisabled(
463462
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
464-
createFeatures([Feature.DisableCombineSarifFiles]),
465463
{
466464
type: GitHubVariant.DOTCOM,
467465
},
@@ -473,23 +471,10 @@ test("throwIfCombineSarifFilesDisabled when on dotcom with feature flag", async
473471
);
474472
});
475473

476-
test("throwIfCombineSarifFilesDisabled when on dotcom without feature flag", async (t) => {
477-
await t.notThrowsAsync(
478-
uploadLib.throwIfCombineSarifFilesDisabled(
479-
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
480-
createFeatures([]),
481-
{
482-
type: GitHubVariant.DOTCOM,
483-
},
484-
),
485-
);
486-
});
487-
488474
test("throwIfCombineSarifFilesDisabled when on GHES 3.13", async (t) => {
489475
await t.notThrowsAsync(
490476
uploadLib.throwIfCombineSarifFilesDisabled(
491477
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
492-
createFeatures([]),
493478
{
494479
type: GitHubVariant.GHES,
495480
version: "3.13.2",
@@ -502,7 +487,6 @@ test("throwIfCombineSarifFilesDisabled when on GHES 3.14", async (t) => {
502487
await t.notThrowsAsync(
503488
uploadLib.throwIfCombineSarifFilesDisabled(
504489
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
505-
createFeatures([]),
506490
{
507491
type: GitHubVariant.GHES,
508492
version: "3.14.0",
@@ -515,7 +499,6 @@ test("throwIfCombineSarifFilesDisabled when on GHES 3.17", async (t) => {
515499
await t.notThrowsAsync(
516500
uploadLib.throwIfCombineSarifFilesDisabled(
517501
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
518-
createFeatures([]),
519502
{
520503
type: GitHubVariant.GHES,
521504
version: "3.17.0",
@@ -528,7 +511,6 @@ test("throwIfCombineSarifFilesDisabled when on GHES 3.18 pre", async (t) => {
528511
await t.throwsAsync(
529512
uploadLib.throwIfCombineSarifFilesDisabled(
530513
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
531-
createFeatures([]),
532514
{
533515
type: GitHubVariant.GHES,
534516
version: "3.18.0.pre1",
@@ -545,7 +527,6 @@ test("throwIfCombineSarifFilesDisabled when on GHES 3.18 alpha", async (t) => {
545527
await t.throwsAsync(
546528
uploadLib.throwIfCombineSarifFilesDisabled(
547529
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
548-
createFeatures([]),
549530
{
550531
type: GitHubVariant.GHES,
551532
version: "3.18.0-alpha.1",
@@ -562,7 +543,6 @@ test("throwIfCombineSarifFilesDisabled when on GHES 3.18", async (t) => {
562543
await t.throwsAsync(
563544
uploadLib.throwIfCombineSarifFilesDisabled(
564545
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
565-
createFeatures([]),
566546
{
567547
type: GitHubVariant.GHES,
568548
version: "3.18.0",
@@ -579,7 +559,6 @@ test("throwIfCombineSarifFilesDisabled with an invalid GHES version", async (t)
579559
await t.notThrowsAsync(
580560
uploadLib.throwIfCombineSarifFilesDisabled(
581561
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
582-
createFeatures([]),
583562
{
584563
type: GitHubVariant.GHES,
585564
version: "foobar",
@@ -592,7 +571,6 @@ test("throwIfCombineSarifFilesDisabled with only 1 run", async (t) => {
592571
await t.notThrowsAsync(
593572
uploadLib.throwIfCombineSarifFilesDisabled(
594573
[createMockSarif("abc", "def")],
595-
createFeatures([Feature.DisableCombineSarifFiles]),
596574
{
597575
type: GitHubVariant.DOTCOM,
598576
},
@@ -604,7 +582,6 @@ test("throwIfCombineSarifFilesDisabled with distinct categories", async (t) => {
604582
await t.notThrowsAsync(
605583
uploadLib.throwIfCombineSarifFilesDisabled(
606584
[createMockSarif("abc", "def"), createMockSarif("def", "def")],
607-
createFeatures([Feature.DisableCombineSarifFiles]),
608585
{
609586
type: GitHubVariant.DOTCOM,
610587
},
@@ -616,7 +593,6 @@ test("throwIfCombineSarifFilesDisabled with distinct tools", async (t) => {
616593
await t.notThrowsAsync(
617594
uploadLib.throwIfCombineSarifFilesDisabled(
618595
[createMockSarif("abc", "abc"), createMockSarif("abc", "def")],
619-
createFeatures([Feature.DisableCombineSarifFiles]),
620596
{
621597
type: GitHubVariant.DOTCOM,
622598
},

0 commit comments

Comments
 (0)