Merge pull request #1818 from github/nickrolfe/disable-intra-layer-parallelism
Pass explicit option to disable intra-layer parallelism
This commit is contained in:
commit
a6b0ced86b
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)) {
|
if (await features.getValue(feature_flags_1.Feature.EvaluatorIntraLayerParallelismEnabled, this)) {
|
||||||
codeqlArgs.push("--intra-layer-parallelism");
|
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);
|
await runTool(cmd, codeqlArgs);
|
||||||
},
|
},
|
||||||
async databaseInterpretResults(databasePath, querySuitePaths, sarifFile, addSnippetsFlag, threadsFlag, verbosityFlag, automationDetailsId, config, features, logger) {
|
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;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
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 fs = __importStar(require("fs"));
|
||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
const semver = __importStar(require("semver"));
|
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.
|
* Versions 2.14.0+ of the CodeQL CLI support new analysis summaries.
|
||||||
*/
|
*/
|
||||||
exports.CODEQL_VERSION_NEW_ANALYSIS_SUMMARY = "2.14.0";
|
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.
|
* Feature enablement as returned by the GitHub API endpoint.
|
||||||
*
|
*
|
||||||
|
|
@ -71,7 +75,7 @@ exports.featureConfig = {
|
||||||
},
|
},
|
||||||
[Feature.EvaluatorIntraLayerParallelismEnabled]: {
|
[Feature.EvaluatorIntraLayerParallelismEnabled]: {
|
||||||
envVar: "CODEQL_EVALUATOR_INTRA_LAYER_PARALLELISM",
|
envVar: "CODEQL_EVALUATOR_INTRA_LAYER_PARALLELISM",
|
||||||
minimumVersion: "2.14.0",
|
minimumVersion: exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM,
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
[Feature.ExportDiagnosticsEnabled]: {
|
[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 type { Config } from "./config-utils";
|
||||||
import { EnvVar } from "./environment";
|
import { EnvVar } from "./environment";
|
||||||
import {
|
import {
|
||||||
|
CODEQL_VERSION_INTRA_LAYER_PARALLELISM,
|
||||||
CODEQL_VERSION_NEW_ANALYSIS_SUMMARY,
|
CODEQL_VERSION_NEW_ANALYSIS_SUMMARY,
|
||||||
CodeQLDefaultVersionInfo,
|
CodeQLDefaultVersionInfo,
|
||||||
Feature,
|
Feature,
|
||||||
|
|
@ -787,6 +788,13 @@ export async function getCodeQLForCmd(
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
codeqlArgs.push("--intra-layer-parallelism");
|
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);
|
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";
|
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 {
|
export interface CodeQLDefaultVersionInfo {
|
||||||
cliVersion: string;
|
cliVersion: string;
|
||||||
tagName: string;
|
tagName: string;
|
||||||
|
|
@ -71,7 +76,7 @@ export const featureConfig: Record<
|
||||||
},
|
},
|
||||||
[Feature.EvaluatorIntraLayerParallelismEnabled]: {
|
[Feature.EvaluatorIntraLayerParallelismEnabled]: {
|
||||||
envVar: "CODEQL_EVALUATOR_INTRA_LAYER_PARALLELISM",
|
envVar: "CODEQL_EVALUATOR_INTRA_LAYER_PARALLELISM",
|
||||||
minimumVersion: "2.14.0",
|
minimumVersion: CODEQL_VERSION_INTRA_LAYER_PARALLELISM,
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
[Feature.ExportDiagnosticsEnabled]: {
|
[Feature.ExportDiagnosticsEnabled]: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue