Retire Source Cache, use a Remote Asset API based Asset Cache instead
Instead of a dedicated SourceService, we can leverage the Remote Asset API FetchService and PushService. We will retain the Source message proto to describe an source asset. However, we will associate it remotely via PushService.PushBlob:
- PushBlobRequest.uris is SOURCE_URI_TEMPLATE.format(cache_key)
- PushBlobRequest.blob_digest is the digest of the Source message. The Source message will need to be stored in CAS separately.
- PushBlobRequest.references_directories is Source.files.
Similarly, we will retrieve Sources using FetchService.FetchBlob:
- FetchBlobRequest.uris is SOURCE_URI_TEMPLATE.format(cache_key). The Source can be retrieved from CAS at FetchBlobResponse.blob_digest.
SOURCE_URI_TEMPLATE could be defined as "urn:fdc:buildstream.build:20200223:source:{}" (see https://tools.ietf.org/html/rfc4198).
See also: https://mail.gnome.org/archives/buildstream-list/2020-February/msg00000.html