-
Notifications
You must be signed in to change notification settings - Fork 108
PBM-1588 Alicloud OSS Storage Implementation #1178
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: dev
Are you sure you want to change the base?
Conversation
623c987
to
cc6a851
Compare
hi @boris-ilijic @inelpandzic can you please help to review the change? TIA! |
Hey @imrenagi , thanks a lot for your PR and contribution. We'll review it at some point, but first, we need to discuss the feature within the team and prioritize the Jira ticket. From the high level, PR looks good, but again, we'll need to go into details about it later. I appreciate your patience! |
hi thanks for answer @boris-ilijic. Just want to understand the timeline, is there any plan on when this can be reviewed? Thanks! |
Hey again @imrenagi! The rough and unofficial plan is the following:
Again, this is still unofficial, and you'll be able to see more info within the ticket after we start to work on it. |
5ddddfe
to
9f4d890
Compare
Signed-off-by: Imre Nagi <[email protected]>
Signed-off-by: Imre Nagi <[email protected]>
Signed-off-by: Imre Nagi <[email protected]>
Signed-off-by: Imre Nagi <[email protected]>
…ment in Copy method
36e08f2
to
6acd6a3
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.
Pull Request Overview
This PR implements Alibaba Cloud Object Storage Service (OSS) support for the Percona Backup for MongoDB (PBM) project. The implementation follows the existing storage backend pattern and adds OSS as a new storage option alongside S3, GCS, Azure, and filesystem storage.
- Adds complete OSS storage backend implementation with multipart upload support
- Integrates OSS storage type into the storage factory and configuration system
- Includes comprehensive test coverage for the part size computation utility function
Reviewed Changes
Copilot reviewed 7 out of 114 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
pbm/util/storage.go | Adds OSS import and factory case for creating OSS storage instances |
pbm/storage/storage.go | Defines OSS storage type constant and parsing logic |
pbm/storage/oss/oss.go | Main OSS storage implementation with all required storage operations |
pbm/storage/oss/client.go | OSS client configuration and credential management |
pbm/config/config.go | Integrates OSS configuration into the main config structure |
pbm/storage/storage_test.go | Unit tests for the ComputePartSize utility function |
go.mod | Adds required Alibaba Cloud OSS SDK dependencies |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
partSize := storage.ComputePartSize( | ||
opts.Size, | ||
o.cfg.UploadPartSize, | ||
oss.MinPartSize, | ||
int64(o.cfg.MaxUploadParts), | ||
int64(o.cfg.UploadPartSize), | ||
) |
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.
The second and fifth parameters both pass 'o.cfg.UploadPartSize', but according to the ComputePartSize function signature, the second parameter should be 'defaultSize' and the fifth should be 'userSize'. This duplication appears incorrect.
Copilot uses AI. Check for mistakes.
if c.Storage.OSS != nil { | ||
if c.Storage.OSS.Credentials.AccessKeyID != "" { | ||
c.Storage.OSS.Credentials.AccessKeyID = "***" | ||
} | ||
if c.Storage.OSS.Credentials.AccessKeySecret != "" { | ||
c.Storage.OSS.Credentials.AccessKeySecret = "***" | ||
} | ||
if c.Storage.OSS.Credentials.SecurityToken != "" { | ||
c.Storage.OSS.Credentials.SecurityToken = "***" | ||
} | ||
} |
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.
The credential masking logic modifies the original config struct. This should create a copy of the config before masking credentials to avoid mutating the original data, similar to how other storage types handle this.
Copilot uses AI. Check for mistakes.
Hi @imrenagi, We'd like to proceed with your PR. Let's start with rebasing based on There were some breaking changes in
After you push your updates, we'll start with review and testing, and the plan is to have that in Thank you again with your contribution. |
hi @boris-ilijic . thanks. will try to update the PR today |
@boris-ilijic I have updated the MR with the changes from go.mod and the So the |
HI,
I'm submitting pull request to add implement the feature proposal discussed in PBM-1588.
I have tested this storage implementation with storage test utility available on the project. Additionally, Im currently testing this storage implement to perform restoration on mongodb (backup creation and list are working). Please let me know if there is early feedback to this PR. It would be very appreciated.
Thanks!