Skip to content

Conversation

@peterrsongg
Copy link
Contributor

@peterrsongg peterrsongg commented Jan 5, 2026

Description

Generates GetBucketLogging S3 operation.

Motivation and Context

Testing

Assembly Comparison Empty
Fuzz Testing results: no backwards incompatible changes

DRY_RUN-188651c8-e6b9-458c-8ecd-1b776b22f9cd

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
Copy link
Contributor Author

peterrsongg commented Jan 5, 2026

READ THIS

The 1 breaking change it is flagging is incorrect. Those methods are still there in that class, they are just in the custom class and not the generated one

BREAKING CHANGES FOUND

1. S3BucketLoggingConfig.cs - Missing Public Methods (CRITICAL)

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

Issue: The generated S3BucketLoggingConfig class is missing three public convenience methods that existed in the custom version:

Missing Methods:

  1. public void AddGrant(S3Grantee grantee, S3Permission permission) - Creates and adds a grant to the Grants list
  2. public void RemoveGrant(S3Grantee grantee, S3Permission permission) - Removes a specific permission for the given grantee
  3. public void RemoveGrant(S3Grantee grantee) - Removes all permissions for the given grantee

Custom Implementation (REMOVED):

public void AddGrant(S3Grantee grantee, S3Permission permission)
{
    if (Grants == null)
    {
        Grants = new List<S3Grant>();
    }
    S3Grant grant = new S3Grant{ Grantee = grantee, Permission = permission };
    Grants.Add(grant);
}

public void RemoveGrant(S3Grantee grantee, S3Permission permission)
{
    if (Grants != null)
    {
        foreach (S3Grant grant in Grants)
        {
            if (grant.Grantee.Equals(grantee) && grant.Permission == permission)
            {
                Grants.Remove(grant);
                break;
            }
        }
    }
}

public void RemoveGrant(S3Grantee grantee)
{
    if (this.Grants != null)
    {
        List<S3Grant> removeList = new List<S3Grant>();
        foreach (S3Grant grant in Grants)
        {
            if (grant.Grantee.Equals(grantee))
            {
                removeList.Add(grant);
            }
        }
        foreach (S3Grant grant in removeList)
        {
            this.Grants.Remove(grant);
        }
    }
}

Generated Implementation: These methods are completely missing from the generated file.

Impact: Customers who are using these public convenience methods to manage grants in S3BucketLoggingConfig will experience compilation errors when upgrading. These are helper methods that provide a cleaner API for managing grants.

Recommendation: Add these three public methods to the Custom partial class sdk/src/Services/S3/Custom/Model/S3BucketLoggingConfig.cs to maintain backward compatibility.


Files Analyzed: 19/19

Files with NO Breaking Changes:

  1. ✓ ServiceClientGeneratorLib/ServiceModel.cs - Configuration change only
  2. ✓ s3.customizations.json - Configuration change only
  3. ✓ GetBucketLoggingResponse.cs (Custom) - Preserved custom getter method
  4. ✓ GetBucketLoggingResponse.cs (Generated) - Correctly calls custom getter
  5. ✓ GetBucketLoggingRequest.cs (Generated) - IsSet methods use !String.IsNullOrEmpty (correct for requests)
  6. ✓ GetBucketLoggingRequestMarshaller.cs (Custom) - PreMarshallCustomization preserved
  7. ✓ GetBucketLoggingRequestMarshaller.cs (Generated) - Correctly calls PreMarshallCustomization
  8. ✓ GetBucketLoggingResponseUnmarshaller.cs (Generated) - Unmarshalling logic preserved
  9. ✓ S3BucketLoggingConfigUnmarshaller.cs (Generated) - Correct unmarshalling paths
  10. ✓ PutBucketLoggingRequestMarshaller.cs (Custom) - Unchanged
  11. ✓ PartitionedPrefix.cs (Generated) - New generated model
  12. ✓ PartitionedPrefixUnmarshaller.cs (Generated) - Moved to generated
  13. ✓ SimplePrefix.cs (Generated) - New generated model
  14. ✓ SimplePrefixUnmarshaller.cs (Generated) - Moved to generated
  15. ✓ TargetObjectKeyFormat.cs (Generated) - Moved to generated
  16. ✓ TargetObjectKeyFormatUnmarshaller.cs (Generated) - Moved to generated

Files with Breaking Changes:

  1. S3BucketLoggingConfig.cs - Missing AddGrant and RemoveGrant methods (CRITICAL)

* Generate PutBucketLogging

* remove unused custom file
@peterrsongg peterrsongg merged commit 7dc6871 into petesong/phase-3-final-prs-base Jan 6, 2026
1 check passed
@peterrsongg peterrsongg deleted the petesong/generate-get-bucket-logging branch January 6, 2026 20:35
@peterrsongg peterrsongg mentioned this pull request Jan 6, 2026
10 tasks
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.

3 participants