Labels
t-buildersIssues owned by the Builders team.Issues owned by the Builders team.
Description
Problem
When an Actor's files are over the multi-file size limit, apify push packs them into a zip with createActZip and uploads that. This path has two bugs:
- A symlinked file goes into the zip as a link. archiver writes a symlink as a link entry, which holds only the target path. The platform unzips it as a link to a file the upload may not hold, for example a schema shared from outside the Actor folder. The multi-file upload sends the file's content, so the same Actor builds or fails depending on its size.
- Push may read the zip before it's fully written.
createActZipresolves whenarchive.finalize()does. That happens when the archive stream ends, before the file stream has written the last bytes to disk. Push reads the file right after, so it can upload a truncated zip.
Every push that zips takes this path, not only monorepo pushes.
What we want
- A file reached through a symlink goes into the zip as its content, as in the multi-file upload.
createActZipresolves only once the whole zip is on disk.
How it's tested
Unit tests for createActZip, each failing on the current code: a symlinked file comes out of the zip with its content, and a zip read right after the call holds every file.
Links
- feat: push monorepo Actors by uploading the repository root with
actorPath#1505: the monorepo upload, whose review found both bugs.
Metadata
Metadata
Assignees
Labels
t-buildersIssues owned by the Builders team.Issues owned by the Builders team.
Activity