Skip to content

Commit

Permalink
Update Smithy to 1.52.1 (#2881)
Browse files Browse the repository at this point in the history
* Update Smithy to 1.52.1

* Update protocol tests after Smithy 1.52.1 update

* Remove unused shapes when generating protocol tests
  • Loading branch information
Madrigal authored Nov 1, 2024
1 parent 33400b4 commit 253d7b1
Show file tree
Hide file tree
Showing 62 changed files with 4,927 additions and 118 deletions.
Binary file removed .DS_Store
Binary file not shown.
12 changes: 12 additions & 0 deletions .changelog/f2df419d89d44856b08d3e5afb013b83.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "f2df419d-89d4-4856-b08d-3e5afb013b83",
"type": "dependency",
"description": "Update Smithy to 1.52.1 and update tests",
"modules": [
"internal/protocoltest/awsrestjson",
"internal/protocoltest/jsonrpc",
"internal/protocoltest/jsonrpc10",
"internal/protocoltest/restxml",
"internal/protocoltest/smithyrpcv2cbor"
]
}
2 changes: 1 addition & 1 deletion SMITHY_GO_CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e6338ca9b5ee30c6317ea908173a369a9d3eb236
a4c9efcda6aa54c75d1a130d1320a2709eebf51d
2 changes: 1 addition & 1 deletion codegen/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
smithyVersion=1.50.0
smithyVersion=1.52.1
smithyGradleVersion=0.7.0
16 changes: 16 additions & 0 deletions codegen/protocol-test-codegen/smithy-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"args": {
"services": ["aws.protocoltests.ec2#AwsEc2"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
Expand All @@ -24,6 +26,8 @@
"args": {
"services": ["aws.protocoltests.json#JsonProtocol"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
Expand All @@ -40,6 +44,8 @@
"args": {
"services": ["aws.protocoltests.json10#JsonRpc10"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
Expand All @@ -56,6 +62,8 @@
"args": {
"services": ["aws.protocoltests.query#AwsQuery"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
Expand All @@ -72,6 +80,8 @@
"args": {
"services": ["aws.protocoltests.restjson#RestJson"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
Expand All @@ -88,6 +98,8 @@
"args": {
"services": ["aws.protocoltests.restxml#RestXml"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
Expand All @@ -104,6 +116,8 @@
"args": {
"services": ["aws.protocoltests.restxml.xmlns#RestXmlWithNamespace"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
Expand All @@ -120,6 +134,8 @@
"args": {
"services": ["smithy.protocoltests.rpcv2Cbor#RpcV2Protocol"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,6 @@ public static void generateHttpProtocolTests(GenerationContext context) {
.service(ShapeId.from("aws.protocoltests.json10#JsonRpc10"))
.operation(ShapeId.from("aws.protocoltests.json10#OperationWithNestedStructure"))
.addTestName("AwsJson10ClientPopulatesNestedDefaultValuesWhenMissing")
.build(),

// TODO these tests are currently failing due to tests not being updated, see #2825
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.restjson#RestJson"))
.operation(ShapeId.from("aws.protocoltests.restjson#NullAndEmptyHeadersClient"))
.addTestName("RestJsonNullAndEmptyHeaders")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.restxml#RestXml"))
.operation(ShapeId.from("aws.protocoltests.restxml#NullAndEmptyHeadersClient"))
.addTestName("NullAndEmptyHeaders")
.build()
));

Expand Down Expand Up @@ -227,6 +215,7 @@ public static void generateHttpProtocolTests(GenerationContext context) {
.addTestName("AwsJson10ClientPopulatesDefaultsValuesWhenMissingInResponse")
.addTestName("AwsJson10ClientIgnoresDefaultValuesIfMemberValuesArePresentInResponse")
.build(),
// We don't populate default values if none are sent by the server
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.json10#JsonRpc10"))
.operation(ShapeId.from("aws.protocoltests.json10#OperationWithNestedStructure"))
Expand All @@ -236,6 +225,11 @@ public static void generateHttpProtocolTests(GenerationContext context) {
.service(ShapeId.from("aws.protocoltests.json10#JsonRpc10"))
.operation(ShapeId.from("aws.protocoltests.json10#OperationWithRequiredMembers"))
.addTestName("AwsJson10ClientErrorCorrectsWhenServerFailsToSerializeRequiredValues")
.build(),
HttpProtocolUnitTestGenerator.SkipTest.builder()
.service(ShapeId.from("aws.protocoltests.json10#JsonRpc10"))
.operation(ShapeId.from("aws.protocoltests.json10#OperationWithRequiredMembersWithDefaults"))
.addTestName("AwsJson10ClientErrorCorrectsWithDefaultValuesWhenServerFailsToSerializeRequiredValues")
.build()
));

Expand Down

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

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

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

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

Loading

0 comments on commit 253d7b1

Please sign in to comment.