-
Notifications
You must be signed in to change notification settings - Fork 8
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 GCS and S3 using GO Cloud Dev #70
Conversation
khrm
commented
Oct 7, 2024
•
edited
Loading
edited
- This removes the need to maintain the configuration for individual cloud providers.
- Refactor OCI code to remove redundant replace.
- Added Unit Test for Upload and Fetch for cloud provider.
@khrm sorry, needs a rebase 🤦🏼 |
578177a
to
451bd58
Compare
a6d453f
to
f8c149c
Compare
@vdemeester Updated this. |
After the call we decided to merge this. |
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.
/assign @PuneetPunamiya
internal/provider/blob/blob.go
Outdated
if err != nil { | ||
return err | ||
} | ||
defer clean() //nolint:errcheck |
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.
you don't have to ignore that error if you want to
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.
OK. So I am just logging if some error happens.
return err | ||
} | ||
|
||
if err := tar.Untar(ctx, file, folder); err != nil { |
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.
i wonder if we can optimize the reading of the object and unar it to the same step without having to go by a temporary file locally.... this would greatly optimize it with a large cache, wdyt ?
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.
We are compressing it, not only taring it. That function name should be changed. Maybe we can do it in a follow up PR
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.
sounds good, can you create an issue for tracking?
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.
BTW, I change from io.Readall to io.copy. Won't Readall
give OOM?
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.
Created an issue to track this.
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.
yeah io.Copy stream instead of reading everything at once in memory like ReadAll but that's beside the point that we can stream directly to gzip/upload to bucket.