Skip to content
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

compiler break: change LaunchTemplateConfiguration.SetDefaultVersion from bool to *bool #2838

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changelog/139b04a8d6124cb29dfb9e66f9f70386.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "139b04a8-d612-4cb2-9dfb-9e66f9f70386",
"type": "bugfix",
"description": "**BREAKING CHANGE**: The type of LaunchTemplateConfiguration.SetDefaultVersion has been changed from `bool` to `*bool`. Before this change, the field was incorrectly marked as having a default value of false by the service, which made it functionally impossible for users to express the full range of values for the field (true, false, and unset/nil), each of which have distinctly different behaviors.",
"modules": [
"service/imagebuilder"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ private static Map.Entry<ShapeId, Set<ShapeId>> serviceToShapeIds(String service
ShapeId.from(serviceId),
Arrays.stream(shapeIds).map(ShapeId::from).collect(toSet()));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ public class RemoveDefaults implements GoIntegration {
serviceToShapeIds("com.amazonaws.paymentcryptographydata#PaymentCryptographyDataPlane",
"com.amazonaws.paymentcryptographydata#IntegerRangeBetween4And12"),
serviceToShapeIds("com.amazonaws.emrserverless#AwsToledoWebService",
"com.amazonaws.emrserverless#WorkerCounts"));
"com.amazonaws.emrserverless#WorkerCounts"),
serviceToShapeIds("com.amazonaws.imagebuilder#imagebuilder",
// https://github.com/aws/aws-sdk-go-v2/issues/2734
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for actually putting the issue and ticket here, otherwise we'd be like

"why do we need this customization?"
"🤷"

Curious as to what happens when/if it gets fixed by the service. What happens with this customization?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing, it's a no-op for ShapeBuilder.removeTrait:

    public B removeTrait(ShapeId traitId) {
        if (this.traits.hasValue()) {
            ((Map)this.traits.get()).remove(traitId);
        }

        return this;
    }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"why do we need this customization?"

Currently asking myself this for every single other thing on this list, in fact!

// V1479153907
"com.amazonaws.imagebuilder#LaunchTemplateConfiguration$setDefaultVersion"));

private boolean mustPreprocess(ShapeId service) {
return toRemove.containsKey(service);
Expand Down Expand Up @@ -95,4 +99,4 @@ private static Map.Entry<ShapeId, Set<ShapeId>> serviceToShapeIds(String service
ShapeId.from(serviceId),
Arrays.stream(shapeIds).map(ShapeId::from).collect(Collectors.toSet()));
}
}
}
2 changes: 1 addition & 1 deletion service/imagebuilder/deserializers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions service/imagebuilder/serializers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion service/imagebuilder/types/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading