Skip to content

Fix duplicate blobs not working by only processing unique hashes

Rohit Kothur requested to merge rkothur/allow-duplicate-bulk-read into master

Description

Handle batch read requests with duplicate blobs by stripping out duplicate hashes from the request. A given blob is only returned once in the response, even it if is present multiple times in the request.

As a side effect, this breaks the implementation detail of blobs being returned in the same order that they were requested (which is not a feature of the REAPI). I've updated several tests to account for this.

Changes proposed in this merge request:

  • Remove duplicates from the batch read request
  • Add tests
  • Update old tests to not rely on order of blobs returned from BatchReadBlobs.

Validation

A test was added to verify the behavior. More details for manually testing with BuildStream can be found in the related issue in buildbox-casd: BuildGrid/buildbox/buildbox-casd#41 (closed)

This merge request, when merged, will address issue/bug:

#230 (closed)

Edited by Rohit Kothur

Merge request reports