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
Madrigal authored Nov 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 33400b4 commit 253d7b1
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
@@ -8,6 +8,8 @@
"args": {
"services": ["aws.protocoltests.ec2#AwsEc2"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
@@ -24,6 +26,8 @@
"args": {
"services": ["aws.protocoltests.json#JsonProtocol"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
@@ -40,6 +44,8 @@
"args": {
"services": ["aws.protocoltests.json10#JsonRpc10"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
@@ -56,6 +62,8 @@
"args": {
"services": ["aws.protocoltests.query#AwsQuery"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
@@ -72,6 +80,8 @@
"args": {
"services": ["aws.protocoltests.restjson#RestJson"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
@@ -88,6 +98,8 @@
"args": {
"services": ["aws.protocoltests.restxml#RestXml"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
@@ -104,6 +116,8 @@
"args": {
"services": ["aws.protocoltests.restxml.xmlns#RestXmlWithNamespace"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
@@ -120,6 +134,8 @@
"args": {
"services": ["smithy.protocoltests.rpcv2Cbor#RpcV2Protocol"]
}
},{
"name": "removeUnusedShapes"
}
],
"plugins": {
Original file line number Diff line number Diff line change
@@ -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()
));

@@ -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"))
@@ -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()
));

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.

142 changes: 142 additions & 0 deletions internal/protocoltest/awsrestjson/api_op_ResponseCodeHttpFallback.go
146 changes: 146 additions & 0 deletions internal/protocoltest/awsrestjson/api_op_ResponseCodeRequired.go
4 changes: 4 additions & 0 deletions internal/protocoltest/awsrestjson/api_op_SparseJsonLists.go
16 changes: 16 additions & 0 deletions internal/protocoltest/awsrestjson/api_op_SparseJsonLists_test.go
149 changes: 149 additions & 0 deletions internal/protocoltest/awsrestjson/api_op_TestPostNoInputNoPayload.go
150 changes: 150 additions & 0 deletions internal/protocoltest/awsrestjson/api_op_TestPostNoPayload.go
129 changes: 129 additions & 0 deletions internal/protocoltest/awsrestjson/api_op_TestPostNoPayload_test.go
559 changes: 543 additions & 16 deletions internal/protocoltest/awsrestjson/deserializers.go

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions internal/protocoltest/awsrestjson/generated.json
Original file line number Diff line number Diff line change
@@ -94,6 +94,7 @@
"api_op_MalformedContentTypeWithGenericString.go",
"api_op_MalformedContentTypeWithPayload.go",
"api_op_MalformedContentTypeWithoutBody.go",
"api_op_MalformedContentTypeWithoutBodyEmptyInput.go",
"api_op_MalformedDouble.go",
"api_op_MalformedFloat.go",
"api_op_MalformedInteger.go",
@@ -147,6 +148,10 @@
"api_op_QueryPrecedence_test.go",
"api_op_RecursiveShapes.go",
"api_op_RecursiveShapes_test.go",
"api_op_ResponseCodeHttpFallback.go",
"api_op_ResponseCodeHttpFallback_test.go",
"api_op_ResponseCodeRequired.go",
"api_op_ResponseCodeRequired_test.go",
"api_op_SimpleScalarProperties.go",
"api_op_SimpleScalarProperties_test.go",
"api_op_SparseJsonLists.go",
@@ -161,14 +166,18 @@
"api_op_StreamingTraits_test.go",
"api_op_TestBodyStructure.go",
"api_op_TestBodyStructure_test.go",
"api_op_TestNoInputNoPayload.go",
"api_op_TestNoInputNoPayload_test.go",
"api_op_TestNoPayload.go",
"api_op_TestNoPayload_test.go",
"api_op_TestGetNoInputNoPayload.go",
"api_op_TestGetNoInputNoPayload_test.go",
"api_op_TestGetNoPayload.go",
"api_op_TestGetNoPayload_test.go",
"api_op_TestPayloadBlob.go",
"api_op_TestPayloadBlob_test.go",
"api_op_TestPayloadStructure.go",
"api_op_TestPayloadStructure_test.go",
"api_op_TestPostNoInputNoPayload.go",
"api_op_TestPostNoInputNoPayload_test.go",
"api_op_TestPostNoPayload.go",
"api_op_TestPostNoPayload_test.go",
"api_op_TimestampFormatHeaders.go",
"api_op_TimestampFormatHeaders_test.go",
"api_op_UnitInputAndOutput.go",
352 changes: 341 additions & 11 deletions internal/protocoltest/awsrestjson/serializers.go

Large diffs are not rendered by default.

144 changes: 132 additions & 12 deletions internal/protocoltest/awsrestjson/snapshot_test.go
169 changes: 169 additions & 0 deletions internal/protocoltest/jsonrpc/api_op_JsonIntEnums.go
255 changes: 255 additions & 0 deletions internal/protocoltest/jsonrpc/api_op_JsonIntEnums_test.go
313 changes: 313 additions & 0 deletions internal/protocoltest/jsonrpc/deserializers.go
2 changes: 2 additions & 0 deletions internal/protocoltest/jsonrpc/generated.json
Original file line number Diff line number Diff line change
@@ -26,6 +26,8 @@
"api_op_HostWithPathOperation_test.go",
"api_op_JsonEnums.go",
"api_op_JsonEnums_test.go",
"api_op_JsonIntEnums.go",
"api_op_JsonIntEnums_test.go",
"api_op_JsonUnions.go",
"api_op_JsonUnions_test.go",
"api_op_KitchenSinkOperation.go",
137 changes: 137 additions & 0 deletions internal/protocoltest/jsonrpc/serializers.go
24 changes: 24 additions & 0 deletions internal/protocoltest/jsonrpc/snapshot_test.go
9 changes: 9 additions & 0 deletions internal/protocoltest/jsonrpc/types/enums.go
Loading

0 comments on commit 253d7b1

Please sign in to comment.