From d0916526cd62a50a71fcbc64f71518fc7a141160 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Fri, 6 Oct 2023 12:24:49 -0700 Subject: [PATCH 1/4] Add a fix for python 3.12 The python extractor does not yet support 3.12. Check for this and instead make sure we run python 3.11. Only need to check on windows since we are extremely unlikely to be running 3.12 on linux or macos. --- lib/init-action.js | 1 + lib/init-action.js.map | 2 +- lib/init.js | 16 +++++++++++++++- lib/init.js.map | 2 +- python-setup/check_python12.ps1 | 19 +++++++++++++++++++ src/init-action.ts | 10 +++++++++- src/init.ts | 18 ++++++++++++++++++ 7 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 python-setup/check_python12.ps1 diff --git a/lib/init-action.js b/lib/init-action.js index 6ee84aef80..a78d560d4a 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -139,6 +139,7 @@ async function run() { // - Actions step debugging is enabled (e.g. by [enabling debug logging for a rerun](https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs#re-running-all-the-jobs-in-a-workflow), // or by setting the `ACTIONS_STEP_DEBUG` secret to `true`). (0, actions_util_1.getOptionalInput)("debug") === "true" || core.isDebug(), (0, actions_util_1.getOptionalInput)("debug-artifact-name") || util_1.DEFAULT_DEBUG_ARTIFACT_NAME, (0, actions_util_1.getOptionalInput)("debug-database-name") || util_1.DEFAULT_DEBUG_DATABASE_NAME, repositoryNwo, (0, actions_util_1.getTemporaryDirectory)(), codeql, (0, util_1.getRequiredEnvParam)("GITHUB_WORKSPACE"), gitHubVersion, apiDetails, features, logger); + await (0, init_1.checkInstallPython311)(config.languages); if (config.languages.includes(languages_1.Language.python) && (0, actions_util_1.getRequiredInput)("setup-python-dependencies") === "true") { if (await features.getValue(feature_flags_1.Feature.DisablePythonDependencyInstallationEnabled, codeql)) { diff --git a/lib/init-action.js.map b/lib/init-action.js.map index f786cbfdef..57f7b2594e 100644 --- a/lib/init-action.js.map +++ b/lib/init-action.js.map @@ -1 +1 @@ -{"version":3,"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IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACnE;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"init-action.js","sourceRoot":"","sources":["../src/init-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AACtC,uDAAmD;AACnD,+BAAoC;AAEpC,iDAMwB;AACxB,6CAAgD;AAGhD,+CAAuC;AACvC,mDAAoD;AACpD,iCAMgB;AAChB,2CAAuC;AACvC,uCAAqD;AACrD,6CAAkD;AAClD,iDAA6C;AAC7C,mDAKyB;AACzB,qDAAyE;AACzE,iDAAmD;AACnD,iCAcgB;AAChB,yCAA8C;AAgD9C,KAAK,UAAU,yBAAyB,CACtC,SAAe,EACf,MAAsC,EACtC,uBAA2C,EAC3C,sBAA2C,EAC3C,WAAwB,EACxB,YAAoB,EACpB,MAAc,EACd,KAAa;IAEb,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,MAAM,EACN,IAAA,gCAAgB,EAAC,KAAK,CAAC,EACvB,SAAS,EACT,MAAM,IAAA,qBAAc,EAAC,MAAM,CAAC,EAC5B,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,KAAK,CACb,CAAC;IAEF,MAAM,iBAAiB,GAAG,IAAA,+BAAgB,EAAC,WAAW,CAAC,CAAC;IAExD,MAAM,gBAAgB,GAAqB;QACzC,GAAG,gBAAgB;QACnB,WAAW,EAAE,IAAA,+BAAgB,EAAC,OAAO,CAAC,IAAI,EAAE;QAC5C,sBAAsB,EAAE,YAAY;QACpC,YAAY,EAAE,WAAW,IAAI,0BAAW,CAAC,OAAO;QAChD,kBAAkB,EAAE,iBAAiB,IAAI,EAAE;KAC5C,CAAC;IAEF,MAAM,uBAAuB,GAA4B,EAAE,CAAC;IAE5D,IAAI,u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CAAC,IAAA,qBAAc,GAAE;QAAE,OAAO,KAAK,CAAC;IAEpC,oDAAoD;IACpD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,uBAAuB,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACnE;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/lib/init.js b/lib/init.js index 100d38de25..6a3cb03f3b 100644 --- a/lib/init.js +++ b/lib/init.js @@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.installPythonDeps = exports.runInit = exports.initConfig = exports.initCodeQL = void 0; +exports.installPythonDeps = exports.checkInstallPython311 = exports.runInit = exports.initConfig = exports.initCodeQL = void 0; const fs = __importStar(require("fs")); const path = __importStar(require("path")); const toolrunner = __importStar(require("@actions/exec/lib/toolrunner")); @@ -32,6 +32,7 @@ const analysisPaths = __importStar(require("./analysis-paths")); const codeql_1 = require("./codeql"); const configUtils = __importStar(require("./config-utils")); const feature_flags_1 = require("./feature-flags"); +const languages_1 = require("./languages"); const tracer_config_1 = require("./tracer-config"); const util = __importStar(require("./util")); async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, logger) { @@ -104,6 +105,19 @@ function processError(e) { } return e; } +/** + * If we are running python 3.12+ on windows, we need to switch to python 3.11. + * This check happens in a powershell script. + */ +async function checkInstallPython311(languages) { + if (languages.includes(languages_1.Language.python) && process.platform === "win32") { + const script = path.resolve(__dirname, "../python-setup", "check_python12.ps1"); + await new toolrunner.ToolRunner(await safeWhich.safeWhich("powershell"), [ + script, + ]).exec(); + } +} +exports.checkInstallPython311 = checkInstallPython311; async function installPythonDeps(codeql, logger) { logger.startGroup("Setup Python dependencies"); const scriptsFolder = path.resolve(__dirname, "../python-setup"); diff --git a/lib/init.js.map b/lib/init.js.map index ab2bfe84dc..49ac962a1b 100644 --- a/lib/init.js.map +++ b/lib/init.js.map @@ -1 +1 @@ -{"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,yEAA2D;AAC3D,kEAAoD;AAEpD,gEAAkD;AAElD,qCAA+C;AAC/C,4DAA8C;AAC9C,mDAIyB;AAIzB,mDAAwE;AACxE,6CAA+B;AAExB,KAAK,UAAU,UAAU,CAC9B,UAA8B,EAC9B,UAA4B,EAC5B,OAAe,EACf,OAA2B,EAC3B,iBAA2C,EAC3C,MAAc;IAOd,MAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACxC,MAAM,EAAE,MAAM,EAAE,uBAAuB,EAAE,WAAW,EAAE,YAAY,EAAE,GAClE,MAAM,IAAA,oBAAW,EACf,UAAU,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,IAAI,CACL,CAAC;IACJ,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;IAC5B,MAAM,CAAC,QAAQ,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AACxE,CAAC;AA3BD,gCA2BC;AAEM,KAAK,UAAU,UAAU,CAC9B,cAAkC,EAClC,YAAgC,EAChC,UAA8B,EAC9B,eAAmC,EACnC,UAA8B,EAC9B,UAA8B,EAC9B,WAA+B,EAC/B,kBAA2B,EAC3B,SAAkB,EAClB,iBAAyB,EACzB,iBAAyB,EACzB,UAAyB,EACzB,OAAe,EACf,MAAc,EACd,aAAqB,EACrB,aAAiC,EACjC,UAAoC,EACpC,QAA2B,EAC3B,MAAc;IAEd,MAAM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1 b/python-setup/check_python12.ps1 new file mode 100644 index 0000000000..d48da8352a --- /dev/null +++ b/python-setup/check_python12.ps1 @@ -0,0 +1,19 @@ + +#! /usr/bin/pwsh + +# If we are running greater than or equal to python 3.12, change py to run version 3.11 +Write-Host "Checking python version" +if ((py -3 -c "import sys; print(0 if sys.version_info >= (3, 12) else 1)") -eq "0") { + Write-Host "Python 3.12+ detected, setting PY_PYTHON3=3.11" + # First make sure we have python 3.11 installed + py -3.11 -c "import imp" + if ($LASTEXITCODE -eq 0) { + Write-Host "Python 3.11 detected, using this version instead of 3.12+." + Write-Output "PY_PYTHON3=3.11" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + } else { + Write-Host "FAILURE: Python 3.12+ is not supported. Please install Python 3.11." + exit 1 + } +} else { + Write-Host "Python 3.12+ not detected, not making any changes." +} diff --git a/src/init-action.ts b/src/init-action.ts index 4040e6b068..ecdce9d972 100644 --- a/src/init-action.ts +++ b/src/init-action.ts @@ -17,7 +17,13 @@ import { CodeQL } from "./codeql"; import * as configUtils from "./config-utils"; import { EnvVar } from "./environment"; import { Feature, Features } from "./feature-flags"; -import { initCodeQL, initConfig, installPythonDeps, runInit } from "./init"; +import { + checkInstallPython311, + initCodeQL, + initConfig, + installPythonDeps, + runInit, +} from "./init"; import { Language } from "./languages"; import { getActionsLogger, Logger } from "./logging"; import { parseRepositoryNwo } from "./repository"; @@ -277,6 +283,8 @@ async function run() { logger, ); + await checkInstallPython311(config.languages); + if ( config.languages.includes(Language.python) && getRequiredInput("setup-python-dependencies") === "true" diff --git a/src/init.ts b/src/init.ts index 87ba143d61..7b776c2067 100644 --- a/src/init.ts +++ b/src/init.ts @@ -13,6 +13,7 @@ import { FeatureEnablement, useCodeScanningConfigInCli, } from "./feature-flags"; +import { Language } from "./languages"; import { Logger } from "./logging"; import { RepositoryNwo } from "./repository"; import { ToolsSource } from "./setup-codeql"; @@ -181,6 +182,23 @@ function processError(e: any): Error { return e; } +/** + * If we are running python 3.12+ on windows, we need to switch to python 3.11. + * This check happens in a powershell script. + */ +export async function checkInstallPython311(languages: Language[]) { + if (languages.includes(Language.python) && process.platform === "win32") { + const script = path.resolve( + __dirname, + "../python-setup", + "check_python12.ps1", + ); + await new toolrunner.ToolRunner(await safeWhich.safeWhich("powershell"), [ + script, + ]).exec(); + } +} + export async function installPythonDeps(codeql: CodeQL, logger: Logger) { logger.startGroup("Setup Python dependencies"); From 028bacb8e9c13fef2063aff0419b99212f30c374 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Fri, 6 Oct 2023 13:50:35 -0700 Subject: [PATCH 2/4] Add integration test Also: - Update changelog - Fix comments in check_python script --- .github/workflows/python312-windows.yml | 41 +++++++++++++++++++++++++ CHANGELOG.md | 2 +- python-setup/check_python12.ps1 | 8 ++--- 3 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/python312-windows.yml diff --git a/.github/workflows/python312-windows.yml b/.github/workflows/python312-windows.yml new file mode 100644 index 0000000000..54997e9c6d --- /dev/null +++ b/.github/workflows/python312-windows.yml @@ -0,0 +1,41 @@ +name: Test that the workaround for python 3.12 on windows works + +on: + push: + branches: [main, releases/v2] + pull_request: + # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened + # by other workflows. + types: [opened, synchronize, reopened, ready_for_review] + schedule: + # Weekly on Monday. + - cron: '0 0 * * 1' + workflow_dispatch: + +jobs: + test-setup-python-scripts: + timeout-minutes: 45 + runs-on: windows-latest + + steps: + - uses: actions/setup-python@v4 + with: + python-version: 3.12 + + - uses: actions/checkout@v4 + + - name: Prepare test + uses: ./.github/actions/prepare-test + with: + version: default + + - name: Initialize CodeQL + uses: ./../init + with: + tools: latest + languages: python + + - name: Analyze + uses: ./../action/analyze + with: + upload-database: false diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a17e5c1d5..2f3d5cb350 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th ## [UNRELEASED] -No user facing changes. +- Add a workaround python 3.12, which is not supported in CodeQL CLI version 2.14.6 or earlier. If you are running an analysis on windows and using python 3.12 or later, the CodeQL Action will switch to running python 3.11. ## 2.22.0 - 06 Oct 2023 diff --git a/python-setup/check_python12.ps1 b/python-setup/check_python12.ps1 index d48da8352a..f35558b07e 100644 --- a/python-setup/check_python12.ps1 +++ b/python-setup/check_python12.ps1 @@ -4,16 +4,16 @@ # If we are running greater than or equal to python 3.12, change py to run version 3.11 Write-Host "Checking python version" if ((py -3 -c "import sys; print(0 if sys.version_info >= (3, 12) else 1)") -eq "0") { - Write-Host "Python 3.12+ detected, setting PY_PYTHON3=3.11" + Write-Host "python 3.12+ detected, setting PY_PYTHON3=3.11" # First make sure we have python 3.11 installed py -3.11 -c "import imp" if ($LASTEXITCODE -eq 0) { - Write-Host "Python 3.11 detected, using this version instead of 3.12+." + Write-Host "python 3.11 detected, using this version instead of 3.12+." Write-Output "PY_PYTHON3=3.11" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append } else { - Write-Host "FAILURE: Python 3.12+ is not supported. Please install Python 3.11." + Write-Host "FAILURE: Python 3.12+ is not supported, and Python 3.11 could not be detected on the system. Please install Python 3.11." exit 1 } } else { - Write-Host "Python 3.12+ not detected, not making any changes." + Write-Host "python 3.12+ not detected, not making any changes." } From 669c61022cfc3e7ad3cb72077890e6352782a071 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Fri, 6 Oct 2023 14:04:29 -0700 Subject: [PATCH 3/4] Add a feature flag to turn this off for newer versions of codeql --- .github/workflows/python312-windows.yml | 2 +- lib/init-action.js | 2 +- lib/init-action.js.map | 2 +- lib/init.js | 6 ++++-- lib/init.js.map | 2 +- src/init-action.ts | 2 +- src/init.ts | 11 +++++++++-- 7 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python312-windows.yml b/.github/workflows/python312-windows.yml index 54997e9c6d..77bf8155fd 100644 --- a/.github/workflows/python312-windows.yml +++ b/.github/workflows/python312-windows.yml @@ -30,7 +30,7 @@ jobs: version: default - name: Initialize CodeQL - uses: ./../init + uses: ./../action/init with: tools: latest languages: python diff --git a/lib/init-action.js b/lib/init-action.js index a78d560d4a..836981a9d4 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -139,7 +139,7 @@ async function run() { // - Actions step debugging is enabled (e.g. by [enabling debug logging for a rerun](https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs#re-running-all-the-jobs-in-a-workflow), // or by setting the `ACTIONS_STEP_DEBUG` secret to `true`). (0, actions_util_1.getOptionalInput)("debug") === "true" || core.isDebug(), (0, actions_util_1.getOptionalInput)("debug-artifact-name") || util_1.DEFAULT_DEBUG_ARTIFACT_NAME, (0, actions_util_1.getOptionalInput)("debug-database-name") || util_1.DEFAULT_DEBUG_DATABASE_NAME, repositoryNwo, (0, actions_util_1.getTemporaryDirectory)(), codeql, (0, util_1.getRequiredEnvParam)("GITHUB_WORKSPACE"), gitHubVersion, apiDetails, features, logger); - await (0, init_1.checkInstallPython311)(config.languages); + await (0, init_1.checkInstallPython311)(config.languages, codeql); if (config.languages.includes(languages_1.Language.python) && (0, actions_util_1.getRequiredInput)("setup-python-dependencies") === "true") { if (await features.getValue(feature_flags_1.Feature.DisablePythonDependencyInstallationEnabled, codeql)) { diff --git a/lib/init-action.js.map b/lib/init-action.js.map index 57f7b2594e..c863cf33c1 100644 --- a/lib/init-action.js.map +++ b/lib/init-action.js.map @@ -1 +1 @@ -{"version":3,"file":"init-action.js","sourceRoot":"","sources":["../src/init-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AACtC,uDAAmD;AACnD,+BAAoC;AAEpC,iDAMwB;AACxB,6CAAgD;AAGhD,+CAAuC;AACvC,mDAAoD;AACpD,iCAMgB;AAChB,2CAAuC;AACvC,uCAAqD;AACrD,6CAAkD;AAClD,iDAA6C;A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CAAC,EAAE;gBAC3D,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;aACjC;SACF;QAED,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;KACjD;IAAC,OAAO,cAAc,EAAE;QACvB,MAAM,KAAK,GAAG,IAAA,gBAAS,EAAC,cAAc,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC9B,MAAM,yBAAyB,CAC7B,SAAS,EACT,MAAM,EACN,uBAAuB,EACvB,sBAAsB,EACtB,WAAW,EACX,YAAY,EACZ,MAAM,EACN,KAAK,CACN,CAAC;QACF,OAAO;KACR;IACD,MAAM,yBAAyB,CAC7B,SAAS,EACT,MAAM,EACN,uBAAuB,EACvB,sBAAsB,EACtB,WAAW,EACX,YAAY,EACZ,MAAM,CACP,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB;IAC5B,0DAA0D;IAC1D,MAAM,WAAW,GAAG,IAAA,+BAAgB,EAAC,cAAc,CAAC,CAAC;IACrD,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,WAAW,KAAK,MAAM,CAAC;IAE7D,6FAA6F;IAC7F,IAAI,CAAC,IAAA,qBAAc,GAAE;QAAE,OAAO,KAAK,CAAC;IAEpC,oDAAoD;IACpD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,uBAAuB,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACnE;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"init-action.js","sourceRoot":"","sources":["../src/init-action.ts"],"names":[],"mappings":";;;;;;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,CAAC,uBAAuB,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACnE;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/lib/init.js b/lib/init.js index 6a3cb03f3b..ffdc1db000 100644 --- a/lib/init.js +++ b/lib/init.js @@ -109,8 +109,10 @@ function processError(e) { * If we are running python 3.12+ on windows, we need to switch to python 3.11. * This check happens in a powershell script. */ -async function checkInstallPython311(languages) { - if (languages.includes(languages_1.Language.python) && process.platform === "win32") { +async function checkInstallPython311(languages, codeql) { + if (languages.includes(languages_1.Language.python) && + process.platform === "win32" && + !(await codeql.getVersion()).features?.supportsPython312) { const script = path.resolve(__dirname, "../python-setup", "check_python12.ps1"); await new toolrunner.ToolRunner(await safeWhich.safeWhich("powershell"), [ script, diff --git a/lib/init.js.map b/lib/init.js.map index 49ac962a1b..370f3d3911 100644 --- a/lib/init.js.map +++ b/lib/init.js.map @@ -1 +1 @@ -{"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,yEAA2D;AAC3D,kEAAoD;AAEpD,gEAAkD;AAElD,qCAA+C;AAC/C,4DAA8C;AAC9C,mDAIyB;AACzB,2CAAuC;AAIvC,mDAAwE;AACxE,6CAA+B;AAExB,KAAK,UAAU,UAAU,CAC9B,UAA8B,EAC9B,UAA4B,EAC5B,OAAe,EACf,OAA2B,EAC3B,iBAA2C,EAC3C,MAAc;IAOd,MAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACxC,MAAM,EAAE,MAAM,EAAE,uBAAuB,EAAE,WAAW,EAAE,YAAY,EAAE,GAClE,MAAM,IAAA,oBAAW,EACf,UAAU,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,MAAM,EAC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C7B,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAC7C,CAAC,IAAI,EAAE,CAAC;SACV;QACD,MAAM,MAAM,GAAG,0BAA0B,CAAC;QAC1C,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;YAChC,MAAM,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;gBAC/D,IAAI;gBACJ,IAAI;gBACJ,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC;gBAChC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;aAC/B,CAAC,CAAC,IAAI,EAAE,CAAC;SACX;aAAM;YACL,MAAM,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE;gBACpE,IAAI;gBACJ,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC;gBAChC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;aAC/B,CAAC,CAAC,IAAI,EAAE,CAAC;SACX;KACF;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,CAAC,QAAQ,EAAE,CAAC;QAClB,MAAM,CAAC,OAAO,CACZ,gFAAgF,CAAC,IAAI;YACnF,qGAAqG;YACrG,oGAAoG;YACpG,iDAAiD,CACpD,CAAC;QACF,OAAO;KACR;IACD,MAAM,CAAC,QAAQ,EAAE,CAAC;AACpB,CAAC;AAzCD,8CAyCC"} \ No newline at end of file diff --git a/src/init-action.ts b/src/init-action.ts index ecdce9d972..a43e572f77 100644 --- a/src/init-action.ts +++ b/src/init-action.ts @@ -283,7 +283,7 @@ async function run() { logger, ); - await checkInstallPython311(config.languages); + await checkInstallPython311(config.languages, codeql); if ( config.languages.includes(Language.python) && diff --git a/src/init.ts b/src/init.ts index 7b776c2067..47fbc75afd 100644 --- a/src/init.ts +++ b/src/init.ts @@ -186,8 +186,15 @@ function processError(e: any): Error { * If we are running python 3.12+ on windows, we need to switch to python 3.11. * This check happens in a powershell script. */ -export async function checkInstallPython311(languages: Language[]) { - if (languages.includes(Language.python) && process.platform === "win32") { +export async function checkInstallPython311( + languages: Language[], + codeql: CodeQL, +) { + if ( + languages.includes(Language.python) && + process.platform === "win32" && + !(await codeql.getVersion()).features?.supportsPython312 + ) { const script = path.resolve( __dirname, "../python-setup", From 94b6970619642ae1a60a8a65a875ed636a9d1e0c Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Fri, 6 Oct 2023 14:49:04 -0700 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f3d5cb350..f9ac77fece 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th ## [UNRELEASED] -- Add a workaround python 3.12, which is not supported in CodeQL CLI version 2.14.6 or earlier. If you are running an analysis on windows and using python 3.12 or later, the CodeQL Action will switch to running python 3.11. +- Add a workaround python 3.12, which is not supported in CodeQL CLI version 2.14.6 or earlier. If you are running an analysis on Windows and using python 3.12 or later, the CodeQL Action will switch to running python 3.11. If python 3.11 is not found, then the workflow will fail. ## 2.22.0 - 06 Oct 2023