Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

Base implementation with fetch/push functionality #6

Merged
merged 43 commits into from
Aug 11, 2020
Merged

Base implementation with fetch/push functionality #6

merged 43 commits into from
Aug 11, 2020

Conversation

Qinusty
Copy link
Owner

@Qinusty Qinusty commented Aug 11, 2020

Functionality:

  • Push service supporting blobs and directories with qualifiers
  • Fetch service supporting:
    • Pushed blobs/Directories with exact qualifier/uri matching
    • Fetching blobs from URIs via http (and pushing to a GRPC CAS)
      • Support for checksum.sri qualifier

Tested with buildstream (remote-asset) / bazel (3.3.1)

Related issues: #1, #2, #3

tomcoldrick-ct and others added 30 commits August 4, 2020 17:30
Takes the same version as from the remote-apis repository.
Just send back UNIMPLEMENTED errors at the moment.

Uses the CAS BlobAccessCreator for the storage. In future it might be
neat to implement a BlobAccessCreator proper, and add
CompletenessChecking and so on.
Takes the same version as from the remote-apis repository.
Allows easier use of the AssetReference in the servers.
Adds a thin wrapper around BlobAccess in order to allow direct usage of
the AssetReference. Makes the API nicer.
At the moment we only store the Digest of the asset, but in future we
may want to store the timestamp/qualifiers too.

Additionally renames ReferenceStore -> AssetStore to simplify naming
conventions.
This adds an implementation for downloading HTTP blobs and placing
them into the CAS.
This involves adding internal buffering of downloaded blobs inside of
DownloadBlob, this is not ideal but is required for hashing of response
body contents until a non consuming method is found.
This brings us in line with the spec.
Vital to allow us to use a custom proto in the blobaccess storage, and
also to avoid automatic checksumming with the CAS blob access
Prevents non allowed instances from fetching blobs and
pushing them to the CAS.
This fetcher validates the requests for FetchBlob
and FetchDirectory to ensure they meet common validity
criteria.
This fetcher is a blank fetcher which simply returns NotFound
to all requests, this can be wrapped by CachingFetcher to
configure an instance which does not perform any server side
fetching.
This adds some handling of timestamps to make sure that we obey the
expire_at and oldest_content_accepted parts of the spec.
@tomcoldrick-ct
Copy link
Collaborator

We should remove the branch CI at some point, but I think that can wait until this is merged.

Copy link
Collaborator

@tomcoldrick-ct tomcoldrick-ct left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit we might want to address is tidying up the go imports, I think the other bb-* repos split local imports into a separate block.

@Qinusty
Copy link
Owner Author

Qinusty commented Aug 11, 2020

We should remove the branch CI at some point, but I think that can wait until this is merged.

Agreed.

One nit we might want to address is tidying up the go imports, I think the other bb-* repos split local imports into a separate block.

Agreed. We can address this in a follow up PR.

@Qinusty Qinusty mentioned this pull request Aug 11, 2020
@Qinusty Qinusty merged commit e6258f0 into master Aug 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants