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 — Raise the file limit for debug artifacts by producing zip64 files where necessary by henrymercer · Pull Request #2842 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented Apr 4, 2025

Copy link
Copy Markdown
Contributor

The previous library only supported the original zip format, which is limited to 65535 files. This caused issues producing debug artifacts for codebases with large numbers of files.

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
@henrymercer
Raise file limit in debug artifacts by using zip64
56feaac
Copilot AI review requested due to automatic review settings April 4, 2025 13:44
@henrymercer
henrymercer requested a review from a team as a code owner April 4, 2025 13:44
Copilot AI reviewed Apr 4, 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.

Pull Request Overview

This PR updates the debug artifacts creation process by replacing the AdmZip library with archiver to accommodate zip64 files for large debug artifacts.

  • Replaces AdmZip with archiver in both TypeScript and JavaScript files
  • Implements asynchronous zip creation through archiver to support a higher file limit

Reviewed Changes

Copilot reviewed 36 out of 37 changed files in this pull request and generated 2 comments.

File Description
src/debug-artifacts.ts Replaces AdmZip with archiver and sets up error/warning event handlers
lib/debug-artifacts.js Mirrors the change in the TypeScript file for JavaScript usage
Files not reviewed (1)
  • package.json: Language not supported

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/debug-artifacts.ts Resolved

Uh oh!

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

Comment thread lib/debug-artifacts.js
zip.addLocalFolder(databasePath);
zip.writeZip(databaseBundlePath);
const output = fs.createWriteStream(databaseBundlePath);
const zip = (0, archiver_1.default)("zip");

Copilot AI Apr 4, 2025

Copy link

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.

The PR title indicates support for large numbers of files with zip64; consider enabling zip64 explicitly by passing {forceZip64: true} to archiver to ensure the archive correctly supports large file sets.

Suggested change
const zip = (0, archiver_1.default)("zip");
const zip = (0, archiver_1.default)("zip", { zlib: { level: 9 }, forceZip64: true });

Sorry, something went wrong.

Uh oh!

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

All reactions
Copilot uses AI. Check for mistakes.

@henrymercer henrymercer Apr 4, 2025

Copy link
Copy Markdown
Contributor Author

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.

Suggestion in compiled code.

Sorry, something went wrong.

Uh oh!

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

All reactions
@henrymercer henrymercer added the Update dependencies Trigger PR workflow to update dependencies label Apr 4, 2025
@github-actions github-actions Bot removed the Update dependencies Trigger PR workflow to update dependencies label Apr 4, 2025
@github-actions
Update checked-in dependencies
fd8685f
@github-actions

github-actions Bot commented Apr 4, 2025

Copy link
Copy Markdown
Contributor

Pushed a commit to update the checked-in dependencies. Please mark the PR as ready for review to trigger PR checks.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions
github-actions Bot marked this pull request as draft April 4, 2025 13:46
@henrymercer
henrymercer marked this pull request as ready for review April 4, 2025 13:47
aeisenberg
aeisenberg reviewed Apr 4, 2025
View reviewed changes
Comment thread src/debug-artifacts.ts
Comment on lines +354 to +356
zip.on("warning", (err) => {
throw err;
});

@aeisenberg aeisenberg Apr 4, 2025

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.

Two questions:

  1. In what cases will there be a warning and is this really something we want to raise an error on?
  2. What will happen if an error is thrown? Where will it be caught and will it be properly handled?

Sorry, something went wrong.

Uh oh!

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

All reactions

@aeisenberg aeisenberg Apr 4, 2025

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.

Looking at the sample code in the packge, the recommendation is something like this:

  if (err.code === "ENOENT") {
    // log warning
  } else {
    // throw error
    throw err;
  }

I'll update.

Sorry, something went wrong.

Uh oh!

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

All reactions
aeisenberg
aeisenberg reviewed Apr 4, 2025
View reviewed changes
Comment thread src/debug-artifacts.ts
Comment on lines +354 to +356
zip.on("warning", (err) => {
throw err;
});

@aeisenberg aeisenberg Apr 4, 2025

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.

Looking at the sample code in the packge, the recommendation is something like this:

  if (err.code === "ENOENT") {
    // log warning
  } else {
    // throw error
    throw err;
  }

I'll update.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/debug-artifacts.ts Outdated
});

zip.on("warning", (err) => {
throw err;

@aeisenberg aeisenberg Apr 4, 2025

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.

Suggested change
throw err;
// Ignore ENOENT warnings. There's nothing anyone can do about it.
if (err.code !== "ENOENT") {
throw err;
}

Sorry, something went wrong.

Uh oh!

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

All reactions
@aeisenberg
aeisenberg force-pushed the henrymercer/zip64 branch from 117d1f1 to fd8685f Compare April 4, 2025 20:39
@aeisenberg
Don't throw error for ENOENT
a8be43c
@aeisenberg

aeisenberg commented Apr 4, 2025

Copy link
Copy Markdown
Contributor

I pushed the change since Henry is on vacation now.

All reactions

Sorry, something went wrong.

Uh oh!

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

angelapwen
angelapwen approved these changes Apr 5, 2025
View reviewed changes

@angelapwen angelapwen 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.

:shipit:

Sorry, something went wrong.

Uh oh!

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

aeisenberg reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@aeisenberg
aeisenberg merged commit bb59df6 into main Apr 7, 2025
@aeisenberg
aeisenberg deleted the henrymercer/zip64 branch April 7, 2025 17:50
@github-actions github-actions Bot mentioned this pull request Apr 7, 2025
Merge main into releases/v3 #2854
Merged
6 of 8 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Apr 9, 2025
[pull] main from github:main StemmlerSisters/codeql-action#1
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aeisenberg aeisenberg aeisenberg left review comments
@zutshisunakshi zutshisunakshi zutshisunakshi left review comments
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
@angelapwen angelapwen angelapwen 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.

5 participants

@henrymercer @aeisenberg @zutshisunakshi @angelapwen
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.