Skip to content

Conversation

@peterrsongg
Copy link
Contributor

@peterrsongg peterrsongg commented Dec 9, 2025

Description

Generates RestoreObject

Assembly Comparison Output (new properties and types added, which isn't a breaking change)

AssemblyComparer AWSSDK.S3.New.dll: Message Amazon.S3.Model.RestoreRequest/TypeAdded: New type Amazon.S3.Model.RestoreRequest
AssemblyComparer AWSSDK.S3.New.dll: Message Amazon.S3.Model.GlacierJobParameters/TypeAdded: New type Amazon.S3.Model.GlacierJobParameters
AssemblyComparer AWSSDK.S3.New.dll: Message Amazon.S3.Model.ObjectAlreadyInActiveTierErrorException/TypeAdded: New type Amazon.S3.Model.ObjectAlreadyInActiveTierErrorException

The fuzz test caught one issue where I made a mistake in the TierCustomMarshall, but that has been fixed.

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

stack-info: PR: #4208, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/5
@peterrsongg peterrsongg force-pushed the peterrsongg/petesong/phase-3-pr5-rebased-2/4 branch from a1013dd to ec4fd4a Compare December 9, 2025 01:47
@peterrsongg peterrsongg force-pushed the peterrsongg/petesong/phase-3-pr5-rebased-2/5 branch from 108e71e to 925e059 Compare December 9, 2025 01:47
{ "IntelligentTieringAndOperator", 2}
{ "IntelligentTieringAndOperator", 2},
//TODO: Add runbook entry as to why this excluded and how to do a customization for this.
{ "GlacierJobParameters", 1 }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

GlacierParameters is a structure with only 1 member Tier. In our custom implementation we just moved the Tier member up two levels to the RestoreObjectRequest and also changed the type to be an enum. This means that if something is ever added to GlacierParameters we will miss it. This ensures that if any member is added to GlacierParameters we don't miss it and do the manual work necessary.

}
}

private IList<Member> _requestPayloadFlattenMembers;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this wasn't being used so i just removed it.

@peterrsongg
Copy link
Contributor Author

peterrsongg commented Dec 9, 2025

READ THIS

The 1st breaking change it is flagging isn't true. I added that customization to preserve existing behavior.
The second one regarding spacing, isn't a breaking change but i fixed it.

Based on my comprehensive analysis of commit 925e05971c90ad5f557959453fb022273063e204 that migrates RestoreObject from custom to generated code, I have identified the following breaking changes:

BREAKING CHANGES FOUND:

1. CRITICAL: InputSerialization.cs - Default Value Addition

File: sdk/src/Services/S3/Generated/Model/InputSerialization.cs

Issue: The generated version introduces a default value that didn't exist in the custom version:

  • Custom version: private CompressionType _compressionType; (no default value)
  • Generated version: private CompressionType _compressionType = CompressionType.None; (defaults to None)

Evidence: This change is confirmed in generator/ServiceModels/s3/s3.customizations.json:

"CompressionType":{"injectXmlPrivateMemberAssignment" :["private CompressionType _compressionType = CompressionType.None;"]}

Impact: This is a breaking change because:

  • Previously, when CompressionType was not explicitly set, it would be null/unset
  • Now it defaults to CompressionType.None, which could change the behavior of existing code that relied on the property being unset
  • This affects the IsSetCompressionType() method behavior and XML serialization output

2. MINOR: S3Location.cs - Spacing Issue in IsSet Method

File: sdk/src/Services/S3/Generated/Model/S3Location.cs

Issue: Line 200 has a spacing issue in the IsSet method:

return this._userMetadata!= null;  // Missing space before !=

Impact: While this should still compile and function correctly, it's a code quality issue that could indicate other potential problems.

NON-BREAKING CHANGES VERIFIED:

  1. Marshall Method Removal: All model classes (CSVInput, CSVOutput, InputSerialization, JSONInput, JSONOutput, OutputSerialization, S3Encryption, S3Location, SelectParameters) had their internal Marshall methods removed, but the logic was preserved in the generated marshaller - NOT BREAKING

  2. Validation Logic: Custom validation logic from S3Location, S3Encryption, and SelectParameters was properly preserved in RestoreObjectRequestMarshaller.PreMarshallCustomization() - NOT BREAKING

  3. IsSet Methods: All string property IsSet methods use consistent != null patterns - NOT BREAKING

  4. Public Properties: All public properties maintain backward compatibility - NOT BREAKING

  5. API Methods: All RestoreObject method signatures in IAmazonS3.cs and AmazonS3Client.cs remain unchanged - NOT BREAKING

  6. Request Flattening: RestoreObjectRequest was properly flattened from RestoreRequest as intended - NOT BREAKING

  7. Custom Logic Preservation: All custom marshalling logic for UserMetadata, Tier, and AccessControlList was preserved through custom partial methods - NOT BREAKING

SUMMARY:

Files Analyzed: 34 out of 46 files changed in the commit
Breaking Changes Found: 1 critical, 1 minor
Files with Issues: 2

  • sdk/src/Services/S3/Generated/Model/InputSerialization.cs (CRITICAL - default value change)
  • sdk/src/Services/S3/Generated/Model/S3Location.cs (minor spacing issue)

Critical Recommendation: The CompressionType default value introduction in InputSerialization.cs is a definitive breaking change that needs to be addressed before release, as it could cause different runtime behavior for existing customer code that relies on the property being unset when not explicitly specified.

Remaining Files: The remaining 12 files (generator-related files, service enumeration changes, integration tests) are primarily infrastructure/tooling changes and do not introduce customer-facing breaking changes to the S3 API.

peterrsongg added a commit that referenced this pull request Dec 9, 2025
peterrsongg added a commit that referenced this pull request Dec 9, 2025
stack-info: PR: #4208, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/5
peterrsongg added a commit that referenced this pull request Dec 9, 2025
stack-info: PR: #4208, branch: peterrsongg/petesong/phase-3-pr5-rebased-2/5
}

[TestMethod]
public void TestRestoreObjectWithTier()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to add more tests, specifically around OutputLocation and the ACL's but those fields are only valid for SELECT operations on restores. I couldn't run them locally but i verified that the xml we send is the same as the CLI for complex s3 select restores.

@peterrsongg peterrsongg marked this pull request as ready for review December 9, 2025 17:29
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.

1 participant