Skip to content

Merge releases/v3 into releases/v2 #2068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 60 commits into from
Closed
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
6111b7c
Update supported GitHub Enterprise Server versions
github-actions[bot] Nov 16, 2023
c7f4ea5
Bump the minor version number of the Action
henrymercer Nov 27, 2023
d1166e6
Bump minimum CodeQL version to 2.11.6
henrymercer Nov 27, 2023
6491452
Update PR checks
henrymercer Nov 27, 2023
a36fc67
Remove CodeQL version guards for 2.11.5 and earlier
henrymercer Nov 27, 2023
fdea2a5
Remove result pruning for CodeQL 2.11.2
henrymercer Nov 27, 2023
0240eaf
Add changelog note
henrymercer Nov 27, 2023
5dc8134
Hyperlink corresponding changelog entry
henrymercer Nov 27, 2023
2f93dd4
Python: Don't install deps by default for all users
RasmusWL Dec 13, 2023
1e69962
Update changelog
RasmusWL Dec 13, 2023
84a9fc4
Did create feature-flag
RasmusWL Dec 13, 2023
bc36e6c
Add missing logic to force enable lib extraction
RasmusWL Dec 13, 2023
a13f4b8
prettier
RasmusWL Dec 13, 2023
1e69b89
build
RasmusWL Dec 13, 2023
77f4e07
Safer wording of CHANGELOG entry
RasmusWL Dec 13, 2023
dd20793
Merge branch 'main' into rasmuswl/no-dep-inst-default
RasmusWL Dec 13, 2023
ad5035b
Update changelog and version after v3.22.12
github-actions[bot] Dec 22, 2023
710aa2d
Update checked-in dependencies
github-actions[bot] Dec 22, 2023
6f5223d
Merge pull request #2053 from github/mergeback/v3.22.12-to-main-012739e5
adityasharad Dec 22, 2023
e01299b
Bump the npm group with 2 updates (#2055)
dependabot[bot] Dec 27, 2023
596b173
Bump the actions group with 2 updates (#2056)
dependabot[bot] Dec 28, 2023
ecbf80a
Bump the npm group with 2 updates
dependabot[bot] Jan 1, 2024
01e47d0
Update checked-in dependencies
github-actions[bot] Jan 1, 2024
fab3a43
Bump the actions group with 1 update
dependabot[bot] Jan 1, 2024
fb410e7
Update PR check source
henrymercer Jan 2, 2024
ee9b8ab
Merge pull request #2057 from github/dependabot/npm_and_yarn/npm-1688…
henrymercer Jan 2, 2024
35b10b5
Merge branch 'main' into henrymercer/drop-codeql-v2.11.5
henrymercer Jan 2, 2024
e345646
Merge pull request #2058 from github/dependabot/github_actions/action…
henrymercer Jan 2, 2024
6ebbf45
Merge branch 'main' into update-supported-enterprise-server-versions
henrymercer Jan 2, 2024
7963a60
Merge pull request #2009 from github/henrymercer/drop-codeql-v2.11.5
henrymercer Jan 4, 2024
216127f
Merge pull request #1994 from github/update-supported-enterprise-serv…
henrymercer Jan 4, 2024
ce9d281
Merge branch 'main' into rasmuswl/no-dep-inst-default
RasmusWL Jan 4, 2024
fa98ec0
Remove CliConfigFileEnabled feature flag
henrymercer Jan 4, 2024
f53698b
Remove Action-config code path in `runQueries`
henrymercer Jan 4, 2024
b683173
Remove unused arguments
henrymercer Jan 4, 2024
aa95d4d
Update changelog wording to include january instead of now
RasmusWL Jan 4, 2024
d98234a
Update changelog wording
RasmusWL Jan 4, 2024
b30262c
Remove functionality for checking out external repos
henrymercer Jan 4, 2024
f934b28
Populate path filters env variables using the CLI
henrymercer Jan 4, 2024
f65fc6a
Remove parsing of `queries`, `packs`, `paths`, and `pathsIgnore`
henrymercer Jan 4, 2024
4feb32a
Remove code to download packs
henrymercer Jan 4, 2024
67be7bc
Remove unused status report fields
henrymercer Jan 4, 2024
d7437a2
Remove deprecated `CODEQL_PASS_CONFIG_TO_CLI` env var from PR checks
henrymercer Jan 4, 2024
f114e1d
Remove unused test example
henrymercer Jan 4, 2024
afef25e
Add comment for force enabling dependency extraction
RasmusWL Jan 5, 2024
2e27b3c
Create helper `isPythonDependencyInstallationDisabled`
RasmusWL Jan 5, 2024
9926570
Generate JS
RasmusWL Jan 5, 2024
58ff74a
Merge pull request #2031 from github/rasmuswl/no-dep-inst-default
RasmusWL Jan 5, 2024
08ae9bf
Merge pull request #2063 from github/henrymercer/remove-ml-powered-qu…
henrymercer Jan 5, 2024
a533ec6
Merge branch 'main' into henrymercer/remove-action-config-parsing
henrymercer Jan 5, 2024
8516954
Merge pull request #2062 from github/henrymercer/remove-action-config…
henrymercer Jan 5, 2024
838a022
Clean up running queries workflow now that the queries are determined…
henrymercer Jan 5, 2024
fd55bb0
Merge pull request #2065 from github/henrymercer/further-run-queries-…
henrymercer Jan 8, 2024
48e7b8b
Update changelog for v3.23.0
github-actions[bot] Jan 8, 2024
e5f05b8
Merge pull request #2066 from github/update-v3.23.0-fd55bb0b0
henrymercer Jan 8, 2024
b48115e
Revert "Update version and changelog for v2.22.12"
henrymercer Jan 8, 2024
2b97d80
Revert "Update checked-in dependencies"
henrymercer Jan 8, 2024
f0fb061
Merge remote-tracking branch 'origin/releases/v3' into backport-v2.22…
henrymercer Jan 8, 2024
d86fcd4
Update version and changelog for v2.22.12
henrymercer Jan 8, 2024
feb8ff1
Update checked-in dependencies
github-actions[bot] Jan 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the

## [UNRELEASED]

- We are rolling out a feature in January 2024 that will disable Python dependency installation by default for all users. This improves the speed of analysis while having only a very minor impact on results. You can override this behavior by setting `CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION=false` in your workflow, however we plan to remove this ability in future versions of the CodeQL Action. [#2031](https://github.com/github/codeql-action/pull/2031)
- The CodeQL Action now requires CodeQL version 2.11.6 or later. For more information, see [the corresponding changelog entry for CodeQL Action version 2.22.7](#2227---16-nov-2023). [#2009](https://github.com/github/codeql-action/pull/2009)

## 3.22.12 - 22 Dec 2023
Expand Down
2 changes: 1 addition & 1 deletion 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.

17 changes: 16 additions & 1 deletion 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.

9 changes: 7 additions & 2 deletions lib/init-action.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/init-action.js.map

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
Feature,
logCodeScanningConfigInCli,
useCodeScanningConfigInCli,
isPythonDependencyInstallationDisabled,
} from "./feature-flags";
import { isScannedLanguage, Language } from "./languages";
import { Logger } from "./logging";
Expand Down Expand Up @@ -104,12 +105,7 @@ async function setupPythonExtractor(
return;
}

if (
await features.getValue(
Feature.DisablePythonDependencyInstallationEnabled,
codeql,
)
) {
if (await isPythonDependencyInstallationDisabled(codeql, features)) {
logger.warning(
"We recommend that you remove the CODEQL_PYTHON environment variable from your workflow. This environment variable was originally used to specify a Python executable that included the dependencies of your Python code, however Python analysis no longer uses these dependencies." +
"\nIf you used CODEQL_PYTHON to force the version of Python to analyze as, please use CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION instead, such as 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=2.7' or 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=3.11'.",
Expand Down
26 changes: 26 additions & 0 deletions src/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export enum Feature {
CppDependencyInstallation = "cpp_dependency_installation_enabled",
DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled",
DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled",
PythonDefaultIsToSkipDependencyInstallationEnabled = "python_default_is_to_skip_dependency_installation_enabled",
EvaluatorFineGrainedParallelismEnabled = "evaluator_fine_grained_parallelism_enabled",
ExportDiagnosticsEnabled = "export_diagnostics_enabled",
QaTelemetryEnabled = "qa_telemetry_enabled",
Expand Down Expand Up @@ -103,6 +104,15 @@ export const featureConfig: Record<
minimumVersion: undefined,
defaultValue: false,
},
[Feature.PythonDefaultIsToSkipDependencyInstallationEnabled]: {
// we can reuse the same environment variable as above. If someone has set it to
// `true` in their workflow this means dependencies are not installed, setting it to
// `false` means dependencies _will_ be installed. The same semantics are applied
// here!
envVar: "CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION",
minimumVersion: "2.16.0",
defaultValue: false,
},
};

/**
Expand Down Expand Up @@ -474,3 +484,19 @@ export async function logCodeScanningConfigInCli(
);
}
}

export async function isPythonDependencyInstallationDisabled(
codeql: CodeQL,
features: FeatureEnablement,
): Promise<boolean> {
return (
(await features.getValue(
Feature.DisablePythonDependencyInstallationEnabled,
codeql,
)) ||
(await features.getValue(
Feature.PythonDefaultIsToSkipDependencyInstallationEnabled,
codeql,
))
);
}
27 changes: 14 additions & 13 deletions src/init-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ import { getGitHubVersion } from "./api-client";
import { CodeQL } from "./codeql";
import * as configUtils from "./config-utils";
import { EnvVar } from "./environment";
import { Feature, Features } from "./feature-flags";
import {
Feature,
Features,
isPythonDependencyInstallationDisabled,
} from "./feature-flags";
import {
checkInstallPython311,
initCodeQL,
Expand Down Expand Up @@ -293,12 +297,7 @@ async function run() {
config.languages.includes(Language.python) &&
getRequiredInput("setup-python-dependencies") === "true"
) {
if (
await features.getValue(
Feature.DisablePythonDependencyInstallationEnabled,
codeql,
)
) {
if (await isPythonDependencyInstallationDisabled(codeql, features)) {
logger.info("Skipping python dependency installation");
} else {
try {
Expand Down Expand Up @@ -446,16 +445,18 @@ async function run() {
}

// Disable Python dependency extraction if feature flag set
if (
await features.getValue(
Feature.DisablePythonDependencyInstallationEnabled,
codeql,
)
) {
if (await isPythonDependencyInstallationDisabled(codeql, features)) {
core.exportVariable(
"CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION",
"true",
);
} else {
// From 2.16.0 the default for the python extractor is to not perform any library
// extraction, so we need to set this flag to enable it.
core.exportVariable(
"CODEQL_EXTRACTOR_PYTHON_FORCE_ENABLE_LIBRARY_EXTRACTION_UNTIL_2_17_0",
"true",
);
}

const sourceRoot = path.resolve(
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy