Remove feature flag for uploading failed SARIF
This commit is contained in:
parent
c8e99083da
commit
d2b37ba145
12 changed files with 24 additions and 24 deletions
|
|
@ -316,6 +316,12 @@ const GHES_MOST_RECENT_DEPRECATION_DATE = "2023-09-12";
|
|||
* flag is older than the oldest supported version above, it may be removed.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Versions 2.13.3+ of the CodeQL CLI support exporting a failed SARIF file via
|
||||
* `codeql database export-diagnostics` or `codeql diagnostics export`.
|
||||
*/
|
||||
export const CODEQL_VERSION_EXPORT_FAILED_SARIF = "2.11.3";
|
||||
|
||||
const CODEQL_VERSION_FILE_BASELINE_INFORMATION = "2.11.3";
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ export enum Feature {
|
|||
EvaluatorIntraLayerParallelismEnabled = "evaluator_intra_layer_parallelism_enabled",
|
||||
ExportDiagnosticsEnabled = "export_diagnostics_enabled",
|
||||
QaTelemetryEnabled = "qa_telemetry_enabled",
|
||||
UploadFailedSarifEnabled = "upload_failed_sarif_enabled",
|
||||
}
|
||||
|
||||
export const featureConfig: Record<
|
||||
|
|
@ -94,11 +93,6 @@ export const featureConfig: Record<
|
|||
minimumVersion: undefined,
|
||||
defaultValue: false,
|
||||
},
|
||||
[Feature.UploadFailedSarifEnabled]: {
|
||||
envVar: "CODEQL_ACTION_UPLOAD_FAILED_SARIF",
|
||||
minimumVersion: "2.11.3",
|
||||
defaultValue: true,
|
||||
},
|
||||
[Feature.DisablePythonDependencyInstallationEnabled]: {
|
||||
envVar: "CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION",
|
||||
// Although the python extractor only started supporting not extracting installed
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ async function testFailedSarifUpload(
|
|||
} as uploadLib.UploadResult);
|
||||
const waitForProcessing = sinon.stub(uploadLib, "waitForProcessing");
|
||||
|
||||
const features = [Feature.UploadFailedSarifEnabled];
|
||||
const features = [] as Feature[];
|
||||
if (exportDiagnosticsEnabled) {
|
||||
features.push(Feature.ExportDiagnosticsEnabled);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import * as core from "@actions/core";
|
||||
|
||||
import * as actionsUtil from "./actions-util";
|
||||
import { getCodeQL } from "./codeql";
|
||||
import { CODEQL_VERSION_EXPORT_FAILED_SARIF, getCodeQL } from "./codeql";
|
||||
import { Config, getConfig } from "./config-utils";
|
||||
import { EnvVar } from "./environment";
|
||||
import { Feature, FeatureEnablement } from "./feature-flags";
|
||||
|
|
@ -9,6 +9,7 @@ import { Logger } from "./logging";
|
|||
import { RepositoryNwo } from "./repository";
|
||||
import * as uploadLib from "./upload-lib";
|
||||
import {
|
||||
codeQlVersionAbove,
|
||||
getRequiredEnvParam,
|
||||
isInTestMode,
|
||||
parseMatrixInput,
|
||||
|
|
@ -54,8 +55,8 @@ async function maybeUploadFailedSarif(
|
|||
return { upload_failed_run_skipped_because: "CodeQL command not found" };
|
||||
}
|
||||
const codeql = await getCodeQL(config.codeQLCmd);
|
||||
if (!(await features.getValue(Feature.UploadFailedSarifEnabled, codeql))) {
|
||||
return { upload_failed_run_skipped_because: "Feature disabled" };
|
||||
if (!(await codeQlVersionAbove(codeql, CODEQL_VERSION_EXPORT_FAILED_SARIF))) {
|
||||
return { upload_failed_run_skipped_because: "Unsupported by CodeQL CLI" };
|
||||
}
|
||||
const workflow = await getWorkflow(logger);
|
||||
const jobName = getRequiredEnvParam("GITHUB_JOB");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue