-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
importinto: check access of cloud storage uri #47206
Conversation
Hi @D3Hunter. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/label ok-to-test |
Hi @D3Hunter. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
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.
maybe do a manually test as well
AccessBuckets: checkS3Bucket, | ||
ListObjects: listObjects, | ||
GetObject: getObject, | ||
PutAndDeleteObject: PutAndDeleteObjectCheck, |
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.
naming style is slightly different 🤔 and seems no need to be public
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.
seems no need to be public
the test is in a package named as storage_test
br/pkg/storage/s3.go
Outdated
@@ -486,25 +520,30 @@ func (rs *S3Storage) IsObjectLockEnabled() bool { | |||
return false | |||
} | |||
|
|||
// WriteFile writes data to a file to storage. | |||
func (rs *S3Storage) WriteFile(ctx context.Context, file string, data []byte) error { | |||
func getPutObjectInput(options *backuppb.S3, file string, data []byte) *s3.PutObjectInput { |
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.
getXXX makes me think it's a read action. Maybe buildPutObjectInput
rest lgtm |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #47206 +/- ##
================================================
- Coverage 72.9807% 72.6740% -0.3067%
================================================
Files 1340 1361 +21
Lines 400018 406368 +6350
================================================
+ Hits 291936 295324 +3388
- Misses 89176 92276 +3100
+ Partials 18906 18768 -138
Flags with carried forward coverage won't be shown. Click here to find out more.
|
already done |
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.
LGTM
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Benjamin2037, lance6716, tangenta, zanmato1984 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: ref #46704
Problem Summary:
What is changed and how it works?
add check of put&delete to
br/storage
check permission of cloud_storage_uri for importinto
Check List
Tests
create a bucket on cloud without any permission, do precheck with that bucket, return access denied
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.