-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: s3 200 errors handling #2968
fix: s3 200 errors handling #2968
Conversation
b91a09c
to
7cc95b1
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.
Looking good so far
b44f432
to
9b1e18c
Compare
- This change includes the following: -- Refactor the s3 200 response error handling logic so it can be opened for all s3 operations. -- Migrate some S3 parsers to a result mutator implementation so the code can be a bit cleaner.
9b1e18c
to
f921b56
Compare
Resolve merge conflicts found in S3ClientTest.php
GetObject operation has a streaming member which will be ignored and hence not treated as a 200 s3 error.
Make sure that operations where any of its member has an eventstream or streaming trait are ignored.
acd2b1d
to
80a195c
Compare
* @param $checksumPriority | ||
* @param ResponseInterface $response | ||
*/ | ||
public function chooseChecksumHeaderToValidate( |
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 think we should make this private, as well as the one above it, so long as they aren't called directly anywhere else in our source code. We should be able to indirectly test selection/validation via the result returned when invoking this class. These are helper methods which shouldn't have been made public in the original implementation
e91c098
to
bf7ae12
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.
Mostly coding style (line length) and formatting requests. My comment from the previous round regarding method visibility on the checksum mutator class
* @param $checksumPriority | ||
* @param ResponseInterface $response | ||
*/ | ||
public function chooseChecksumHeaderToValidate( |
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.
This hasn't been addressed
11ebd63
to
954c9d1
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.
LGTM minus one line length comment (on a method signature) that wasn't addressed. I would just check this one more time and see if any look to be over 80 and adjust accordingly (wrap, etc.)
954c9d1
to
41bbed7
Compare
- Split statements into multiple lines to improve readability. - Make pattern variable for finding the Error element name to be static. - Add a test in the GetBucketLocationResultMutatorTest to make sure the mutator just applies to GetBucketLocation. - Move some values into static variables in the GetBucketLocationMutator implementation. - Change the visibility of some methods in the ValidateResponseCheckResultMutator from public to private. - Refactor the tests on ValidateResponseCheckResultMutatorTest to make them be executed from the mutator invokation instead of testing those methods independently.
41bbed7
to
bb1c0d4
Compare
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.