Skip to content

Commit cf445f7

Browse files
authored
Merge pull request #1817 from github/nickrolfe/evaluator-intra-layer-parallelism-ff
Use feature flag to enable evaluator intra-layer parallelism
2 parents 81ae676 + 2f8540d commit cf445f7

File tree

10 files changed

+34
-7
lines changed

10 files changed

+34
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
44

55
## [UNRELEASED]
66

7-
No user facing changes.
7+
- We are rolling out a feature in August 2023 that will improve multi-threaded performance on larger runners. [#1817](https://github.com/github/codeql-action/pull/1817)
88

99
## 2.21.2 - 28 Jul 2023
1010

lib/analyze.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/feature-flags.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/feature-flags.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/analyze.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ export async function runQueries(
487487
querySuitePath,
488488
queryFlags,
489489
optimizeForLastQueryRun,
490+
features,
490491
);
491492

492493
logger.debug(`BQRS results produced for ${language} (queries: ${type})"`);
@@ -521,6 +522,7 @@ export async function runQueries(
521522
querySuitePath,
522523
queryFlags,
523524
optimizeForLastQueryRun,
525+
features,
524526
);
525527

526528
return querySuitePath;

src/codeql.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ export interface CodeQL {
160160
querySuitePath: string | undefined,
161161
flags: string[],
162162
optimizeForLastQueryRun: boolean,
163+
features: FeatureEnablement,
163164
): Promise<void>;
164165
/**
165166
* Run 'codeql database interpret-results'.
@@ -756,6 +757,7 @@ export async function getCodeQLForCmd(
756757
querySuitePath: string | undefined,
757758
flags: string[],
758759
optimizeForLastQueryRun: boolean,
760+
features: FeatureEnablement,
759761
): Promise<void> {
760762
const codeqlArgs = [
761763
"database",
@@ -778,6 +780,14 @@ export async function getCodeQLForCmd(
778780
if (querySuitePath) {
779781
codeqlArgs.push(querySuitePath);
780782
}
783+
if (
784+
await features.getValue(
785+
Feature.EvaluatorIntraLayerParallelismEnabled,
786+
this,
787+
)
788+
) {
789+
codeqlArgs.push("--intra-layer-parallelism");
790+
}
781791
await runTool(cmd, codeqlArgs);
782792
},
783793
async databaseInterpretResults(

src/feature-flags.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export enum Feature {
4646
CliConfigFileEnabled = "cli_config_file_enabled",
4747
DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled",
4848
DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled",
49+
EvaluatorIntraLayerParallelismEnabled = "evaluator_intra_layer_parallelism_enabled",
4950
ExportDiagnosticsEnabled = "export_diagnostics_enabled",
5051
MlPoweredQueriesEnabled = "ml_powered_queries_enabled",
5152
NewAnalysisSummaryEnabled = "new_analysis_summary_enabled",
@@ -68,6 +69,11 @@ export const featureConfig: Record<
6869
minimumVersion: "2.11.6",
6970
defaultValue: true,
7071
},
72+
[Feature.EvaluatorIntraLayerParallelismEnabled]: {
73+
envVar: "CODEQL_EVALUATOR_INTRA_LAYER_PARALLELISM",
74+
minimumVersion: "2.14.0",
75+
defaultValue: false,
76+
},
7177
[Feature.ExportDiagnosticsEnabled]: {
7278
envVar: "CODEQL_ACTION_EXPORT_DIAGNOSTICS",
7379
minimumVersion: "2.12.4",

0 commit comments

Comments
 (0)