-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: Support GCS remotecache #5910
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
f12e456
to
43c49fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
Thank you @crazy-max for reviewing the PR! |
@crazy-max Do you think this is the best way to simulate a gcs server? https://github.com/fsouza/fake-gcs-server |
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
@crazy-max ![]() ![]() |
@crazy-max |
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
Updated the README and tried to fix linting issues |
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
Ran |
@crazy-max Can I please get a review on this again when possible? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the changes I have multiple concerns:
Binary size before: 61 MB
Binary size after: 65.4 MB
We are currently being very intentional about keeping the binary size of our application lean, and this change increases it from ~61MB to ~65MB.
The additional size primarily comes from introducing a large set of dependencies that are only used for this single backend, and I'm not comfortable with the tradeoff at this time. Maintaining a small binary is important to us for distribution.
Looking at the changes it seems to be very similar to the s3
cache backend. I would prefer if we could make gcs and s3 interoperable. Looking at #3749, it seems possible.
A couple of additional questions before we can consider moving forward:
- Would you be open to maintaining this backend long-term? Since it's adding a new surface area to the project, we'd want to make sure there's someone committed to keeping it working as GCS APIs evolve.
- Could you share a bit more about your use case and the context in which you're using GCS? That will help us better understand how generalizable this backend is and whether it makes sense as part of the core project. Atm it doesn't seem there is any user asking for this backend specifically.
- Also, what's your level of experience with GCS and the Go SDK? Just trying to get a sense of how deeply you've worked with this ecosystem, especially if issues or edge cases come up later.
Depending on the answers, we might consider alternatives like making this backend optional via build tags or external integration.
Yes we were initially using HMAC AK and SK for GCS buckets (as mentioned in #3749) and going through the S3 flow but that wasnt enough for us. Most of our users are not comfortable using AK and SK due to security concerns and hence we had to add support for the gcs sdk which would allow inheriting auth from the env and support for OIDC. Answers to your questions
|
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
Signed-off-by: Anurag Madnawat <anurag.madnawat@harness.io>
In this PR I am adding support to use gcs as a remote cache. You can authenticate with your gcs bucket using a base64 encoded value of your gcp json key or using OIDC
We have been using this in Harness CI since a few months.
Here is an execution with base64 encoded gcp json key
Here is an execution using OIDC auth