Retire Artifact Cache, use a Remote Asset API based Asset Cache instead
Instead of a dedicated ArtifactService, we can leverage the Remote Asset API FetchService and PushService. We will retain the Artifact message proto to describe an artifact. However, we will associate it remotely via PushService.PushBlob:
- PushBlobRequest.uris is [ARTIFACT_URI_TEMPLATE.format(Artifact.strong_key), ARTIFACT_URI_TEMPLATE.format(Artifact.weak_key)]
- PushBlobRequest.blob_digest is the digest of the Artifact message. The Artifact message will need to be stored in CAS separately.
- PushBlobRequest.references_directories is [Artifact.files, Artifact.logs.digest, Artifact.buildtree, Artifact.sources] depending on lifetime requirements.
Similarly, we will retrieve Artifacts using FetchService.FetchBlob:
- FetchBlobRequest.uris is ARTIFACT_URI_TEMPLATE.format(cache_key). The Artifact can be retrieved from CAS at FetchBlobResponse.blob_digest.
ARTIFACT_URI_TEMPLATE could be defined as "urn:fdc:buildstream.build:20200223:artifact:{}" (see https://tools.ietf.org/html/rfc4198).
See also: https://mail.gnome.org/archives/buildstream-list/2020-February/msg00000.html
Edited by Sander Striker