Rename feature flag for evaluator fine-grained parallelism
This commit is contained in:
parent
dad0ebd6ca
commit
06d8f4f7f8
6 changed files with 22 additions and 22 deletions
4
lib/codeql.js
generated
4
lib/codeql.js
generated
|
|
@ -470,10 +470,10 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||
if (querySuitePath) {
|
||||
codeqlArgs.push(querySuitePath);
|
||||
}
|
||||
if (await features.getValue(feature_flags_1.Feature.EvaluatorIntraLayerParallelismEnabled, this)) {
|
||||
if (await features.getValue(feature_flags_1.Feature.EvaluatorFineGrainedParallelismEnabled, this)) {
|
||||
codeqlArgs.push("--intra-layer-parallelism");
|
||||
}
|
||||
else if (await util.codeQlVersionAbove(this, feature_flags_1.CODEQL_VERSION_INTRA_LAYER_PARALLELISM)) {
|
||||
else if (await util.codeQlVersionAbove(this, feature_flags_1.CODEQL_VERSION_FINE_GRAINED_PARALLELISM)) {
|
||||
codeqlArgs.push("--no-intra-layer-parallelism");
|
||||
}
|
||||
await runTool(cmd, codeqlArgs);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
16
lib/feature-flags.js
generated
16
lib/feature-flags.js
generated
|
|
@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.logCodeScanningConfigInCli = exports.useCodeScanningConfigInCli = exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = void 0;
|
||||
exports.logCodeScanningConfigInCli = exports.useCodeScanningConfigInCli = exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_FINE_GRAINED_PARALLELISM = exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = void 0;
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const semver = __importStar(require("semver"));
|
||||
|
|
@ -37,10 +37,10 @@ const DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled";
|
|||
*/
|
||||
exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = "2.13.4";
|
||||
/**
|
||||
* Versions 2.14.0+ of the CodeQL CLI support intra-layer parallelism (aka fine-grained parallelism) options, but we
|
||||
* limit to 2.14.6 onwards, since that's the version that has mitigations against OOM failures.
|
||||
* Evaluator fine-grained parallelism (aka intra-layer parallelism) is only safe to enable in 2.15.1 onwards.
|
||||
* (Some earlier versions recognize the command-line flag, but they contain a bug which makes it unsafe to use).
|
||||
*/
|
||||
exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.6";
|
||||
exports.CODEQL_VERSION_FINE_GRAINED_PARALLELISM = "2.15.1";
|
||||
/**
|
||||
* Versions 2.15.0+ of the CodeQL CLI support new analysis summaries.
|
||||
*/
|
||||
|
|
@ -62,7 +62,7 @@ var Feature;
|
|||
Feature["CppDependencyInstallation"] = "cpp_dependency_installation_enabled";
|
||||
Feature["DisableKotlinAnalysisEnabled"] = "disable_kotlin_analysis_enabled";
|
||||
Feature["DisablePythonDependencyInstallationEnabled"] = "disable_python_dependency_installation_enabled";
|
||||
Feature["EvaluatorIntraLayerParallelismEnabled"] = "evaluator_intra_layer_parallelism_enabled";
|
||||
Feature["EvaluatorFineGrainedParallelismEnabled"] = "evaluator_fine_grained_parallelism_enabled";
|
||||
Feature["ExportDiagnosticsEnabled"] = "export_diagnostics_enabled";
|
||||
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
||||
Feature["SublanguageFileCoverageEnabled"] = "sublanguage_file_coverage_enabled";
|
||||
|
|
@ -94,9 +94,9 @@ exports.featureConfig = {
|
|||
minimumVersion: "2.11.6",
|
||||
defaultValue: true,
|
||||
},
|
||||
[Feature.EvaluatorIntraLayerParallelismEnabled]: {
|
||||
envVar: "CODEQL_EVALUATOR_INTRA_LAYER_PARALLELISM",
|
||||
minimumVersion: exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM,
|
||||
[Feature.EvaluatorFineGrainedParallelismEnabled]: {
|
||||
envVar: "CODEQL_EVALUATOR_FINE_GRAINED_PARALLELISM",
|
||||
minimumVersion: exports.CODEQL_VERSION_FINE_GRAINED_PARALLELISM,
|
||||
defaultValue: false,
|
||||
},
|
||||
[Feature.ExportDiagnosticsEnabled]: {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -14,7 +14,7 @@ import * as api from "./api-client";
|
|||
import type { Config } from "./config-utils";
|
||||
import { EnvVar } from "./environment";
|
||||
import {
|
||||
CODEQL_VERSION_INTRA_LAYER_PARALLELISM,
|
||||
CODEQL_VERSION_FINE_GRAINED_PARALLELISM,
|
||||
CODEQL_VERSION_ANALYSIS_SUMMARY_V2,
|
||||
CodeQLDefaultVersionInfo,
|
||||
Feature,
|
||||
|
|
@ -845,7 +845,7 @@ export async function getCodeQLForCmd(
|
|||
}
|
||||
if (
|
||||
await features.getValue(
|
||||
Feature.EvaluatorIntraLayerParallelismEnabled,
|
||||
Feature.EvaluatorFineGrainedParallelismEnabled,
|
||||
this,
|
||||
)
|
||||
) {
|
||||
|
|
@ -853,7 +853,7 @@ export async function getCodeQLForCmd(
|
|||
} else if (
|
||||
await util.codeQlVersionAbove(
|
||||
this,
|
||||
CODEQL_VERSION_INTRA_LAYER_PARALLELISM,
|
||||
CODEQL_VERSION_FINE_GRAINED_PARALLELISM,
|
||||
)
|
||||
) {
|
||||
codeqlArgs.push("--no-intra-layer-parallelism");
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ const DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled";
|
|||
export const CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = "2.13.4";
|
||||
|
||||
/**
|
||||
* Versions 2.14.0+ of the CodeQL CLI support intra-layer parallelism (aka fine-grained parallelism) options, but we
|
||||
* limit to 2.14.6 onwards, since that's the version that has mitigations against OOM failures.
|
||||
* Evaluator fine-grained parallelism (aka intra-layer parallelism) is only safe to enable in 2.15.1 onwards.
|
||||
* (Some earlier versions recognize the command-line flag, but they contain a bug which makes it unsafe to use).
|
||||
*/
|
||||
export const CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.6";
|
||||
export const CODEQL_VERSION_FINE_GRAINED_PARALLELISM = "2.15.1";
|
||||
|
||||
/**
|
||||
* Versions 2.15.0+ of the CodeQL CLI support new analysis summaries.
|
||||
|
|
@ -60,7 +60,7 @@ export enum Feature {
|
|||
CppDependencyInstallation = "cpp_dependency_installation_enabled",
|
||||
DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled",
|
||||
DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled",
|
||||
EvaluatorIntraLayerParallelismEnabled = "evaluator_intra_layer_parallelism_enabled",
|
||||
EvaluatorFineGrainedParallelismEnabled = "evaluator_fine_grained_parallelism_enabled",
|
||||
ExportDiagnosticsEnabled = "export_diagnostics_enabled",
|
||||
QaTelemetryEnabled = "qa_telemetry_enabled",
|
||||
SublanguageFileCoverageEnabled = "sublanguage_file_coverage_enabled",
|
||||
|
|
@ -96,9 +96,9 @@ export const featureConfig: Record<
|
|||
minimumVersion: "2.11.6",
|
||||
defaultValue: true,
|
||||
},
|
||||
[Feature.EvaluatorIntraLayerParallelismEnabled]: {
|
||||
envVar: "CODEQL_EVALUATOR_INTRA_LAYER_PARALLELISM",
|
||||
minimumVersion: CODEQL_VERSION_INTRA_LAYER_PARALLELISM,
|
||||
[Feature.EvaluatorFineGrainedParallelismEnabled]: {
|
||||
envVar: "CODEQL_EVALUATOR_FINE_GRAINED_PARALLELISM",
|
||||
minimumVersion: CODEQL_VERSION_FINE_GRAINED_PARALLELISM,
|
||||
defaultValue: false,
|
||||
},
|
||||
[Feature.ExportDiagnosticsEnabled]: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue