Conversation BlobService::GetBlob


Stages:

Issues:

Blocked On:

Feature Flags:

  • git_blob_load_all_data
  • gitaly_git_blob_raw
  • workhorse_raw_show

RPC Endpoints:

  • BlobService::GetBlob

Known Client Routes:

  • Known client endpoints

Feature flag for Gitlab::Git::Blob.raw: gitaly_git_blob_raw

https://gitlab.com/gitlab-org/gitlab-ce/blob/40cd50829944db38fac07014e5fa00eafa3d1bc7/lib/gitlab/git/blob.rb#L44-53

This can be implemented using the TreeEntry RPC we already have. See Gitlab::Git::Blob.find_by_gitaly for how to handle binary detection.

We need a new RPC that can get blobs by OID.

service BlobService {
  // Use a stream to return a chunked arbitrarily large binary response
  rpc GetBlob(GetBlobRequest) returns (stream GetBlobResonse) {}
}

message GetBlobRequest {
  Repository repository = 1;
  string oid = 2;
}

message GetBlobResponse {
  int64 size = 1; // Blob size; present only in first response message
  bytes data = 2; // Chunk of blob data
}
Edited by Andrew Newdigate