diff --git a/CHANGELOG.md b/CHANGELOG.md index 49cef30bdd..dfa5040a48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CodeQL Action Changelog +## 2.1.35 - 01 Dec 2022 + +No user facing changes. + ## 2.1.34 - 25 Nov 2022 - Update default CodeQL bundle version to 2.11.4. [#1391](https://github.com/github/codeql-action/pull/1391) diff --git a/lib/analyze-action-env.test.js b/lib/analyze-action-env.test.js index 2c8ca9faf6..024abddda2 100644 --- a/lib/analyze-action-env.test.js +++ b/lib/analyze-action-env.test.js @@ -45,6 +45,7 @@ const util = __importStar(require("./util")); .stub(actionsUtil, "createStatusReportBase") .resolves({}); sinon.stub(actionsUtil, "sendStatusReport").resolves(true); + sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true); const gitHubVersion = { type: util.GitHubVariant.DOTCOM, }; diff --git a/lib/analyze-action-env.test.js.map b/lib/analyze-action-env.test.js.map index 5933cf60c9..e0dc93f7c5 100644 --- a/lib/analyze-action-env.test.js.map +++ b/lib/analyze-action-env.test.js.map @@ -1 +1 @@ -{"version":3,"file":"analyze-action-env.test.js","sourceRoot":"","sources":["../src/analyze-action-env.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAuB;AACvB,6CAA+B;AAE/B,4DAA8C;AAC9C,mDAAqC;AACrC,4DAA8C;AAC9C,mDAIyB;AACzB,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,iCAAiC;AAEjC,IAAA,aAAI,EAAC,8DAA8D,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC/E,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QACrC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC,iBAAiB,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CAAC;QACjC,IAAA,0CAA0B,EAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAEpC,uEAAuE;QACvE,0EAA0E;QAC1E,iBAAiB;QACjB,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC;QAEnC,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAC3D,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QACzD,MAAM,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAElD,uEAAuE;QACvE,oEAAoE;QACpE,4EAA4E;QAC5E,wEAAwE;QACxE,MAAM,aAAa,CAAC,UAAU,CAAC;QAE/B,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC/D,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;QAC7D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC9D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"analyze-action-env.test.js","sourceRoot":"","sources":["../src/analyze-action-env.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAuB;AACvB,6CAA+B;AAE/B,4DAA8C;AAC9C,mDAAqC;AACrC,4DAA8C;AAC9C,mDAIyB;AACzB,6CAA+B;AAE/B,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AAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC9D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/analyze-action-input.test.js b/lib/analyze-action-input.test.js index 0137a785ab..214a6745f9 100644 --- a/lib/analyze-action-input.test.js +++ b/lib/analyze-action-input.test.js @@ -61,6 +61,7 @@ const util = __importStar(require("./util")); optionalInputStub.withArgs("cleanup-level").returns("none"); optionalInputStub.withArgs("expect-error").returns("false"); sinon.stub(util, "getGitHubVersion").resolves(gitHubVersion); + sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true); (0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir); (0, testing_utils_1.mockFeatureFlagApiEndpoint)(200, {}); process.env["CODEQL_THREADS"] = "1"; diff --git a/lib/analyze-action-input.test.js.map b/lib/analyze-action-input.test.js.map index 801e8c1d76..3eb3900711 100644 --- a/lib/analyze-action-input.test.js.map +++ b/lib/analyze-action-input.test.js.map @@ -1 +1 @@ -{"version":3,"file":"analyze-action-input.test.js","sourceRoot":"","sources":["../src/analyze-action-input.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAuB;AACvB,6CAA+B;AAE/B,4DAA8C;AAC9C,mDAAqC;AACrC,4DAA8C;AAC9C,mDAIyB;AACzB,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,iCAAiC;AAEjC,IAAA,aAAI,EAAC,sDAAsD,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACvE,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QACr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E,oEAAoE;QACpE,4EAA4E;QAC5E,wEAAwE;QACxE,MAAM,aAAa,CAAC,UAAU,CAAC;QAE/B,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC/D,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;QAC7D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QAC9D,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 7b23c95768..0d4f119f5b 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -103,6 +103,8 @@ function doesGoExtractionOutputExist(config) { * - We detect whether an autobuild step is present by checking the * `util.DID_AUTOBUILD_GO_ENV_VAR_NAME` environment variable, which is set * when the autobuilder is invoked. + * - We detect whether the Go database has already been finalized in case it + * has been manually set in a prior Action step. * - We approximate whether manual build steps are present by looking at * whether any extraction output already exists for Go. */ @@ -114,6 +116,10 @@ async function runAutobuildIfLegacyGoWorkflow(config, logger) { logger.debug("Won't run Go autobuild since it has already been run."); return; } + if ((0, analyze_1.dbIsFinalized)(config, languages_1.Language.go, logger)) { + logger.debug("Won't run Go autobuild since there is already a finalized database for Go."); + return; + } // This captures whether a user has added manual build steps for Go if (doesGoExtractionOutputExist(config)) { logger.debug("Won't run Go autobuild since at least one file of Go code has already been extracted."); diff --git a/lib/analyze-action.js.map b/lib/analyze-action.js.map index 970b089704..92ac11a308 100644 --- a/lib/analyze-action.js.map +++ b/lib/analyze-action.js.map @@ -1 +1 @@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B,EAAE,CAAC;YAC/C,MAAM,gBAAgB,CACpB,SAAS,EACT,MAAM,EACN,KAAK,EACL,KAAK,EACL,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,CACP,CAAC;SACH;aAAM;YACL,MAAM,gBAAgB,CACpB,SAAS,EACT,MAAM,EACN,SAAS,EACT,KAAK,EACL,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,CACP,CAAC;SACH;QAED,OAAO;KACR;IAED,IAAI,QAAQ,IAAI,YAAY,EAAE;QAC5B,MAAM,gBAAgB,CACpB,SAAS,EACT,MAAM,EACN;YACE,GAAG,QAAQ;YACX,GAAG,YAAY,CAAC,YAAY;SAC7B,EACD,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,CACP,CAAC;KACH;SAAM,IAAI,QAAQ,EAAE;QACnB,MAAM,gBAAgB,CACpB,SAAS,EACT,MAAM,EACN,EAAE,GAAG,QAAQ,EAAE,EACf,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,CACP,CAAC;KACH;SAAM;QACL,MAAM,gBAAgB,CACpB,SAAS,EACT,MAAM,EACN,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,CACP,CAAC;KACH;AACH,CAAC;AAEY,QAAA,UAAU,GAAG,GAAG,EAAE,CAAC;AAEhC,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,kBAAU,CAAC;KAClB;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,0BAA0B,KAAK,EAAE,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACpB;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"analyze-action.js","sourceRoot":"","sources":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M,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 1e10ceec98..3335b76ad9 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,6 +1,6 @@ { "name": "codeql", - "version": "2.1.34", + "version": "2.1.35", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package-lock.json b/package-lock.json index 1325685708..de8ab33213 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "codeql", - "version": "2.1.34", + "version": "2.1.35", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "codeql", - "version": "2.1.34", + "version": "2.1.35", "license": "MIT", "dependencies": { "@actions/artifact": "^1.1.0", diff --git a/package.json b/package.json index 47a274bfe3..16b6c49e7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codeql", - "version": "2.1.34", + "version": "2.1.35", "private": true, "description": "CodeQL action", "scripts": { diff --git a/python-setup/install_tools.ps1 b/python-setup/install_tools.ps1 index 353edfe4fd..ad50fb3b75 100644 --- a/python-setup/install_tools.ps1 +++ b/python-setup/install_tools.ps1 @@ -1,11 +1,7 @@ #! /usr/bin/pwsh -# while waiting for the next release of `virtualenv` after v20.16.5, we install an older -# version of `setuptools` to ensure that binaries are always put under -# `/bin`, which wouldn't always happen with the GitHub actions version of -# Ubuntu 22.04. See https://github.com/github/codeql-action/issues/1249 -py -2 -m pip install --user --upgrade pip 'setuptools<60' wheel -py -3 -m pip install --user --upgrade pip 'setuptools<60' wheel +py -2 -m pip install --user --upgrade pip setuptools wheel +py -3 -m pip install --user --upgrade pip setuptools wheel # virtualenv is a bit nicer for setting up virtual environment, since it will provide up-to-date versions of # pip/setuptools/wheel which basic `python3 -m venv venv` won't diff --git a/python-setup/install_tools.sh b/python-setup/install_tools.sh index a247da4ead..d5ff2990fd 100755 --- a/python-setup/install_tools.sh +++ b/python-setup/install_tools.sh @@ -12,16 +12,15 @@ export PATH="$HOME/.local/bin:$PATH" # Setup Python 3 dependency installation tools. -# we install an older version of `setuptools` to ensure that binaries are always put -# under `/bin`, which wouldn't always happen with the GitHub actions version -# of Ubuntu 22.04. See https://github.com/github/codeql-action/issues/1249. The the next -# release of `virtualenv` after v20.16.5 will include a fix for this, so we can remove -# this bit of the logic again. -python3 -m pip install --user --upgrade pip 'setuptools<60' wheel +python3 -m pip install --user --upgrade pip setuptools wheel -# virtualenv is a bit nicer for setting up virtual environment, since it will provide up-to-date versions of -# pip/setuptools/wheel which basic `python3 -m venv venv` won't -python3 -m pip install --user virtualenv +# virtualenv is a bit nicer for setting up virtual environment, since it will provide +# up-to-date versions of pip/setuptools/wheel which basic `python3 -m venv venv` won't. +# +# version 20.16.5 (Python 3 only) had some problems when used together with newer +# versions of setuptools (60+) and would not always put binaries under `/bin` +# -- see https://github.com/github/codeql-action/issues/1249 for more details. +python3 -m pip install --user --upgrade 'virtualenv>20.16.5' # We install poetry with pip instead of the recommended way, since the recommended way # caused some problem since `poetry run` gives output like: @@ -45,7 +44,7 @@ if command -v python2 >/dev/null 2>&1; then curl --location --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python2 fi - python2 -m pip install --user --upgrade pip 'setuptools<60' wheel + python2 -m pip install --user --upgrade pip setuptools wheel python2 -m pip install --user 'virtualenv!=20.12.0' fi diff --git a/src/analyze-action-env.test.ts b/src/analyze-action-env.test.ts index f0cafc8d8b..13006667e6 100644 --- a/src/analyze-action-env.test.ts +++ b/src/analyze-action-env.test.ts @@ -29,6 +29,8 @@ test("analyze action with RAM & threads from environment variables", async (t) = .stub(actionsUtil, "createStatusReportBase") .resolves({} as actionsUtil.StatusReportBase); sinon.stub(actionsUtil, "sendStatusReport").resolves(true); + sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true); + const gitHubVersion: util.GitHubVersion = { type: util.GitHubVariant.DOTCOM, }; diff --git a/src/analyze-action-input.test.ts b/src/analyze-action-input.test.ts index d43cb344eb..8feb89906d 100644 --- a/src/analyze-action-input.test.ts +++ b/src/analyze-action-input.test.ts @@ -45,6 +45,7 @@ test("analyze action with RAM & threads from action inputs", async (t) => { optionalInputStub.withArgs("cleanup-level").returns("none"); optionalInputStub.withArgs("expect-error").returns("false"); sinon.stub(util, "getGitHubVersion").resolves(gitHubVersion); + sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true); setupActionsVars(tmpDir, tmpDir); mockFeatureFlagApiEndpoint(200, {}); diff --git a/src/analyze-action.ts b/src/analyze-action.ts index e004ef2117..8e9c4b61d0 100644 --- a/src/analyze-action.ts +++ b/src/analyze-action.ts @@ -9,6 +9,7 @@ import * as actionsUtil from "./actions-util"; import { DatabaseCreationTimings } from "./actions-util"; import { CodeQLAnalysisError, + dbIsFinalized, QueriesStatusReport, runCleanup, runFinalize, @@ -134,6 +135,8 @@ function doesGoExtractionOutputExist(config: Config): boolean { * - We detect whether an autobuild step is present by checking the * `util.DID_AUTOBUILD_GO_ENV_VAR_NAME` environment variable, which is set * when the autobuilder is invoked. + * - We detect whether the Go database has already been finalized in case it + * has been manually set in a prior Action step. * - We approximate whether manual build steps are present by looking at * whether any extraction output already exists for Go. */ @@ -145,6 +148,12 @@ async function runAutobuildIfLegacyGoWorkflow(config: Config, logger: Logger) { logger.debug("Won't run Go autobuild since it has already been run."); return; } + if (dbIsFinalized(config, Language.go, logger)) { + logger.debug( + "Won't run Go autobuild since there is already a finalized database for Go." + ); + return; + } // This captures whether a user has added manual build steps for Go if (doesGoExtractionOutputExist(config)) { logger.debug(