fix S3 response xml root tag names #8037
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So following #8021, #7983 and #7545, I've investigated and made a list of all S3 operations with a different root node name than the specs. Basically, 41 of 44 operations returning an XML body do not follow the specs. Here's the list:
❌: wrong name, 🟠: fixed by patches, ✅: right from the specs
Note: I've removed
GetBucketLocation
as it's a special case with no root node wrapper, andSelectObjectContent
as it's a streaming response.This PR implements a fix by directly renaming the root node while still taking advantages of the specs. Previously, modifying the specs would also have effects on the parser where, for example, the shape would already exists (see
GetBucketTagging
andGetObjectTagging
, both returns a root node withTagging
name but the shape is different). Now we can still differentiate for each operations.Now, the issue is systematic testing of those operations. I'm confident the new root node names are the right ones, but it would be nice to have replicable tests against AWS. We already have a test in place (
tests.integration.s3.test_s3.TestS3.test_response_structure
) testing some operations (and we can see that removing the patches didn't make the test fail as the new serializer part is now taking care of it).However, as 41 of 44 operations needs to be tested for their XML response, this makes it a bit difficult as you would need to setup the resources to be able to query them afterwards (ex.
GetBucketCorsConfiguration
would need a configuration to be able to be queried).would fix #8030