Warn on deprecated Python dep inst config usage

This commit is contained in:
Rasmus Wriedt Larsen 2024-04-08 11:56:38 +02:00
parent e94a917e33
commit d33e75159d
No known key found for this signature in database
4 changed files with 26 additions and 5 deletions

View file

@ -21,7 +21,7 @@ inputs:
The build mode that will be used to analyze the language. This input is only available when The build mode that will be used to analyze the language. This input is only available when
analyzing a single CodeQL language per job, for example using a matrix. analyzing a single CodeQL language per job, for example using a matrix.
Available build modes will differ based on the language being analyzed. One of: Available build modes will differ based on the language being analyzed. One of:
- `none`: The database will be created without building the source code. - `none`: The database will be created without building the source code.
Available for all interpreted languages and some compiled languages. Available for all interpreted languages and some compiled languages.
@ -89,9 +89,8 @@ inputs:
description: A token for fetching external config files and queries if they reside in a private repository in the same GitHub instance that is running this action. description: A token for fetching external config files and queries if they reside in a private repository in the same GitHub instance that is running this action.
required: false required: false
setup-python-dependencies: setup-python-dependencies:
description: Try to auto-install your python dependencies description: DEPRECATED. CodeQL Action no longer install Python dependencies (from 3.25.0+/2.25.0+)
required: true required: false
default: 'true'
source-root: source-root:
description: Path of the root source code directory, relative to $GITHUB_WORKSPACE. description: Path of the root source code directory, relative to $GITHUB_WORKSPACE.
required: false required: false

7
lib/init-action.js generated
View file

@ -287,6 +287,13 @@ async function run() {
else { else {
logger.warning("codeql-action no longer installs Python dependencies. We recommend upgrading to at least CodeQL 2.16.0 to avoid any potential problems due to this."); logger.warning("codeql-action no longer installs Python dependencies. We recommend upgrading to at least CodeQL 2.16.0 to avoid any potential problems due to this.");
} }
if ((0, actions_util_1.getOptionalInput)("setup-python-dependencies") !== undefined) {
logger.warning("The setup-python-dependencies input is deprecated and no longer has any effect. We recommend removing any references from your workflows. See https://github.blog/changelog/2024-01-23-codeql-2-16-python-dependency-installation-disabled-new-queries-and-bug-fixes/ for more information.");
}
if (process.env["CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION"] !==
undefined) {
logger.warning("The CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION environment variable is deprecated and no longer has any effect. We recommend removing any references from your workflows. See https://github.blog/changelog/2024-01-23-codeql-2-16-python-dependency-installation-disabled-new-queries-and-bug-fixes/ for more information.");
}
const sourceRoot = path.resolve((0, util_1.getRequiredEnvParam)("GITHUB_WORKSPACE"), (0, actions_util_1.getOptionalInput)("source-root") || ""); const sourceRoot = path.resolve((0, util_1.getRequiredEnvParam)("GITHUB_WORKSPACE"), (0, actions_util_1.getOptionalInput)("source-root") || "");
const tracerConfig = await (0, init_1.runInit)(codeql, config, sourceRoot, "Runner.Worker.exe", (0, actions_util_1.getOptionalInput)("registries"), apiDetails, logger); const tracerConfig = await (0, init_1.runInit)(codeql, config, sourceRoot, "Runner.Worker.exe", (0, actions_util_1.getOptionalInput)("registries"), apiDetails, logger);
if (tracerConfig !== undefined) { if (tracerConfig !== undefined) {

File diff suppressed because one or more lines are too long

View file

@ -463,6 +463,21 @@ async function run() {
); );
} }
if (getOptionalInput("setup-python-dependencies") !== undefined) {
logger.warning(
"The setup-python-dependencies input is deprecated and no longer has any effect. We recommend removing any references from your workflows. See https://github.blog/changelog/2024-01-23-codeql-2-16-python-dependency-installation-disabled-new-queries-and-bug-fixes/ for more information.",
);
}
if (
process.env["CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION"] !==
undefined
) {
logger.warning(
"The CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION environment variable is deprecated and no longer has any effect. We recommend removing any references from your workflows. See https://github.blog/changelog/2024-01-23-codeql-2-16-python-dependency-installation-disabled-new-queries-and-bug-fixes/ for more information.",
);
}
const sourceRoot = path.resolve( const sourceRoot = path.resolve(
getRequiredEnvParam("GITHUB_WORKSPACE"), getRequiredEnvParam("GITHUB_WORKSPACE"),
getOptionalInput("source-root") || "", getOptionalInput("source-root") || "",