-
Notifications
You must be signed in to change notification settings - Fork 867
Generate 8 more S3 Operations #3895
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: development
Are you sure you want to change the base?
Conversation
generator/ServiceClientGeneratorLib/Generators/Marshallers/RestXmlRequestMarshaller.tt
Outdated
Show resolved
Hide resolved
generator/.DevConfigs/c881e931-b1ff-45ff-9521-9653e179466e.json
Outdated
Show resolved
Hide resolved
@@ -1,97 +0,0 @@ | |||
/* |
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.
Is this removal intentional? It's in the generated folder...
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.
This is only used in GetBucketWebsite
so I'm not sure how it got here...
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 doesn't even exist here..
https://github.com/aws/aws-sdk-net/tree/main/sdk/src/Services/S3/Generated/Model
maybe a github UI thing? not sure how that happened
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's gone from the last diff, so maybe? But yeah need to make sure we don't remove generated code moving forward.
…PutObjectLockConfiguration, PutObjectRetention, PutObjectTagging, and PutPublicAccessBlock. Update s3 exception tt files
f765e2a
to
a25b031
Compare
/// Date and time at which the part was uploaded. | ||
/// </para> | ||
/// </summary> | ||
public DateTime? LastModified |
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.
Looks like LastModified
to isn't using nullable DateTime in v4, probably we missed it.
Changing it now is a breaking change, are we okay with that?
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, in my previous PRs Norm said as long as we call it out in the DevConfig it is fine, but just for these nullable type changes. So I included it in the dev config
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 is not great to make these breaking changes but we are still early in V4 adoption and these fields missed so far are likely not the common fields used. I would prefer to take the hit of taking on the minor breaking change in this early part of V4 then add more complexity in our generator to support some fields not being nullable.
@peterrsongg If you find a property that looks like it would be frequent property being accessed like a bucket name then we should discuss.
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.
Gotcha, if i feel like the property is very commonly used I will bring it up for discussion
@@ -729,6 +730,8 @@ WriteXmlAttributeString(level + 1, member, variableName, isPayload: true, operat | |||
{ | |||
#> | |||
<#=new string(' ', level * 4)#>request.Content = Encoding.UTF8.GetBytes(<#=this.Operation.RequestPayloadMember.PrimitiveMarshaller#>(publicRequest.<#=this.Operation.RequestPayloadMember.PropertyName#>)); | |||
<#+ |
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.
These lines (733 and 734) can be removed too now, right?
@@ -1,97 +0,0 @@ | |||
/* |
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's gone from the last diff, so maybe? But yeah need to make sure we don't remove generated code moving forward.
Need to validate a potential regression in another API that was auto-generated
Description
Generates 9 more operations to conclude phase 1. I had to add a customization to exclude members from property generation but not from the marshallers because of
PartDetail
which inherits fromPartETag
.PartETag
contains the excluded members.I also updated the
RestXmlExceptionUnmarshaller.tt
file to get theId2
andCfId
which is unique to S3, as well as update the exception shapes themselves to add the constructor which takes these values in its constructor.One change from this is that
PutBucketPolicy
's payload is set torequest.Content
instead ofrequest.ContentStream
. I've done a sanity check to make sure it still works. Per the model since the payload is a string, there is no need to wrap it in a memory stream. Also the payload member doesn't target the streaming trait so there is no need to stream it either.One other minor change is that
Tagging
inPutBucketTagging
was automatically initialized if it was null. This was a one-off customization we had that I intentionally left out to remove another customization hook. If we feel we want this added back, we can do that, but I will call this out as a breaking change.Motivation and Context
Testing
DRY_RUN-2df7b27d-b938-44c2-aa9d-64c1ce797bf7
executed successfully with flipping request.ContentStream to request.Content
Screenshots (if appropriate)
Types of changes
Checklist
License