Use correct git-lfs download or upload operation names
Summary
When making an /api/v4/internal/lfs_authenticate
request, ensure we send the correct operation (download
or upload
is supported). Currently we map download
-> git-upload-pack
and upload
-> git-receive-pack
which causes performance issues with cloning a repo that has LFS objects, from a Geo secondary.
History
In v9.3.0
of gitlab-shell, we mapped git-lfs' download
and upload
operations to git-upload-pack
and git-receive-pack
respectively when we verify access via a /api/v4/internal/allowed
API call but correctly passed in the original git-lfs operation (download
or upload
) when calling /api/v4/internal/lfs_authenticate
.
In gitlab-shell
versions since v9.3.0
most of the Ruby code has been replace with golang with a 1:1 replacement except that when we call /api/v4/internal/lfs_authenticate
now we don't pass in the git-lfs operation (download
or upload
) but instead the 'mapped' operation.
- Issue: gitlab#37371 (closed)
GitLab MR: gitlab!20893 (closed)