GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix assumption that download URLs contain file extension by henrymercer · Pull Request #2710 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented Jan 22, 2025

Copy link
Copy Markdown
Contributor

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

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot AI review requested due to automatic review settings January 22, 2025 12:35
@henrymercer
henrymercer requested a review from a team as a code owner January 22, 2025 12:35
Copilot AI reviewed Jan 22, 2025
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again, by re-requesting a review.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@henrymercer
henrymercer force-pushed the henrymercer/fix-extension-assumption branch from 283dbf2 to b0814e6 Compare January 22, 2025 12:53
henrymercer added 2 commits January 22, 2025 13:02
@henrymercer
Fix assumption that download URLs contain file extension
d23f49f
This is not the case when downloading the bundle from a GitHub Release synced to GHES with the CodeQL Action sync tool.
@henrymercer
Add changelog note
20bbc8f
@henrymercer
henrymercer force-pushed the henrymercer/fix-extension-assumption branch from b0814e6 to 20bbc8f Compare January 22, 2025 13:02
henrymercer
henrymercer commented Jan 22, 2025
View reviewed changes
Comment thread CHANGELOG.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
Tweak wording of changelog entry
07d3298
NlightNFotis
NlightNFotis previously approved these changes Jan 22, 2025
View reviewed changes

@NlightNFotis NlightNFotis left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean! Love this!

Thank you for the fix.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@henrymercer
henrymercer dismissed NlightNFotis’s stale review via f35143c January 22, 2025 14:48
@henrymercer
Merge branch 'main' into henrymercer/fix-extension-assumption
3505f81
@henrymercer
henrymercer force-pushed the henrymercer/fix-extension-assumption branch from 6ee0ea1 to 3505f81 Compare January 22, 2025 14:52
@henrymercer
henrymercer requested a review from NlightNFotis January 22, 2025 14:53
@henrymercer

henrymercer commented Jan 22, 2025

Copy link
Copy Markdown
Contributor Author

Fixed a merge conflict. @NlightNFotis would you mind re-reviewing? Thanks!

NlightNFotis reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
henrymercer enabled auto-merge January 22, 2025 15:12
NlightNFotis
NlightNFotis approved these changes Jan 22, 2025
View reviewed changes
@henrymercer
henrymercer merged commit 7e4b683 into main Jan 22, 2025
@henrymercer
henrymercer deleted the henrymercer/fix-extension-assumption branch January 22, 2025 16:03
This was referenced Jan 22, 2025
Compress release bundle with zstandard/zstd to reduce size #2400
Closed
Default runner image fails to initialize codeQL because of missing zstd #2705
Closed
marcellodesales added a commit to marcellodesales/runner that referenced this pull request Jan 22, 2025
@marcellodesales
🐳 Dockerfile: add zstd better compression missing for codeQL
ea77ae5
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.
@marcellodesales marcellodesales mentioned this pull request Jan 22, 2025
🐳 Dockerfile: add zstd better compression missing for codeQL actions/runner#3670
Open
@github-actions github-actions Bot mentioned this pull request Jan 22, 2025
Merge main into releases/v3 #2713
Merged
6 of 8 tasks
TingluoHuang pushed a commit to marcellodesales/runner that referenced this pull request Oct 24, 2025
@marcellodesales @TingluoHuang
🐳 Dockerfile: add zstd better compression missing for codeQL
733f9fb
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
+1 more reviewer
@NlightNFotis NlightNFotis NlightNFotis approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@henrymercer @NlightNFotis
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.