-
Notifications
You must be signed in to change notification settings - Fork 872
generate deletebucketmetricsconfiguration #4104
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: petesong/phase-3-pr-1-pt3
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR migrates the DeleteBucketMetricsConfiguration operation from custom handwritten code to generated code using the AWS SDK code generator. The operation is now included in the S3 allow-list for code generation.
- Adds generated marshaller/unmarshaller classes for DeleteBucketMetricsConfiguration
- Removes custom implementations in favor of generated code
- Configures property name mapping (Id -> MetricsId) in generator customizations
- Includes dev config file indicating a patch-level change
Reviewed Changes
Copilot reviewed 6 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteBucketMetricsConfigurationResponseUnmarshaller.cs | Adds generated response unmarshaller with error handling |
| sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteBucketMetricsConfigurationRequestMarshaller.cs | Adds generated request marshaller with validation and parameter mapping |
| sdk/src/Services/S3/Generated/Model/DeleteBucketMetricsConfigurationResponse.cs | Updates response class with generated documentation and imports |
| sdk/src/Services/S3/Generated/Model/DeleteBucketMetricsConfigurationRequest.cs | Adds fully generated request class with comprehensive documentation |
| sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteBucketMetricsConfigurationResponseUnmarshaller.cs | Removes custom unmarshaller implementation |
| sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteBucketMetricsConfigurationRequestMarshaller.cs | Removes custom marshaller implementation |
| sdk/src/Services/S3/Custom/Model/DeleteBucketMetricsConfigurationRequest.cs | Removes custom request class |
| generator/ServiceModels/s3/s3.customizations.json | Adds property name mapping configuration for MetricsId |
| generator/ServiceClientGeneratorLib/ServiceModel.cs | Enables generation by uncommenting operation in S3 allow-list |
| generator/.DevConfigs/b75d0287-d293-4a03-ad2f-1aa096a32665.json | Adds dev config for tracking this patch-level change |
| /// <summary> | ||
| /// Response Unmarshaller for DeleteBucketMetricsConfiguration operation | ||
| /// </summary> | ||
| public partial class DeleteBucketMetricsConfigurationResponseUnmarshaller : S3ReponseUnmarshaller |
Copilot
AI
Nov 6, 2025
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.
Corrected spelling of 'S3ReponseUnmarshaller' to 'S3ResponseUnmarshaller'.
| public partial class DeleteBucketMetricsConfigurationResponseUnmarshaller : S3ReponseUnmarshaller | |
| public partial class DeleteBucketMetricsConfigurationResponseUnmarshaller : S3ResponseUnmarshaller |
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 renaming to S3ReponseUnmarshaller a breaking change at this point? I had never noticed it had a typo...
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 a breaking change but it is in the internal namespace so we may choose to make it anyway.
...del/Internal/MarshallTransformations/DeleteBucketMetricsConfigurationResponseUnmarshaller.cs
Show resolved
Hide resolved
|
I'm pasting the results of the AI analysis done on the larger PR here The added validation isn't a breaking change because the request will fail and throw Now I have all the information needed to provide a comprehensive analysis. Let me compare the deleted custom files with the generated ones and examine all the marshaller changes: Task Completed Breaking Changes Analysis - S3 Custom to Generated MigrationAfter analyzing all deleted custom files, their generated replacements, and modified marshallers, I have identified the following breaking changes: BREAKING CHANGES IDENTIFIED:1. AbortMultipartUploadRequestMarshaller.cs - NEW VALIDATION ADDEDIssue: Added new required field validation that didn't exist before: if (string.IsNullOrEmpty(publicRequest.UploadId))
throw new AmazonS3Exception("Request object does not have required field UploadId set");Impact: Customer code that previously could make AbortMultipartUpload requests without UploadId set will now throw an exception. 2. CopyPartRequestMarshaller.cs - NEW VALIDATIONS ADDEDIssue: Added two new required field validations: if (publicRequest.PartNumber == null)
throw new AmazonS3Exception("Request object does not have required field PartNumber set");
if (string.IsNullOrEmpty(publicRequest.UploadId))
throw new AmazonS3Exception("Request object does not have required field UploadId set");Impact: Customer code that previously could make CopyPart requests without PartNumber or UploadId set will now throw exceptions. 3. ListPartsRequestMarshaller.cs - NEW VALIDATION ADDEDIssue: Added new required field validation: if (string.IsNullOrEmpty(publicRequest.UploadId))
throw new AmazonS3Exception("Request object does not have required field UploadId set");Impact: Customer code that previously could make ListParts requests without UploadId set will now throw an exception. NO BREAKING CHANGES FOUND IN:Model Files Migration (✅ SAFE)
Differences are non-breaking:
Marshaller Logic Preservation (✅ SAFE)
SUMMARY:
The breaking changes are all related to new validation logic being added to existing marshallers rather than logic being lost during migration. These validations enforce that required fields are set before making API calls, which technically makes the SDK more strict than before. |
.../Model/Internal/MarshallTransformations/DeleteBucketMetricsConfigurationRequestMarshaller.cs
Show resolved
Hide resolved
| /// <summary> | ||
| /// Response Unmarshaller for DeleteBucketMetricsConfiguration operation | ||
| /// </summary> | ||
| public partial class DeleteBucketMetricsConfigurationResponseUnmarshaller : S3ReponseUnmarshaller |
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 renaming to S3ReponseUnmarshaller a breaking change at this point? I had never noticed it had a typo...
Yeah... this has always bothered me, but technically it'd be a breaking change right b/c it's a public class and we're changing the name? I just left it as is |
| // Check to see if ExpectedBucketOwner property is set | ||
| internal bool IsSetExpectedBucketOwner() | ||
| { | ||
| return this._expectedBucketOwner != null; |
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.
Was return !String.IsNullOrEmpty(this.expectedBucketOwner); please check
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.
okay i had to merge the pt3 into this branch and force push but it should be updated now.
| // Check to see if MetricsId property is set | ||
| internal bool IsSetMetricsId() | ||
| { | ||
| return this._metricsId != null; |
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.
Was return !(string.IsNullOrEmpty(this.MetricsId)); please check
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.
okay i had to merge the pt3 into this branch and force push but it should be updated now.
.../Model/Internal/MarshallTransformations/DeleteBucketMetricsConfigurationRequestMarshaller.cs
Show resolved
Hide resolved
| /// <summary> | ||
| /// Response Unmarshaller for DeleteBucketMetricsConfiguration operation | ||
| /// </summary> | ||
| public partial class DeleteBucketMetricsConfigurationResponseUnmarshaller : S3ReponseUnmarshaller |
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 a breaking change but it is in the internal namespace so we may choose to make it anyway.
b0719c1 to
5ec3802
Compare
Description
This PR is a continuation of #4103
This PR generates DeleteBucketMetricsConfiguration
Motivation and Context
Testing
dry run passes
Screenshots (if appropriate)
Types of changes
Checklist
License