Skip to content

fix: zip symlinked files as their content and finish writing the zip before upload - #1549

Merged
DaveHanns merged 3 commits into
masterfrom
fix/push-zip-content
Nov 5, 2026
Merged

DaveHanns merged 3 commits into
masterfrom
fix/push-zip-content

Conversation

@DaveHanns

Copy link
Copy Markdown
Contributor

Summary

Two fixes to createActZip, which every push over the multi-file size limit uses. The review of #1505 found them. They're split out here because they aren't specific to monorepos.

Changes

  • A file reached through a symlink goes into the zip as its content. archiver wrote it as a link entry, which the platform unzips as a link to a file the upload may not hold. The multi-file upload already sends the content, so what a push uploads no longer depends on its size.
  • createActZip resolves once the file stream has written the whole zip. It resolved when the archive stream ended, and push reads the file right after, so it could upload a truncated zip.

Tests

  • Two unit tests in utils.test.ts, each failing on master: a symlinked file comes out of the zip with its content (skipped on Windows, where creating a symlink needs extra rights), and a zip read right after the call holds every file.
  • pnpm run lint, pnpm run format, tsc --noEmit, pnpm run build, and pnpm run test:local pass, except the two [python] suites, which fail the same way on master because the local Python is 3.9.

Notes for reviewers

Closes #1548

🤖 Generated with Claude Code

archive.finalize() resolves when the archive stream ends, before the file
stream has flushed it. Push reads the file right after, so a fast store call
could upload a truncated zip.
archiver writes a symlink as a link entry, which the platform unzips as a link
to a file the upload may lack. The multi-file upload already sends the
content, so what a push uploads no longer depends on its size.
@DaveHanns DaveHanns added the t-builders Issues owned by the Builders team. label Nov 4, 2026
@DaveHanns DaveHanns self-assigned this Nov 4, 2026
@pkg-pr-new

pkg-pr-new Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/apify-cli@1549

commit: 9c90fcc

@DaveHanns
DaveHanns marked this pull request as ready for review November 4, 2026 09:29
@DaveHanns
DaveHanns requested a review from l2ysho as a code owner November 4, 2026 09:29
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Nov 4, 2026

@l2ysho l2ysho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

@DaveHanns
DaveHanns merged commit cd0dad4 into master Nov 5, 2026
31 of 32 checks passed
@DaveHanns
DaveHanns deleted the fix/push-zip-content branch November 5, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-builders Issues owned by the Builders team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

apify push: the zip upload stores symlinks as links and may read the zip before it's written

3 participants