-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating package zipping #4212
Updating package zipping #4212
Conversation
cd07c00
to
a80e6d8
Compare
95abb5a
to
fdbb36e
Compare
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.
lgtm, I like that you included a feature flag as a fail safe via the environment variable + included telemetry! Woild like to see more tests for macos as well
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.
LGTM! Left some nit comments :)
c78bee7
437d144
to
c78bee7
Compare
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.
Approving, but left some small comments.
Would also be good to add a note about this change to the release notes. |
The
DotNetZip
nuget package is deprecated and we need to remove support for it. On top of that, we've had agozip
utility that we build and maintain and that ships alongside Core Tools for the express reason of zipping packages that are mountable in Linux usingfuse-zip
, which is what is used in production.The goal here is to move the default zipping to use a new in-proc zip utility rather than maintaining the
gozip
build and deployment long term to make things simpler.The reason for
gozip
in the first place was that Linux executable file permissions were not being correctly applied when the zip file was created in Windows when usingSystem.IO.Compression.ZipArchive
. This is because of some uniqueness in the waygozip
creates these zips and the wayfuse-zip
mounts them:However, rather than pull in yet another external dependency, I decided to use
ZipArchive
, but modify the resulting stream when running on Windows to flip each file to be marked asCreatedByUnix
.I've also added a full test that, when running on CI, takes a zip created on Windows and mounts it on Linux using
fuse-zip
to ensure that it is runnable.As an escape-hatch, I'm leaving
gozip
as part of the build and using the setting ofFUNCTIONS_CORE_TOOLS_USE_GOZIP
the local environment will change the zipping mechanism back. I also added telemetry so we can see usage. Once we're confident, we can remove this entirely in a future release.