Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Google Cloud Storage Backend #61

Closed
kakkoyun opened this issue Oct 5, 2019 · 6 comments · Fixed by #73
Closed

Add Google Cloud Storage Backend #61

kakkoyun opened this issue Oct 5, 2019 · 6 comments · Fixed by #73
Assignees
Labels
good first issue Good for newcomers hacktoberfest storage-backend New storage backends v1.1.0 Issues for v1.1.0 release

Comments

@kakkoyun
Copy link
Contributor

kakkoyun commented Oct 5, 2019

Create a new backend implementation to support GCP Object storage

@a-hilaly
Copy link
Contributor

a-hilaly commented Oct 6, 2019

Hello, can work on this one ?

@kakkoyun
Copy link
Contributor Author

kakkoyun commented Oct 7, 2019

Hello @a-hilaly, of course, go ahead! You can bother me if you need anything. I'd be happy to review your work.

We already have interfaces and conventions in place to add a new back-end. You can have a look at https://github.com/meltwater/drone-cache/blob/master/cache/backend/s3.go to kickstart things.

@a-hilaly
Copy link
Contributor

a-hilaly commented Oct 7, 2019

Nice 👍 ! Thanks for the tip @kakkoyun i'm going to open a PR soon

@spier
Copy link
Contributor

spier commented Oct 8, 2019

I am doing some documentation cleanup, so adding this link here.

This issue is about integrating with https://cloud.google.com/storage/

@a-hilaly
Copy link
Contributor

@kakkoyun while implementing this backend, i realised that Cloud Storage Go client need a context.Context for read/write operations. aws-go-sdk has also methods that uses context like PutObjectWithContext.

I had toughs about changing the Backend interface to allow context propagation with something like:

type Backend interface {
	Get(context.Context, string) (io.ReadCloser, error)
	Put(context.Context, string, io.ReadSeeker) error
}

Anyways this will certainly force changes all over the backends/plugin/main and need to be discussed/implemented in a separate PR.

I'm still not sure if context cancellation can be useful at this stage, but i think it can be a great feature, especially when dealing with huge objects.

@kakkoyun
Copy link
Contributor Author

@a-hilaly That's a good idea. I'm also a fan of contexts nowadays. After we merge a couple of backend implementations, we can change the interface and refactor, accordingly if this emerges as a pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest storage-backend New storage backends v1.1.0 Issues for v1.1.0 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants