Skip to content

Commit

Permalink
Merge pull request #1817 from github/nickrolfe/evaluator-intra-layer-…
Browse files Browse the repository at this point in the history
…parallelism-ff

Use feature flag to enable evaluator intra-layer parallelism
  • Loading branch information
nickrolfe committed Jul 31, 2023
2 parents 81ae676 + 2f8540d commit cf445f7
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th

## [UNRELEASED]

No user facing changes.
- 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)

## 2.21.2 - 28 Jul 2023

Expand Down
4 changes: 2 additions & 2 deletions lib/analyze.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/analyze.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion lib/codeql.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/codeql.js.map

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions lib/feature-flags.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/feature-flags.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ export async function runQueries(
querySuitePath,
queryFlags,
optimizeForLastQueryRun,
features,
);

logger.debug(`BQRS results produced for ${language} (queries: ${type})"`);
Expand Down Expand Up @@ -521,6 +522,7 @@ export async function runQueries(
querySuitePath,
queryFlags,
optimizeForLastQueryRun,
features,
);

return querySuitePath;
Expand Down
10 changes: 10 additions & 0 deletions src/codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export interface CodeQL {
querySuitePath: string | undefined,
flags: string[],
optimizeForLastQueryRun: boolean,
features: FeatureEnablement,
): Promise<void>;
/**
* Run 'codeql database interpret-results'.
Expand Down Expand Up @@ -756,6 +757,7 @@ export async function getCodeQLForCmd(
querySuitePath: string | undefined,
flags: string[],
optimizeForLastQueryRun: boolean,
features: FeatureEnablement,
): Promise<void> {
const codeqlArgs = [
"database",
Expand All @@ -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(
Expand Down
6 changes: 6 additions & 0 deletions src/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit cf445f7

Please sign in to comment.