fix: edge bundling - tarball - add ./ prefix to tar entries to handle '@' prefixed filenames#6990
Conversation
… '@' prefixed filenames Fix: prefix each entry with './' so node-tar treats entries starting with '@' as explicit relative paths rather than archive-include directives. This affects frameworks like Qwik that emit files named @qwik-city-not-found-paths.js, @qwik-city-plan.js, etc. into the edge functions output directory, causing builds to fail with: ENOENT: no such file or directory, stat '/tmp/tmp-xxx/qwik-city-not-found-paths.js' Update tarball.ts
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis pull request adds support for bundling edge functions with Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes NotesThe core fix is straightforward—adding a 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can get early access to new features in CodeRabbit.Enable the |
pieh
left a comment
There was a problem hiding this comment.
Thank you @osmiumsilver !
The tarball bundling failures should not cause fatal errors yet. Unfortunately it seems like you've hit case where internals of tar.create just crash/panic instead of throwing so our catches can't recover.
This does handle one of such crash cases, but I'll look to harden the setup if possible to hopefully avoid those failures impacting builds
|
I'll get this released and updated in our build image ASAP and update once that is done |
|
This should now be fully released to build image, I'm still to do that in CLI, but this should at least unblock CI builds |
|
@pieh Yes, i just tried redeploying and saw the new version of netlify Build shown in the logs, and now the build process goes smoothly. Thank you! |
|
I also opened this PR upstream isaacs/node-tar#455 to hopefully prevent any potential other unhandled rejections causing fatal errors |
… '@' prefixed filenames
Fixes #6988
Fix: prefix each entry with './' so node-tar treats entries starting with '@' as explicit relative paths rather than archive-include directives.
This affects frameworks like Qwik that emit files named @qwik-city-not-found-paths.js, @qwik-city-plan.js, etc. into the edge functions output directory, causing builds to fail with:
ENOENT: no such file or directory, stat '/tmp/tmp-xxx/qwik-city-not-found-paths.js'
Update tarball.ts
🎉 Thanks for submitting a pull request! 🎉
Summary
Fixes #<replace_with_issue_number>
For us to review and ship your PR efficiently, please perform the following steps:
we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
something that`s on fire 🔥 (e.g. incident related), you can skip this step.
your code follows our style guide and passes our tests.
A picture of a cute animal (not mandatory, but encouraged)