-
Notifications
You must be signed in to change notification settings - Fork 873
Generate CompleteMultipartUpload #4209
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
base: peterrsongg/petesong/phase-3-pr5-rebased-2/5
Are you sure you want to change the base?
Generate CompleteMultipartUpload #4209
Conversation
108e71e to
925e059
Compare
8302e87 to
749a49d
Compare
stack-info: PR: #4209, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/6
...Generated/Model/Internal/MarshallTransformations/CompleteMultipartUploadRequestMarshaller.cs
Outdated
Show resolved
Hide resolved
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
749a49d to
71cc1d8
Compare
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
stack-info: PR: #4209, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/6
| xmlWriter.WriteElementString("PartNumber", StringUtils.FromInt(publicRequestPartETagsValue.PartNumber.Value)); | ||
| xmlWriter.WriteEndElement(); | ||
| } | ||
| } |
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 know I'm being annoying, but after we're done generating S3 we should really fix the indentation in these classes...
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.
No worries, I'll backlog it for now as an LHF and open a separate PR to fix the spacing
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.
ended up just fixing it here:
|
|
||
| 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)) |
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.
Could use IsSet here now, right?
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.
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 |
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.
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.
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.
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.
49dfa8b to
5c80909
Compare
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
71cc1d8 to
255c1bf
Compare
Stacked PRs:
Description
Generates
CompleteMultipartUploadBefore in
s3.customizations.jsonwe were excludingMultipartUploadand 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 hasPartETagsas 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 toMultipartUploadare generated as well.Assembly Comparison Output (MpuObject size changed to a nulalble int) will call this out in changelog
Motivation and Context
Testing
DRY RUN: DRY_RUN-e581806f-264b-46d0-a331-1318e27c2273
Screenshots (if appropriate)
Types of changes
Checklist
License