Loading
Add Uninstrumented GCS ObjectStore provider
Parent Issue: gitlab-org/quality/quality-engineering/team-tasks#4456
This MR adds a GCS objectstore client, in a similar shape to the previously implemented S3 provider.
- GCS Provider:
- Constructs a native
*storage.Clientand hands it to gocloud'sgcsblob.OpenBucketviaOptions.Client. - Self-registers via
init().
- Constructs a native
- Config:
- Adds a
JSON []bytesfield (service-account key) toGCSCredentials. - Adds
UniverseDomain - Extends
Endpointto cover GCS emulator/custom endpoints.
- Adds a
- Credentials:
- Use
WithAuthCredentialsJSON(ServiceAccount, ...), additional authentication methods can be added as needed.
- Use
- Testing:
- Adds an in-memory GCS server backed by
fsouza/fake-gcs-server
- Adds an in-memory GCS server backed by
Not included in this MR:
- Proto / environment config binding
gcsConfigFromProtostays as a stub). This will be added in follow up MRs to Fairway / Labkit.
Note:
- In some of the initial comments discussing AR's object storage requirements (AR is no longer a planned consumer of this package), they highlighted the need for reads to be through the JSON API. I myself don't understand the full differences between using the XML and JSON API; and have elected to set all reads to use the JSON API. (Based on AR's initial requirements and the fact that the SDK plans to make the JSON api the new default soon.)
- This is an easy decision to revert. We can also quickly add a config option to toggle between the two if needed.