-
Notifications
You must be signed in to change notification settings - Fork 31
Clean up config.go
to align with changes in PR 65
#66
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
Clean up config.go
to align with changes in PR 65
#66
Conversation
- Separate structures for different DB backup methods (AWS, GCP, Generic S3) - Rename references to the DigitalOcean Spaces backup method to S3, indicating compatibility with any S3-compatible storage - Update `README.md` and `.env.example` to reflect code changes
config.go
to align with changes in https://github.com/bitvora/haven/pull/65config.go
to align with changes in PR 65
Thanks for this! Do you know if MinIO working for AWS and GCP? In theory AWS SDK should work for both GCP - https://cloud.google.com/storage/docs/samples/storage-s3-sdk-list-object and DO spaces (https://docs.digitalocean.com/products/spaces/how-to/use-aws-sdks/). To me it feels like we should consolidate on either AWS SDK or MinIO (whatever is more compatible) and remove the two other libraries at some point. No reason not to to merge this one right now on my side. @barrydeen, ok to merge on your side? (I want to release Haven 1.0.5 today if possible :D) |
Just looking at the code it looks good but it could potentially break older implementations, @aaccioly if you test it and nothing breaks feel free to merge it |
Will do. Need to setup AWS and GCP |
Looking at the // New - instantiate minio client with options
func New(endpoint string, opts *Options) (*Client, error) {
if opts == nil {
return nil, errors.New("no options provided")
}
clnt, err := privateNew(endpoint, opts)
if err != nil {
return nil, err
}
if s3utils.IsAmazonEndpoint(*clnt.endpointURL) {
// If Amazon S3 set to signature v4.
clnt.overrideSignerType = credentials.SignatureV4
// Amazon S3 endpoints are resolved into dual-stack endpoints by default
// for backwards compatibility.
clnt.s3DualstackEnabled = true
}
return clnt, nil
} It does consider the |
@aaccioly @barrydeen I can adjust this PR to consider the fact that someone has already configured their relay to use Digital Ocean Spaces specific environment variables. So this would mean supporting both the |
Highly doubt anyone implemented digital ocean in the past few days since it was merged, I think we can just yolo merge it |
@charlieroth, I second Barry on this, everything before we cut a new release to me is basically considered unstable. As long as AWS and GCP are working and the users won't be surprised by configuration changes I'm happy with it. |
After testing it is confirmed that the `minio-go` package can be used for both Generic S3 Bucket and AWS S3 Bucket uploads. This commit unifies the logic in a `s3UploadShared` function which is called in the separated `S3Upload` and `AwsUpload` functions.
AWS and Generic S3 backups through MinIO are in order. I made some additional changes in 88b1d6d to unify the shared logic for the upload AWSGeneric |
GCP Through Min.io also working:
However, Min.io authentication to GCP is limited to HMAC Key / Secrets, so I feel more comfortable marking the old GCP method as deprecated for now and advising users to create HMAC Key / Secrets, but keep the old API around for now. I'll adjust the readme accordingly soon and then I'll merge it. Many thanks for everything @charlieroth. |
Hi @charlieroth , can you please give me access to edit this PR? https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork |
Invite sent |
Done with everything but README. No more AWS SDK. GCP backup is working with both the deprecated gcp option as well as s3. @charlieroth, do you mind testing one last time with both |
Yes on it |
Works great! 🚀 Digital Ocean SpacesAWS |
Consolidate S3-compatible storage options and deprecate old AWS and GCP providers.
…anup Use Min.io for AWS S3 Deprecate old aws and gcp providers Clean up `config.go` to align with changes in PR 65
This PR creates separate structures for different DB backup methods (AWS, GCP, Generic S3), renames references to DigitalOcean Spaces backup method to S3 (indicating compatibility with any S3-compatible storage) and updates
README.md
,.env.example
to reflect code changes