[BuildStream] CAS server resource names & instance names



At the moment in CASCache.py (client side), we're making resource names starting with the text 'blobs':

        resource_name = '/'.join(['blobs', digest.hash, str(digest.size_bytes)])

Which would give us names like

'blobs/0defa...435/32'

our CASServer (used by the remote artifact cache) handles these fine. However, the spec says:

// For downloading blobs, the client must use the
// [Read method][google.bytestream.ByteStream.Read] of the ByteStream API, with
// a `resource_name` of `"{instance_name}/blobs/{hash}/{size}"`, where
// `instance_name` is the instance name (see above), and `hash` and `size` are
// the [Digest][build.bazel.remote.execution.v2.Digest] of the blob.

So, with the default instance_name of a blank string, we should have a leading slash on the resource name. If we add this in the client, the server will reject it at the moment. It's a similar situation for writing blobs.

It looks like the CAS server in BuildGrid already handles both cases. Is there anything important I'm missing here, or can I go ahead and correct the resource names in BuildStream?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]