Change CodeQL bundle download format to .tar.zst#13826
Open
oscarsj wants to merge 1 commit intoactions:mainfrom
Open
Change CodeQL bundle download format to .tar.zst#13826oscarsj wants to merge 1 commit intoactions:mainfrom
oscarsj wants to merge 1 commit intoactions:mainfrom
Conversation
Updated download link for CodeQL bundle to use .tar.zst format.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Ubuntu image build to download the CodeQL bundle in the .tar.zst format so that the preinstalled toolcache matches what codeql-action expects on non-Windows runners, avoiding unnecessary toolcache misses and re-downloads.
Changes:
- Switch CodeQL bundle download artifact from
.tar.gzto.tar.zstfor Ubuntu.
Comments suppressed due to low confidence (1)
images/ubuntu/scripts/build/install-codeql-bundle.sh:37
- The download URL was switched to a
.tar.zstarchive, but the script still unpacks usingtar -xzf(gzip). This will fail at build time / leave the toolcache empty. Update the extraction step to use zstd support (e.g.,tar --zstd ...orunzstdpipe) and ensure the required zstd tooling is available on the image before this runs.
codeql_archive=$(download_with_retry "https://github.com/github/codeql-action/releases/download/$bundle_tag_name/codeql-bundle-linux64.tar.zst")
codeql_toolcache_path="$AGENT_TOOLSDIRECTORY/CodeQL/$bundle_version/x64"
mkdir -p "$codeql_toolcache_path"
Comment on lines
31
to
32
| # Note that this is the all-platforms CodeQL bundle, to support scenarios where customers run | ||
| # different operating systems within containers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated download link for CodeQL bundle to use
.tar.zstformat.We are seeing toolcache miss and requests to donwload CodeQL latest version despite the fact that the version requested is the same as the version installed. Checking the codeql-action download we see that the action tries to download a
.tar.zstin all platform (but windows), so this change is needed to install the proper version (.tar.zst) in Ubuntu.This is the codeql-action code that checks the existence of the pre-installed bundle:
Description
Bug fixing
Related issue:
Check list