Only fetch archive of subdirectories in workspaces
Created by: mrnugget
This does two things:
- When
workspaces
are used in the campaign spec, only an archive of the workspace (including all subdirectories and subworkspaces) is downloaded. That helps a lot with monorepos where it's unfeasible to download the whole repository. - When only the workspace is downloaded two files from the root of the repository are additionally downloaded, if they exist:
.gitignore
and.gitattributes
.
The code is by not polished yet, but it works, I added a lot of tests and hope to get a first round of reviews that I can then work off tomorrow.
What's missing:
-
I haven't tested the volume workspace mode manually yet -
I want to remove the duplication between unzip
and(wc *dockerBindWorkspaceCreator) copyToWorkspace
and already haveprepareCopyDestinationFile
-
Changelog entry -
Make fetchOnlyWorkspace
a flag that enables this feature -
Documentation in sourcegraph/sourcegraph
Big questions:
-
Do we want to make only-download-workspace-archive the default behaviour? -
Do we want to make download-additional-files the default behaviour?
Thank you for reviewing.
Yours truly,