Skip to content

Conversation

@peterrsongg
Copy link
Contributor

@peterrsongg peterrsongg commented Dec 9, 2025

Stacked PRs:


Description

Generates CompleteMultipartUpload

Before in s3.customizations.json we were excluding "MultipartUploadand injectingPartETags. Since s3 was not generated, this change didn't really matter. This would only matter when we generate the simple methods for an operation from the s3.customizations.simpleforms.json but in this case there is no simple method that has PartETagsas a param. The issue with this approach is that if the service team updatesMultipartUploadand adds member, the now generated S3 will miss this update. Instead, we take the correct approach which is to flattenMultipartUploadso that its members are added to the top-level shape. This way, any updates toMultipartUpload` are generated as well.

Assembly Comparison Output (MpuObject size changed to a nulalble int) will call this out in changelog

AssemblyComparer AWSSDK.S3.New.dll: Error Amazon.S3.Model.CompleteMultipartUploadRequest/MethodRemoved: Missing method System.Int64 get_MpuObjectSize() in Amazon.S3.Model.CompleteMultipartUploadRequest
AssemblyComparer AWSSDK.S3.New.dll: Message Amazon.S3.Model.CompleteMultipartUploadRequest/MethodAdded: New method System.Nullable<System.Int64> get_MpuObjectSize() in Amazon.S3.Model.CompleteMultipartUploadRequest
AssemblyComparer AWSSDK.S3.New.dll: Error Amazon.S3.Model.CompleteMultipartUploadRequest/MethodRemoved: Missing method System.Void set_MpuObjectSize(System.Int64) in Amazon.S3.Model.CompleteMultipartUploadRequest
AssemblyComparer AWSSDK.S3.New.dll: Message Amazon.S3.Model.CompleteMultipartUploadRequest/MethodAdded: New method System.Void set_MpuObjectSize(System.Nullable<System.Int64>) in Amazon.S3.Model.CompleteMultipartUploadRequest
AssemblyComparer AWSSDK.S3.New.dll: Message Amazon.S3.Model.CompletedMultipartUpload/TypeAdded: New type Amazon.S3.Model.CompletedMultipartUpload

Motivation and Context

Testing

DRY RUN: DRY_RUN-e581806f-264b-46d0-a331-1318e27c2273

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@peterrsongg peterrsongg force-pushed the peterrsongg/petesong/phase-3-pr5-rebased-2/5 branch from 108e71e to 925e059 Compare December 9, 2025 01:47
@peterrsongg peterrsongg force-pushed the peterrsongg/petesong/phase-3-pr5-rebased-2/6 branch from 8302e87 to 749a49d Compare December 9, 2025 01:47
peterrsongg added a commit that referenced this pull request Dec 9, 2025
stack-info: PR: #4209, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/6
@peterrsongg peterrsongg marked this pull request as ready for review December 9, 2025 17:29
SortPartsList(publicRequest);
xmlWriter.WriteStartElement("CompleteMultipartUpload", "http://s3.amazonaws.com/doc/2006-03-01/");
var publicRequestPartETags = publicRequest.PartETags;
if (publicRequestPartETags != null && (publicRequestPartETags.Count > 0 || !AWSConfigs.InitializeCollections))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't looked at all changes yet, but I had a similar comment in another PR: Why not use the IsSet method that already has this logic?

Also, the indentation on this method is really odd (and much harder to read than the hand-written file).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a good question. For some reason the rest-xml payload marshalling logic doesn't use IsSet and does these if statements. This logic has existed before any of the S3 generation logic. I didn't want to change it because it is out of scop and will potentially affect all rest-xml services

]
},
"CompleteMultipartUploadRequest": {
"exclude": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the PR description explaining this? I don't follow why we were excluding something before but not it's in flattenShapes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added in the PR description

peterrsongg added a commit that referenced this pull request Dec 12, 2025
stack-info: PR: #4209, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/6
stack-info: PR: #4209, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/6
@peterrsongg peterrsongg changed the base branch from peterrsongg/petesong/phase-3-pr5-rebased-2/5 to petesong/phase-3-pr5-base December 12, 2025 18:16
@peterrsongg peterrsongg force-pushed the peterrsongg/petesong/phase-3-pr5-rebased-2/6 branch from 749a49d to 71cc1d8 Compare December 12, 2025 18:24
@peterrsongg peterrsongg changed the base branch from petesong/phase-3-pr5-base to peterrsongg/petesong/phase-3-pr5-rebased-2/5 December 12, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants