Replace unzip with bsdtar in the Batch Change Volume Workspace image#1020
Replace unzip with bsdtar in the Batch Change Volume Workspace image#1020lowjoel wants to merge 1 commit intosourcegraph:mainfrom
unzip with bsdtar in the Batch Change Volume Workspace image#1020Conversation
|
Hey and thanks for the fix! I'm trying to understand how this happens:
What exactly are you unzipping? The same zip file that Sourcegraph gave src-cli, or one from the code host? (Just want to make sure our zip endpoint is not flawed instead). |
The one Sourcegraph gave the CLI when trying to perform the batch change. That's the raw endpoint:
I have no idea what causes it. Maybe it's size? I observed it on a 5Gib zip archive, but I don't know what may cause such a problem to manifest. I couldn't find a common theme across the different repositories that failed in this manner when running the batch change preview. |
There are situations where a Zip archive from Sourcegraph causes the directory to be improperly recreated within the container. Using libarchive-tools fixes this.
0334ed9 to
ed8be10
Compare
|
Fixed tests. |
|
Hi @lowjoel sorry this PR seemed to have been missed. Given its age I am gonna close it out. If this is still an issue for you please re-open and I'll make sure we merge something reasonable in. |
There are situations where a Zip archive from Sourcegraph causes the directory to be improperly recreated within the container. Using libarchive-tools fixes this.
Example broken output:
I then docker-exec'ed into the container. Unzip was creating
.gitmodulesas a symlink with the file contents rather than a normal file. Both the Git repository and Sourcegraph show the file correctly:Unzipping this on my Mac host directly yields the correct directory. This means that the Zip file is fine, the unzip process is broken. Using bsdtar causes the directory to be correctly created.
Test plan
batch-change-volume-workspaceimage