mirror of
https://github.com/github/codeql-action.git
synced 2026-01-06 22:50:17 +08:00
Use feature flag to enable evaluator intra-layer parallelism
This commit is contained in:
@@ -487,6 +487,7 @@ export async function runQueries(
|
||||
querySuitePath,
|
||||
queryFlags,
|
||||
optimizeForLastQueryRun,
|
||||
features,
|
||||
);
|
||||
|
||||
logger.debug(`BQRS results produced for ${language} (queries: ${type})"`);
|
||||
@@ -521,6 +522,7 @@ export async function runQueries(
|
||||
querySuitePath,
|
||||
queryFlags,
|
||||
optimizeForLastQueryRun,
|
||||
features,
|
||||
);
|
||||
|
||||
return querySuitePath;
|
||||
|
||||
@@ -160,6 +160,7 @@ export interface CodeQL {
|
||||
querySuitePath: string | undefined,
|
||||
flags: string[],
|
||||
optimizeForLastQueryRun: boolean,
|
||||
features: FeatureEnablement,
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Run 'codeql database interpret-results'.
|
||||
@@ -756,6 +757,7 @@ export async function getCodeQLForCmd(
|
||||
querySuitePath: string | undefined,
|
||||
flags: string[],
|
||||
optimizeForLastQueryRun: boolean,
|
||||
features: FeatureEnablement,
|
||||
): Promise<void> {
|
||||
const codeqlArgs = [
|
||||
"database",
|
||||
@@ -778,6 +780,14 @@ export async function getCodeQLForCmd(
|
||||
if (querySuitePath) {
|
||||
codeqlArgs.push(querySuitePath);
|
||||
}
|
||||
if (
|
||||
await features.getValue(
|
||||
Feature.EvaluatorIntraLayerParallelismEnabled,
|
||||
this,
|
||||
)
|
||||
) {
|
||||
codeqlArgs.push("--intra-layer-parallelism");
|
||||
}
|
||||
await runTool(cmd, codeqlArgs);
|
||||
},
|
||||
async databaseInterpretResults(
|
||||
|
||||
@@ -46,6 +46,7 @@ export enum Feature {
|
||||
CliConfigFileEnabled = "cli_config_file_enabled",
|
||||
DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled",
|
||||
DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled",
|
||||
EvaluatorIntraLayerParallelismEnabled = "evaluator_intra_layer_parallelism_enabled",
|
||||
ExportDiagnosticsEnabled = "export_diagnostics_enabled",
|
||||
MlPoweredQueriesEnabled = "ml_powered_queries_enabled",
|
||||
NewAnalysisSummaryEnabled = "new_analysis_summary_enabled",
|
||||
@@ -68,6 +69,11 @@ export const featureConfig: Record<
|
||||
minimumVersion: "2.11.6",
|
||||
defaultValue: true,
|
||||
},
|
||||
[Feature.EvaluatorIntraLayerParallelismEnabled]: {
|
||||
envVar: "CODEQL_EVALUATOR_INTRA_LAYER_PARALLELISM",
|
||||
minimumVersion: "2.14.0",
|
||||
defaultValue: false,
|
||||
},
|
||||
[Feature.ExportDiagnosticsEnabled]: {
|
||||
envVar: "CODEQL_ACTION_EXPORT_DIAGNOSTICS",
|
||||
minimumVersion: "2.12.4",
|
||||
|
||||
Reference in New Issue
Block a user