Use Workhorse SendArchive when serving a Go module that has no exclusions
Summary
The Go proxy MVC implemented in !27746 (merged) builds archives directly because the Go proxy protocol has requirements that cannot be satisfied with Workhorse:SendArchive
. Specifically, subdirectories containing go.mod
must be excluded. git archive
(thus Gitaly:RepositoryService.GetArchive
thus Workhorse:SendArchive
) does not support exclusions, so archives must be constructed via another method.
However, if a Go module does not have any such exclusions, Workhorse:SendArchive
can and should be used.
This relates to #218083
Improvements
In the majority of cases, Go proxy archive generation would be handled via an existing mechanism, Workhorse:SendArchive
. This would improve the performance characteristics of the Go proxy and is a step towards removing the feature flag.
Risks
This will require minor changes to send_git_archive
.
Involved components
-
[Rails] Gitlab::Workhorse#send_git_archive
needs support for specifying the archive entry prefix.