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
Implement Alibaba Cloud OSS gateway support #5103
Conversation
4961a7f
to
0398226
Compare
0398226
to
181002a
Compare
Codecov Report
@@ Coverage Diff @@
## master #5103 +/- ##
==========================================
- Coverage 62.1% 61.26% -0.84%
==========================================
Files 197 199 +2
Lines 28329 28900 +571
==========================================
+ Hits 17593 17705 +112
- Misses 9407 9863 +456
- Partials 1329 1332 +3
Continue to review full report at Codecov.
|
0df199c
to
bc6c3a4
Compare
bc6c3a4
to
2ce9e88
Compare
cmd/gateway-oss.go
Outdated
return ossBackend | ||
} | ||
|
||
func (g *OSSGateway) NewGatewayLayer() (GatewayLayer, error) { |
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.
exported method OSSGateway.NewGatewayLayer should have comment or be unexported
cmd/gateway-oss.go
Outdated
host string | ||
} | ||
|
||
func (g *OSSGateway) Name() string { |
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.
exported method OSSGateway.Name should have comment or be unexported
cmd/gateway-oss.go
Outdated
startGateway(ctx, &OSSGateway{host}) | ||
} | ||
|
||
type OSSGateway struct { |
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.
exported type OSSGateway should have comment or be unexported
2ce9e88
to
1a3468d
Compare
cmd/gateway-oss.go
Outdated
host string | ||
} | ||
|
||
// OSSGateway implements Gateway interface. |
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.
comment on exported method OSSGateway.Name should be of the form "Name ..."
1a3468d
to
6d05cdc
Compare
5674a21
to
73be360
Compare
@timonwong i have rebased upon your work timonwong#1 to point to latest master, made relevant changes. Please merge the PR, we can then plan on merging this PR. |
e5f3661
to
19f2885
Compare
@harshavardhana Thanks :) And besides, I just did a rebase due to CI failure after merging... |
@@ -0,0 +1,177 @@ | |||
package oss |
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.
can you add license header here @timonwong ? just like other gateways?
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.
@harshavardhana Fixed
@@ -0,0 +1,847 @@ | |||
package oss |
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.
license header.
d9c2f5c
to
302db0d
Compare
After running sed: It throws tons of "Couldn't connect to server" error messages in error.json, may be I'm running out of file descriptors (yeah I'm using macOS...)?
|
@timonwong you can run only specific tests by |
it is okay that these fail and we can catch up in perhaps future versions, just wanted to see how ready is this support . If things are failing perhaps you can write down which all tests fail we can review and deal with this in case by case basis. |
Current condition:
All other tests passes.
|
For md5 you can simply add -1 at the end here . We do that with all gateways which do not support direct md5sum. |
e2565a9
to
99932bd
Compare
Actually OSS did have MD5 Etag, but it's upper-cased. So I should just use |
99932bd
to
29086b3
Compare
Yes @timonwong just use that .it should be fine |
Ok, so now s3cmd passes :) |
29086b3
to
e150b2a
Compare
So other than aws-sdk-php all tests pass?? @timonwong |
@harshavardhana And minio-dotnet failed due to tons of "Couldn't connect to server" errors. |
That is nice to know @timonwong LGTM we can take this change in. |
Please just wait for a moment, I need to investigate some weird behavior in CompleteMultipartUpload |
e150b2a
to
8611d3b
Compare
Mint tests verified:
|
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.
Did not test it as I don't have alibaba account details. I had reviewed the code which looks good. If the mint is passing then it should be good to go.
Motivation and Context
Implement Alibaba Cloud (Aliyun) OSS gateway support.
API Documentation (very similar to AWS S3): https://www.alibabacloud.com/help/doc-detail/31947.htm
How Has This Been Tested?
Manually & Mint
Notes about failed mint tests:
"_"
) in custom metadata headers, soaws-sdk-php
will fail. (Workaround bysed -i 's/Param_1/Param-1/' /mint/run/core/aws-sdk-php/quick-tests.php
)Besides, in order to get mint tests pass, there is a check in
CompleteMultipartUpload()
which iterate uploaded parts, and error out if uploadedParts except last part sizing < 5MiB.Types of changes
Checklist: