| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This PR adds support for using the latest CodeQL nightly builds by allowing users to specify tools: nightly or tools: nightly-latest in their workflow configurations. This enables easier dogfooding of the latest CodeQL features for internal testing purposes.
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/setup-codeql.ts | Core implementation of nightly tool support with new constants and getNightlyToolsUrl function |
| lib/*.js | Generated JavaScript files reflecting the TypeScript changes |
| CHANGELOG.md | Documents the new nightly tools feature |
| .github/actions/prepare-test/action.yml | Updates test preparation to handle nightly tool inputs |
Sorry, something went wrong.
There was a problem hiding this comment.
Some initial comments - it looks like you've pushed some changes that relate to some of them already. I see we're also fighting random CI failures, so I'll hold off finishing my review until this PR has stabilised
Sorry, something went wrong.
| throw new Error("Could not find latest nightly release."); | ||
| } | ||
|
|
||
| return `https://github.com/${CODEQL_NIGHTLIES_REPOSITORY_OWNER}/${CODEQL_NIGHTLIES_REPOSITORY_NAME}/releases/download/${latestRelease.tag_name}/${getCodeQLBundleName(compressionMethod)}`; |
There was a problem hiding this comment.
Would it make sense to look through the release artifacts and search for the one we want, like we do for update-job-proxy?
Sorry, something went wrong.
There was a problem hiding this comment.
We could do but using the http URL is closer to how users would specify a bundle with the tools input. Things might be less optimal if we used URLs returned by the API since we perform a few optimizations by inspecting the URL structure.
Sorry, something went wrong.
|
|
||
| if [[ "$VERSION" == "nightly-latest" && "$RUNNER_OS" != "Windows" ]]; then | ||
| extension="tar.zst" | ||
| else | ||
| extension="tar.gz" | ||
| fi | ||
|
|
||
| if [[ "$USE_ALL_PLATFORM_BUNDLE" == "true" ]]; then | ||
| artifact_name="codeql-bundle.$extension" | ||
| artifact_name="codeql-bundle.tar.gz" | ||
| elif [[ "$RUNNER_OS" == "Linux" ]]; then | ||
| artifact_name="codeql-bundle-linux64.$extension" | ||
| artifact_name="codeql-bundle-linux64.tar.gz" | ||
| elif [[ "$RUNNER_OS" == "macOS" ]]; then | ||
| artifact_name="codeql-bundle-osx64.$extension" | ||
| artifact_name="codeql-bundle-osx64.tar.gz" | ||
| elif [[ "$RUNNER_OS" == "Windows" ]]; then | ||
| artifact_name="codeql-bundle-win64.$extension" | ||
| artifact_name="codeql-bundle-win64.tar.gz" | ||
| else |
There was a problem hiding this comment.
I am not sure I know off the top of my head what's prompted this change - could you explain?
Sorry, something went wrong.
There was a problem hiding this comment.
Nightly latest lookup is now handled by the Action, so the condition would never be true. And if we're referring to a specific nightly, it might not have a zstd bundle. We originally added this to improve our test coverage of zstd bundles, but now that these are shipped as latest, we have enough test coverage. So it's not really worth refactoring this to determine whether the referenced nightly has a zstd bundle.
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good to me. Should we document nightly as a valid value in the description for the tools input in init/action.yml?
Sorry, something went wrong.
Yes we should, thanks! |
Sorry, something went wrong.
|
Is there any future plans to differentiate nightly vs nightly-latest - they appear to behave the same ? |
Sorry, something went wrong.
No plans, they're just aliases. In the future we might add support for referencing a particular nightly too via something like nightly-yyyymmdd, in which case I think it's useful to have that nightly-latest alias. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
To make it easier for us to dogfood CodeQL, add special values of the tools input tools: nightly and tools: nightly-latest that we can use to run the latest nightly.
Risk assessment
For internal use only. Please select the risk level of this change:
Merge / deployment checklist