mirror of
https://github.com/github/codeql-action.git
synced 2025-12-23 07:40:10 +08:00
Deprecate fine-grained parallelism feature-flag
This commit is contained in:
2
lib/analyze.js
generated
2
lib/analyze.js
generated
@@ -158,7 +158,7 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag,
|
|||||||
logger.startGroup(`Running queries for ${language}`);
|
logger.startGroup(`Running queries for ${language}`);
|
||||||
const startTimeRunQueries = new Date().getTime();
|
const startTimeRunQueries = new Date().getTime();
|
||||||
const databasePath = util.getCodeQLDatabasePath(config, language);
|
const databasePath = util.getCodeQLDatabasePath(config, language);
|
||||||
await codeql.databaseRunQueries(databasePath, queryFlags, features);
|
await codeql.databaseRunQueries(databasePath, queryFlags);
|
||||||
logger.debug(`Finished running queries for ${language}.`);
|
logger.debug(`Finished running queries for ${language}.`);
|
||||||
// TODO should not be using `builtin` here. We should be using `all` instead.
|
// TODO should not be using `builtin` here. We should be using `all` instead.
|
||||||
// The status report does not support `all` yet.
|
// The status report does not support `all` yet.
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
7
lib/codeql.js
generated
7
lib/codeql.js
generated
@@ -456,7 +456,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
throw new Error(`Unexpected output from codeql resolve build-environment: ${e} in\n${output}`);
|
throw new Error(`Unexpected output from codeql resolve build-environment: ${e} in\n${output}`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async databaseRunQueries(databasePath, flags, features) {
|
async databaseRunQueries(databasePath, flags) {
|
||||||
const codeqlArgs = [
|
const codeqlArgs = [
|
||||||
"database",
|
"database",
|
||||||
"run-queries",
|
"run-queries",
|
||||||
@@ -469,12 +469,9 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
if (await util.supportExpectDiscardedCache(this)) {
|
if (await util.supportExpectDiscardedCache(this)) {
|
||||||
codeqlArgs.push("--expect-discarded-cache");
|
codeqlArgs.push("--expect-discarded-cache");
|
||||||
}
|
}
|
||||||
if (await features.getValue(feature_flags_1.Feature.EvaluatorFineGrainedParallelismEnabled, this)) {
|
if (await util.codeQlVersionAbove(this, feature_flags_1.CODEQL_VERSION_FINE_GRAINED_PARALLELISM)) {
|
||||||
codeqlArgs.push("--intra-layer-parallelism");
|
codeqlArgs.push("--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);
|
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
6
lib/feature-flags.js
generated
6
lib/feature-flags.js
generated
@@ -54,7 +54,6 @@ var Feature;
|
|||||||
Feature["DisableKotlinAnalysisEnabled"] = "disable_kotlin_analysis_enabled";
|
Feature["DisableKotlinAnalysisEnabled"] = "disable_kotlin_analysis_enabled";
|
||||||
Feature["DisablePythonDependencyInstallationEnabled"] = "disable_python_dependency_installation_enabled";
|
Feature["DisablePythonDependencyInstallationEnabled"] = "disable_python_dependency_installation_enabled";
|
||||||
Feature["PythonDefaultIsToSkipDependencyInstallationEnabled"] = "python_default_is_to_skip_dependency_installation_enabled";
|
Feature["PythonDefaultIsToSkipDependencyInstallationEnabled"] = "python_default_is_to_skip_dependency_installation_enabled";
|
||||||
Feature["EvaluatorFineGrainedParallelismEnabled"] = "evaluator_fine_grained_parallelism_enabled";
|
|
||||||
Feature["ExportDiagnosticsEnabled"] = "export_diagnostics_enabled";
|
Feature["ExportDiagnosticsEnabled"] = "export_diagnostics_enabled";
|
||||||
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
||||||
})(Feature || (exports.Feature = Feature = {}));
|
})(Feature || (exports.Feature = Feature = {}));
|
||||||
@@ -79,11 +78,6 @@ exports.featureConfig = {
|
|||||||
minimumVersion: undefined,
|
minimumVersion: undefined,
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
[Feature.EvaluatorFineGrainedParallelismEnabled]: {
|
|
||||||
envVar: "CODEQL_EVALUATOR_FINE_GRAINED_PARALLELISM",
|
|
||||||
minimumVersion: exports.CODEQL_VERSION_FINE_GRAINED_PARALLELISM,
|
|
||||||
defaultValue: false,
|
|
||||||
},
|
|
||||||
[Feature.ExportDiagnosticsEnabled]: {
|
[Feature.ExportDiagnosticsEnabled]: {
|
||||||
envVar: "CODEQL_ACTION_EXPORT_DIAGNOSTICS",
|
envVar: "CODEQL_ACTION_EXPORT_DIAGNOSTICS",
|
||||||
minimumVersion: "2.12.4",
|
minimumVersion: "2.12.4",
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -295,7 +295,7 @@ export async function runQueries(
|
|||||||
logger.startGroup(`Running queries for ${language}`);
|
logger.startGroup(`Running queries for ${language}`);
|
||||||
const startTimeRunQueries = new Date().getTime();
|
const startTimeRunQueries = new Date().getTime();
|
||||||
const databasePath = util.getCodeQLDatabasePath(config, language);
|
const databasePath = util.getCodeQLDatabasePath(config, language);
|
||||||
await codeql.databaseRunQueries(databasePath, queryFlags, features);
|
await codeql.databaseRunQueries(databasePath, queryFlags);
|
||||||
logger.debug(`Finished running queries for ${language}.`);
|
logger.debug(`Finished running queries for ${language}.`);
|
||||||
// TODO should not be using `builtin` here. We should be using `all` instead.
|
// TODO should not be using `builtin` here. We should be using `all` instead.
|
||||||
// The status report does not support `all` yet.
|
// The status report does not support `all` yet.
|
||||||
|
|||||||
@@ -147,11 +147,7 @@ export interface CodeQL {
|
|||||||
/**
|
/**
|
||||||
* Run 'codeql database run-queries'.
|
* Run 'codeql database run-queries'.
|
||||||
*/
|
*/
|
||||||
databaseRunQueries(
|
databaseRunQueries(databasePath: string, flags: string[]): Promise<void>;
|
||||||
databasePath: string,
|
|
||||||
flags: string[],
|
|
||||||
features: FeatureEnablement,
|
|
||||||
): Promise<void>;
|
|
||||||
/**
|
/**
|
||||||
* Run 'codeql database interpret-results'.
|
* Run 'codeql database interpret-results'.
|
||||||
*/
|
*/
|
||||||
@@ -803,7 +799,6 @@ export async function getCodeQLForCmd(
|
|||||||
async databaseRunQueries(
|
async databaseRunQueries(
|
||||||
databasePath: string,
|
databasePath: string,
|
||||||
flags: string[],
|
flags: string[],
|
||||||
features: FeatureEnablement,
|
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const codeqlArgs = [
|
const codeqlArgs = [
|
||||||
"database",
|
"database",
|
||||||
@@ -818,19 +813,12 @@ export async function getCodeQLForCmd(
|
|||||||
codeqlArgs.push("--expect-discarded-cache");
|
codeqlArgs.push("--expect-discarded-cache");
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
await features.getValue(
|
|
||||||
Feature.EvaluatorFineGrainedParallelismEnabled,
|
|
||||||
this,
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
codeqlArgs.push("--intra-layer-parallelism");
|
|
||||||
} else if (
|
|
||||||
await util.codeQlVersionAbove(
|
await util.codeQlVersionAbove(
|
||||||
this,
|
this,
|
||||||
CODEQL_VERSION_FINE_GRAINED_PARALLELISM,
|
CODEQL_VERSION_FINE_GRAINED_PARALLELISM,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
codeqlArgs.push("--no-intra-layer-parallelism");
|
codeqlArgs.push("--intra-layer-parallelism");
|
||||||
}
|
}
|
||||||
await runTool(cmd, codeqlArgs);
|
await runTool(cmd, codeqlArgs);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ export enum Feature {
|
|||||||
DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled",
|
DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled",
|
||||||
DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled",
|
DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled",
|
||||||
PythonDefaultIsToSkipDependencyInstallationEnabled = "python_default_is_to_skip_dependency_installation_enabled",
|
PythonDefaultIsToSkipDependencyInstallationEnabled = "python_default_is_to_skip_dependency_installation_enabled",
|
||||||
EvaluatorFineGrainedParallelismEnabled = "evaluator_fine_grained_parallelism_enabled",
|
|
||||||
ExportDiagnosticsEnabled = "export_diagnostics_enabled",
|
ExportDiagnosticsEnabled = "export_diagnostics_enabled",
|
||||||
QaTelemetryEnabled = "qa_telemetry_enabled",
|
QaTelemetryEnabled = "qa_telemetry_enabled",
|
||||||
}
|
}
|
||||||
@@ -79,11 +78,6 @@ export const featureConfig: Record<
|
|||||||
minimumVersion: undefined,
|
minimumVersion: undefined,
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
[Feature.EvaluatorFineGrainedParallelismEnabled]: {
|
|
||||||
envVar: "CODEQL_EVALUATOR_FINE_GRAINED_PARALLELISM",
|
|
||||||
minimumVersion: CODEQL_VERSION_FINE_GRAINED_PARALLELISM,
|
|
||||||
defaultValue: false,
|
|
||||||
},
|
|
||||||
[Feature.ExportDiagnosticsEnabled]: {
|
[Feature.ExportDiagnosticsEnabled]: {
|
||||||
envVar: "CODEQL_ACTION_EXPORT_DIAGNOSTICS",
|
envVar: "CODEQL_ACTION_EXPORT_DIAGNOSTICS",
|
||||||
minimumVersion: "2.12.4",
|
minimumVersion: "2.12.4",
|
||||||
|
|||||||
Reference in New Issue
Block a user