Generate PutBucketLogging - #4250
Conversation
stack-info: PR: #4250, branch: peterrsongg/petesong/phase-3-pr7-2/2
19820f0 to
fec8357
Compare
46b4848 to
838b1b6
Compare
READ THISChange 1 was intentional, I'll comment why on the PR Breaking Changes Analysis for Commit 16a3578SummaryAnalyzed the PutBucketLogging migration from custom to generated code. Found 1 CRITICAL BREAKING CHANGE. BREAKING CHANGES1. PutBucketLoggingRequest.cs - IsSetLoggingConfig() Method Logic ChangedFile: Issue: The IsSetLoggingConfig() method has different logic between custom and generated versions. Old Custom Logic (deleted file): internal bool IsSetLoggingConfig()
{
return this.LoggingConfig != null;
}New Generated Logic: internal bool IsSetLoggingConfig()
{
return this._loggingConfig != null && this._loggingConfig.IsSetTargetBucketName();
}Breaking Impact:
NON-BREAKING CHANGES1. PutBucketLoggingRequest.cs - New ContentMD5 Property Added
2. PutBucketLoggingRequestMarshaller.cs - Logic Preserved via Custom Partial
3. PutBucketLoggingResponseUnmarshaller.cs - Moved to Generated
4. PutBucketLoggingResponse.cs - Moved to Generated
5. BucketLoggingStatus.cs - New File
6. String Property IsSet Methods - No Changes
Files Analyzed: 26 out of 26
Total Breaking Changes Found: 1 Fuzz Test Output Fuzz tests successfull |
| // Check to see if LoggingConfig property is set | ||
| internal bool IsSetLoggingConfig() | ||
| { | ||
| return this._loggingConfig != null && this._loggingConfig.IsSetTargetBucketName(); |
There was a problem hiding this comment.
This is customized to preserve this old logic here:
https://github.com/aws/aws-sdk-net/pull/4250/changes#diff-439b99ee512304f85c6927769974e9b8dbb35f61b12cfc6398afe402ef895a4fL70
| var marshallName = member.Shape.IsList ? member.Shape.ListMarshallName ?? "member" : member.MarshallName; | ||
| if(member.Shape.IsFlattened || member.IsFlattened) | ||
| marshallName = member.LocationName ?? member.ModeledName; | ||
| if (member.Shape.IsList) |
There was a problem hiding this comment.
I had to add this so that I can just customize the IsSet method to control marshalling logic. But also, it's the rightr thing to do. It's also related to:
#4247
There was a problem hiding this comment.
Was there a hand-written version of BucketLoggingStatus before? I don't see one in this PR or in https://github.com/aws/aws-sdk-net/tree/main/sdk/src/Services/S3/Custom/Model
There was a problem hiding this comment.
Nope, because this shape was flattened so there was never a handwritten version. I'll see if i can remove it.
|
lots of newly generated s3 operations are making the diff hard to review. closing and will re-open a PR that is easier to review. |
Stacked PRs:
Description
Generate GetBucketLogging
Motivation and Context
Testing
Assembly Comparison output (non breaking)
Fuzz Testing run: No backwards incompatibilities
DRY_RUN passed 7b1db732-7d93-4e80-ba86-5301f393e2ae
Screenshots (if appropriate)
Types of changes
Checklist
License