Pass explicit option to disable intra-layer parallelism
This commit is contained in:
parent
cf445f7cf3
commit
c7b7456c9e
6 changed files with 25 additions and 5 deletions
3
lib/codeql.js
generated
3
lib/codeql.js
generated
|
|
@ -442,6 +442,9 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||
if (await features.getValue(feature_flags_1.Feature.EvaluatorIntraLayerParallelismEnabled, this)) {
|
||||
codeqlArgs.push("--intra-layer-parallelism");
|
||||
}
|
||||
else if (await util.codeQlVersionAbove(this, feature_flags_1.CODEQL_VERSION_INTRA_LAYER_PARALLELISM)) {
|
||||
codeqlArgs.push("--no-intra-layer-parallelism");
|
||||
}
|
||||
await runTool(cmd, codeqlArgs);
|
||||
},
|
||||
async databaseInterpretResults(databasePath, querySuitePaths, sarifFile, addSnippetsFlag, threadsFlag, verbosityFlag, automationDetailsId, config, features, logger) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
8
lib/feature-flags.js
generated
8
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_NEW_ANALYSIS_SUMMARY = 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_INTRA_LAYER_PARALLELISM = exports.CODEQL_VERSION_NEW_ANALYSIS_SUMMARY = exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = void 0;
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const semver = __importStar(require("semver"));
|
||||
|
|
@ -40,6 +40,10 @@ exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = "2.13.4";
|
|||
* Versions 2.14.0+ of the CodeQL CLI support new analysis summaries.
|
||||
*/
|
||||
exports.CODEQL_VERSION_NEW_ANALYSIS_SUMMARY = "2.14.0";
|
||||
/**
|
||||
* Versions 2.14.0+ of the CodeQL CLI support intra-layer parallelism (aka fine-grained parallelism) options.
|
||||
*/
|
||||
exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.0";
|
||||
/**
|
||||
* Feature enablement as returned by the GitHub API endpoint.
|
||||
*
|
||||
|
|
@ -71,7 +75,7 @@ exports.featureConfig = {
|
|||
},
|
||||
[Feature.EvaluatorIntraLayerParallelismEnabled]: {
|
||||
envVar: "CODEQL_EVALUATOR_INTRA_LAYER_PARALLELISM",
|
||||
minimumVersion: "2.14.0",
|
||||
minimumVersion: exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM,
|
||||
defaultValue: false,
|
||||
},
|
||||
[Feature.ExportDiagnosticsEnabled]: {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -10,6 +10,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_NEW_ANALYSIS_SUMMARY,
|
||||
CodeQLDefaultVersionInfo,
|
||||
Feature,
|
||||
|
|
@ -787,6 +788,13 @@ export async function getCodeQLForCmd(
|
|||
)
|
||||
) {
|
||||
codeqlArgs.push("--intra-layer-parallelism");
|
||||
} else if (
|
||||
await util.codeQlVersionAbove(
|
||||
this,
|
||||
CODEQL_VERSION_INTRA_LAYER_PARALLELISM,
|
||||
)
|
||||
) {
|
||||
codeqlArgs.push("--no-intra-layer-parallelism");
|
||||
}
|
||||
await runTool(cmd, codeqlArgs);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@ export const CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = "2.13.4";
|
|||
*/
|
||||
export const CODEQL_VERSION_NEW_ANALYSIS_SUMMARY = "2.14.0";
|
||||
|
||||
/**
|
||||
* Versions 2.14.0+ of the CodeQL CLI support intra-layer parallelism (aka fine-grained parallelism) options.
|
||||
*/
|
||||
export const CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.0";
|
||||
|
||||
export interface CodeQLDefaultVersionInfo {
|
||||
cliVersion: string;
|
||||
tagName: string;
|
||||
|
|
@ -71,7 +76,7 @@ export const featureConfig: Record<
|
|||
},
|
||||
[Feature.EvaluatorIntraLayerParallelismEnabled]: {
|
||||
envVar: "CODEQL_EVALUATOR_INTRA_LAYER_PARALLELISM",
|
||||
minimumVersion: "2.14.0",
|
||||
minimumVersion: CODEQL_VERSION_INTRA_LAYER_PARALLELISM,
|
||||
defaultValue: false,
|
||||
},
|
||||
[Feature.ExportDiagnosticsEnabled]: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue