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 — Preserve HTTP errors from streaming bundle downloads by henrymercer · Pull Request #4138 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Preserve HTTP status codes when streaming CodeQL bundle downloads fail, so callers can distinguish a missing bundle from other download failures. Rethrow 404s without retrying the same URL through buffered downloading.

Clean up the extraction directory before retrying or rethrowing. Other streaming failures continue to fall back to downloading the bundle before extracting it.

Sorry, something went wrong.

Uh oh!

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

All reactions
@henrymercer
Preserve HTTP errors from streaming bundle downloads
5bdaf5d
Co-authored-by: Copilot App <[email protected]>
@henrymercer
henrymercer requested a balanced review from Copilot September 10, 2026 18:07
@github-actions github-actions Bot added the size/S Should be easy to review label Sep 10, 2026
Copilot started reviewing on behalf of henrymercer September 10, 2026 18:07
View session
Copilot AI reviewed Sep 10, 2026
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.

Warning

  • Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.

Copilot review overview

🟢 Approval recommended

The behavioral change is well-scoped and validated with targeted tests; only a minor error-message consistency nit was identified.

Review tier: Lite
Findings: 1 Low severity

New issues introduced by this change (1)
Severity Finding
Low severity src/​tools-download.ts — response.statusCode is treated as potentially undefined (you already fall back to 0 for the…
What changed in this PR

This PR improves error handling for streaming CodeQL bundle downloads by preserving HTTP status codes (notably 404) so callers can distinguish “missing bundle” from transient download failures, while ensuring the extraction directory is cleaned up on failures.

Changes:

  • Throw a typed HTTPError from streaming downloads when the HTTP status is not 200, and rethrow 404s without falling back to buffered download.
  • Always clean the destination extraction directory when the streaming path fails, before retrying/falling back/rethrowing.
  • Add tests covering rethrow-on-404 behavior and fallback-on-5xx behavior, and tighten assertions around cleanup.
File Description
src/​tools-download.ts Preserves HTTP status via HTTPError, cleans extraction dir on streaming failure, and bypasses fallback for 404s.
src/​tools-download.test.ts Adds coverage for 404 rethrow (no retry) and 500 fallback, plus cleanup assertions.
lib/​entry-points.js Generated JS output (excluded by policy; not reviewed).
Files excluded by content exclusion policy (1)
  • lib/entry-points.js

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/tools-download.ts Resolved

Uh oh!

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

@henrymercer
Omit unknown HTTP status codes from download errors
1335412
Co-authored-by: Copilot App <[email protected]>
@henrymercer
henrymercer requested a balanced review from Copilot September 14, 2026 10:42
@github-actions github-actions Bot added size/M Should be of average difficulty to review and removed size/S Should be easy to review labels Sep 14, 2026
Copilot started reviewing on behalf of henrymercer September 14, 2026 10:42
View session
Copilot AI reviewed Sep 14, 2026
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.

Warning

  • Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.

Copilot review overview

🟢 Approval recommended

The implementation matches the stated behavior and includes focused regression coverage.

Review tier: Balanced
Findings: None

Resolved findings (1)
  • Low severity response.statusCode is treated as potentially undefined (you already fall back to 0 for the…
Files excluded by content exclusion policy (1)
  • lib/entry-points.js

Sorry, something went wrong.

Uh oh!

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

All reactions
@henrymercer
henrymercer marked this pull request as ready for review September 14, 2026 10:44
@henrymercer
henrymercer requested a review from a team as a code owner September 14, 2026 10:44
@mbg
mbg self-requested a review September 14, 2026 12:59
mbg
mbg previously approved these changes Sep 14, 2026
View reviewed changes

@mbg mbg left a comment

Copy link
Copy Markdown
Member

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.

Looks OK, but with a design question about defaulting to 0 for the status code -- see the detailed comments.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/tools-download.ts Resolved

Uh oh!

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

Comment thread src/tools-download.ts Resolved

Uh oh!

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

@henrymercer
Use a plain error when the HTTP status is unknown
0224ca9
Co-authored-by: Copilot App <[email protected]>
@henrymercer
henrymercer dismissed mbg’s stale review via 0224ca9 September 15, 2026 11:55
mbg
mbg approved these changes Sep 15, 2026
View reviewed changes

@mbg mbg left a comment

Copy link
Copy Markdown
Member

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.

Thanks! LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
@henrymercer
henrymercer added this pull request to the merge queue Sep 15, 2026
Merged via the queue into main with commit d65664d Sep 15, 2026
222 checks passed

Uh oh!

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

@henrymercer
henrymercer deleted the henrymercer/bundle-download-errors branch September 15, 2026 12:48
This was referenced Sep 18, 2026
Merge main into releases/v4 #4152
Merged
Merge releases/v4 into releases/v3 #4154
Merged
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
@mbg mbg mbg approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

size/M Should be of average difficulty to review

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 @mbg
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 01402503 — 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.