-
Notifications
You must be signed in to change notification settings - Fork 874
generate PutBucketIntelligentTieringConfiguration #4145
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
generate PutBucketIntelligentTieringConfiguration #4145
Conversation
stack-info: PR: #4145, branch: peterrsongg/petesong/phase-3-pr-3/1
adf364e to
17ee8cf
Compare
|
AI Prompt: COMPREHENSIVE BREAKING CHANGES ANALYSIS REPORTTOTAL FILES ANALYZED: 14 of 14 files (Complete)Files in Scope:
BREAKING CHANGE #1: IsSet Method Logic Changed for String Properties (REQUEST OBJECT)Severity: CRITICAL
Old (Custom - IntelligentTieringConfiguration):internal bool IsSetIntelligentTieringId()
{
return !(string.IsNullOrEmpty(this.intelligentTieringId));
}New (Generated - IntelligentTieringConfiguration):internal bool IsSetIntelligentTieringId()
{
return this._intelligentTieringId != null;
}Old (Custom - PutBucketIntelligentTieringConfigurationRequest):// Check to see if BucketName property is set
internal bool IsSetBucketName()
{
return this.bucketName != null;
}
// Check to see if ExpectedBucketOwner property is set
internal bool IsSetExpectedBucketOwner()
{
return this.expectedBucketOwner != null;
}
// Check to see if IntelligentTieringId property is set
internal bool IsSetIntelligentTieringId()
{
return this.intelligentTieringId != null;
}New (Generated - PutBucketIntelligentTieringConfigurationRequest):// Check to see if BucketName property is set
internal bool IsSetBucketName()
{
return this._bucketName != null;
}
// Check to see if ExpectedBucketOwner property is set
internal bool IsSetExpectedBucketOwner()
{
return this._expectedBucketOwner != null;
}
// Check to see if IntelligentTieringId property is set
internal bool IsSetIntelligentTieringId()
{
return this._intelligentTieringId != null;
}Impact:
BREAKING CHANGE #2: Internal Method Name ChangedSeverity: MEDIUM Old (Custom):// Check if the tieringList property is set
internal bool IsSetTieringList()
{
return this.tierings != null && (this.tierings.Count > 0 || !AWSConfigs.InitializeCollections);
}New (Generated):// Check to see if Tierings property is set
internal bool IsSetTierings()
{
return this._tierings != null && (this._tierings.Count > 0 || !AWSConfigs.InitializeCollections);
}Impact: Method name changed from BREAKING CHANGE #3: Internal Method Name ChangedSeverity: MEDIUM Old (Custom):// Check to see if IntelligentTieringConfiguration property is set
internal bool IsIntelligentTieringConfiguration()
{
return this.intelligentTieringConfiguration != null;
}New (Generated):// Check to see if IntelligentTieringConfiguration property is set
internal bool IsSetIntelligentTieringConfiguration()
{
return this._intelligentTieringConfiguration != null;
}Impact: Method name changed from BREAKING CHANGE #4: Property Access Pattern Inconsistency (Potential Issue)Severity: LOW Old (Custom):private int? days;
private IntelligentTieringAccessTier accessTier;
public int? Days
{
get { return this.days; }
set { this.days = value; }
}
public IntelligentTieringAccessTier AccessTier
{
get { return this.accessTier; }
set { this.accessTier = value; }
}New (Generated):private IntelligentTieringAccessTier _accessTier;
private int? _days;
public IntelligentTieringAccessTier AccessTier
{
get { return this._accessTier; }
set { this._accessTier = value; }
}
public int? Days
{
get { return this._days; }
set { this._days = value; }
}Impact: Private field naming changed from NON-BREAKING CHANGES VERIFIED:✅ Response Classes
✅ Marshaller Logic Preserved
✅ Response Unmarshaller
✅ Generator Files
SUMMARY:Total Breaking Changes Found: 4Critical Issues (Must Fix):
Medium Issues (Review Required):
Low Issues (Monitor):
Files Analyzed: 14 of 14 (100% Complete)RECOMMENDATION:The most critical issue is Breaking Change #1. The |
| // Check to see if IntelligentTieringConfiguration property is set | ||
| internal bool IsIntelligentTieringConfiguration() | ||
| // Check to see if IntelligentTieringId property is set | ||
| internal bool IsSetIntelligentTieringId() |
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'm keeping the ISSet to !=null because we check !string.IsNullOrEmpty in the request marshaller
...nternal/MarshallTransformations/PutBucketIntelligentTieringConfigurationRequestMarshaller.cs
Show resolved
Hide resolved
...nternal/MarshallTransformations/PutBucketIntelligentTieringConfigurationRequestMarshaller.cs
Show resolved
Hide resolved
| if (publicRequestIntelligentTieringConfigurationTieringsValue != null) | ||
| { | ||
| xmlWriter.WriteStartElement("Tiering"); | ||
| if(publicRequestIntelligentTieringConfigurationTieringsValue.IsSetAccessTier()) |
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.
Days used to come before AccessTier. It shouldn't matter in this case but calling it out.
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, doesn't matter in this case since it is a normal xml element. And there are tests here that test this code path:
| public class IntelligentTieringTests : TestBase<AmazonS3Client> |
| xmlWriter.WriteStartElement("Tiering"); | ||
| if(publicRequestIntelligentTieringConfigurationTieringsValue.IsSetAccessTier()) | ||
| xmlWriter.WriteElementString("AccessTier", StringUtils.FromString(publicRequestIntelligentTieringConfigurationTieringsValue.AccessTier)); | ||
| if(publicRequestIntelligentTieringConfigurationTieringsValue.IsSetDays()) |
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 used to write these element strings if they were set or not. Now they will be skipped if not set. Is this correct?
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.
ooh nice catch... I just tested though and the behavior is the same.
Something like this (I've tried with no days, no access-tier and no both members)
var putBucketTieringRequest = new PutBucketIntelligentTieringConfigurationRequest
{
BucketName = bucketName,
IntelligentTieringId = "test-tiering-id-2",
IntelligentTieringConfiguration = new IntelligentTieringConfiguration
{
IntelligentTieringId = "test-tiering-id",
Status = IntelligentTieringStatus.Enabled,
Tierings = new List<Tiering>
{
new Tiering
{
}
}
}
};
throws => AmazonS3Exception "xml provided was invalid or not well formed"
and the behavior now is the same: AmazonS3Exception "xml provided was invalid or not well formed"
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.
xml provided was invalid or not well formed as a user I would really hate this exception, it doesn't give any direction to what went wrong, and it is very confusing since users don't provide xml.
But fixing exceptions isn't part of the PR anyway, so I will approve it, though I won't complain if you fixed it :D
* generate PutBucketIntelligentTieringConfiguration stack-info: PR: #4145, branch: peterrsongg/petesong/phase-3-pr-3/1 * Generate GetBucketIntelligentTieringConfiguration stack-info: PR: #4146, branch: peterrsongg/petesong/phase-3-pr-3/2 * Generate ListBucketIntelligentTieringConfiguration stack-info: PR: #4147, branch: peterrsongg/petesong/phase-3-pr-3/3
* generate PutBucketIntelligentTieringConfiguration stack-info: PR: #4145, branch: peterrsongg/petesong/phase-3-pr-3/1 * Generate GetBucketIntelligentTieringConfiguration stack-info: PR: #4146, branch: peterrsongg/petesong/phase-3-pr-3/2 * Generate ListBucketIntelligentTieringConfiguration stack-info: PR: #4147, branch: peterrsongg/petesong/phase-3-pr-3/3 * Generate DeleteBucketIntelligentTiering stack-info: PR: #4148, branch: peterrsongg/petesong/phase-3-pr-3/4
* generate PutBucketIntelligentTieringConfiguration stack-info: PR: #4145, branch: peterrsongg/petesong/phase-3-pr-3/1 * Generate GetBucketIntelligentTieringConfiguration stack-info: PR: #4146, branch: peterrsongg/petesong/phase-3-pr-3/2 * Generate ListBucketIntelligentTieringConfiguration stack-info: PR: #4147, branch: peterrsongg/petesong/phase-3-pr-3/3 * Generate DeleteBucketIntelligentTiering stack-info: PR: #4148, branch: peterrsongg/petesong/phase-3-pr-3/4 * add shapes to S3NeedsCustomUpdate and add devconfig stack-info: PR: #4149, branch: peterrsongg/petesong/phase-3-pr-3/5
Description
Generate PutBucketIntelligentTieringConfiguration
Motivation and Context
Testing
Dry run for base branch passed
Fuzz testing passed.
AI Prompt run
Manual testing with null
IntelligentTieringIdyielded same exception before and after change.Screenshots (if appropriate)
Types of changes
Checklist
License