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 MultipartUpload and injecting PartETags. 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 PartETags as a param. The issue with this approach is that if the service team updates MultipartUpload and adds member, the now generated S3 will miss this update. Instead, we take the correct approach which is to flatten MultipartUpload so that its members are added to the top-level shape. This way, any updates to MultipartUpload 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
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
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
@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
peterrsongg added a commit that referenced this pull request Dec 15, 2025
stack-info: PR: #4209, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/6
peterrsongg added a commit that referenced this pull request Dec 19, 2025
stack-info: PR: #4209, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/6
peterrsongg added a commit that referenced this pull request Dec 23, 2025
stack-info: PR: #4209, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/6
xmlWriter.WriteElementString("PartNumber", StringUtils.FromInt(publicRequestPartETagsValue.PartNumber.Value));
xmlWriter.WriteEndElement();
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I know I'm being annoying, but after we're done generating S3 we should really fix the indentation in these classes...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No worries, I'll backlog it for now as an LHF and open a separate PR to fix the spacing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ended up just fixing it here:

#4256


var stringWriter = new XMLEncodedStringWriter(System.Globalization.CultureInfo.InvariantCulture);
using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize }))
if (publicRequest.PartETags != null && (publicRequest.PartETags.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.

Could use IsSet here now, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup, rebased on dev and ran the generator so that this uses the IsSet methods.

/// <summary>
/// The container for the completed multipart upload details.
/// </summary>
public partial class CompletedMultipartUpload
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this class used? I don't see it referenced in the request or response... The request has its own private List<PartETag> _partETags field.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It actually isn't used anywhere at the moment, since the custom code had flattened this shape and moved it up to the response.

We could remove it altogether by including it in the excludeShapes array, but I left it in on purpose in the off chance that this shape is used in another operation later down the line. If another operation were to use this shape then the generator would fail at runtime.

@peterrsongg peterrsongg force-pushed the peterrsongg/petesong/phase-3-pr5-rebased-2/5 branch from 49dfa8b to 5c80909 Compare December 23, 2025 05:53
stack-info: PR: #4206, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/3
stack-info: PR: #4207, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/4
stack-info: PR: #4208, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/5
stack-info: PR: #4209, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/6
@peterrsongg peterrsongg force-pushed the peterrsongg/petesong/phase-3-pr5-rebased-2/6 branch from 71cc1d8 to 255c1bf Compare December 23, 2025 07:39
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