Fix assumption that download URLs contain file extension#2710
Merged
henrymercer merged 4 commits intomainfrom Jan 22, 2025
Merged
Fix assumption that download URLs contain file extension#2710henrymercer merged 4 commits intomainfrom
henrymercer merged 4 commits intomainfrom
Conversation
283dbf2 to
b0814e6
Compare
This is not the case when downloading the bundle from a GitHub Release synced to GHES with the CodeQL Action sync tool.
b0814e6 to
20bbc8f
Compare
henrymercer
commented
Jan 22, 2025
NlightNFotis
previously approved these changes
Jan 22, 2025
Member
NlightNFotis
left a comment
There was a problem hiding this comment.
Clean! Love this!
Thank you for the fix.
6ee0ea1 to
3505f81
Compare
Contributor
Author
|
Fixed a merge conflict. @NlightNFotis would you mind re-reviewing? Thanks! |
NlightNFotis
approved these changes
Jan 22, 2025
This was referenced Jan 22, 2025
marcellodesales
added a commit
to marcellodesales/runner
that referenced
this pull request
Jan 22, 2025
This is based on the problems reported at github/codeql-action#2705 and github/codeql-action#2400 where the base docker image doesn't include zstd compression tool. The error occurs running codeQL: Finished downloading CodeQL bundle to /home/runner/_work/_temp/ca3b4527-1a21-43d9-8713-81909027bb0a (11.1s). Extracting CodeQL bundle. ##[debug]Extracting to /home/runner/_work/_temp/c2146770-b178-4be5-9164-0a0e8345e244. tar -x --zstd --warning=no-unknown-keyword --overwrite -f /home/runner/_work/_temp/ca3b4527-1a21-43d9-8713-81909027bb0a -C /home/runner/_work/_temp/c2146770-b178-4be5-9164-0a0e8345e244 tar (child): zstd: Cannot exec: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now ##[debug]Cleaning up extraction destination directory. ##[debug]Cleaned up extraction destination directory. ##[debug]Cleaning up CodeQL bundle archive. ##[debug]Cleaned up CodeQL bundle archive. Error: Unable to download and extract CodeQL CLI: Failed to run "tar -x --zstd --warning=no-unknown-keyword --overwrite -f /home/runner/_work/_temp/ca3b4527-1a21-43d9-8713-81909027bb0a -C /home/runner/_work/_temp/c2146770-b178-4be5-9164-0a0e8345e244". Exit code was 2 and last log line was: n/a. See the logs for more details. Details: Error: Failed to run "tar -x --zstd --warning=no-unknown-keyword --overwrite -f /home/runner/_work/_temp/ca3b4527-1a21-43d9-8713-81909027bb0a -C /home/runner/_work/_temp/c2146770-b178-4be5-9164-0a0e8345e244". Exit code was 2 and last log line was: n/a. See the logs for more details. at ChildProcess.<anonymous> (/home/runner/_work/_actions/github/codeql-action/v3.28.1/lib/tar.js:171:28) at ChildProcess.emit (node:events:519:28) at ChildProcess._handle.onexit (node:internal/child_process:294:12) Why: it will drastically increase performance while downloading codeQL. A fix was pushed to github/codeql-action#2710 but it hasn't been released. Just including zstd will guarantee to use the best compression tool other than tar.
8 tasks
TingluoHuang
pushed a commit
to marcellodesales/runner
that referenced
this pull request
Oct 24, 2025
This is based on the problems reported at github/codeql-action#2705 and github/codeql-action#2400 where the base docker image doesn't include zstd compression tool. The error occurs running codeQL: Finished downloading CodeQL bundle to /home/runner/_work/_temp/ca3b4527-1a21-43d9-8713-81909027bb0a (11.1s). Extracting CodeQL bundle. ##[debug]Extracting to /home/runner/_work/_temp/c2146770-b178-4be5-9164-0a0e8345e244. tar -x --zstd --warning=no-unknown-keyword --overwrite -f /home/runner/_work/_temp/ca3b4527-1a21-43d9-8713-81909027bb0a -C /home/runner/_work/_temp/c2146770-b178-4be5-9164-0a0e8345e244 tar (child): zstd: Cannot exec: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now ##[debug]Cleaning up extraction destination directory. ##[debug]Cleaned up extraction destination directory. ##[debug]Cleaning up CodeQL bundle archive. ##[debug]Cleaned up CodeQL bundle archive. Error: Unable to download and extract CodeQL CLI: Failed to run "tar -x --zstd --warning=no-unknown-keyword --overwrite -f /home/runner/_work/_temp/ca3b4527-1a21-43d9-8713-81909027bb0a -C /home/runner/_work/_temp/c2146770-b178-4be5-9164-0a0e8345e244". Exit code was 2 and last log line was: n/a. See the logs for more details. Details: Error: Failed to run "tar -x --zstd --warning=no-unknown-keyword --overwrite -f /home/runner/_work/_temp/ca3b4527-1a21-43d9-8713-81909027bb0a -C /home/runner/_work/_temp/c2146770-b178-4be5-9164-0a0e8345e244". Exit code was 2 and last log line was: n/a. See the logs for more details. at ChildProcess.<anonymous> (/home/runner/_work/_actions/github/codeql-action/v3.28.1/lib/tar.js:171:28) at ChildProcess.emit (node:events:519:28) at ChildProcess._handle.onexit (node:internal/child_process:294:12) Why: it will drastically increase performance while downloading codeQL. A fix was pushed to github/codeql-action#2710 but it hasn't been released. Just including zstd will guarantee to use the best compression tool other than tar.
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.
The CodeQL Action incorrectly assumes that it can infer the compression method of a CodeQL Bundle from its URL. This works most of the time, but not in the case that a CodeQL Bundle has been synced to a GHES instance using the CodeQL Action sync tool.
This bug has not yet been released as part of a version of GHES, but affects customers using GitHub Connect to pull in more recent versions of the Action.
Merge / deployment checklist