Skip to content

Commit

Permalink
Upgrade Smithy to 1.45 (#3470)
Browse files Browse the repository at this point in the history
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
  • Loading branch information
jdisanti authored Mar 8, 2024
1 parent 1a26cf5 commit a413b9b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 74 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ message = "Added support for SSO bearer token authentication. The aws-sdk-codeca
references = ["aws-sdk-rust#703", "smithy-rs#3453"]
meta = { "breaking" = false, "bug" = false, "tada" = true }
author = "jdisanti"

[[smithy-rs]]
message = "Upgrade Smithy to 1.45."
references = ["smithy-rs#3470"]
meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "all" }
authors = ["jdisanti"]
31 changes: 0 additions & 31 deletions codegen-client-test/model/rest-xml-extras.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ service RestXmlExtras {
StringHeader,
CreateFoo,
RequiredMember,
// TODO(https://github.com/smithy-lang/smithy-rs/issues/3315)
ZeroAndFalseQueryParams,
]
}

Expand Down Expand Up @@ -256,32 +254,3 @@ structure RequiredMemberInputOutput {
@required
requiredString: String
}

@httpRequestTests([
{
id: "RestXmlZeroAndFalseQueryParamsAreSerialized"
protocol: restXml
code: 200
method: "GET"
uri: "/ZeroAndFalseQueryParams"
body: ""
queryParams: [
"Zero=0",
"False=false"
]
params: {
zeroValue: 0
falseValue: false
}
}
])
@http(uri: "/ZeroAndFalseQueryParams", method: "GET")
operation ZeroAndFalseQueryParams {
input := {
@httpQuery("Zero")
zeroValue: Integer

@httpQuery("False")
falseValue: Boolean
}
}
44 changes: 6 additions & 38 deletions codegen-core/common-test-models/rest-json-extras.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use smithy.test#httpRequestTests
use smithy.test#httpResponseTests
use smithy.framework#ValidationException

// TODO(https://github.com/smithy-lang/smithy/pull/2132): Remove this test once it's fixed in Smithy
// TODO(https://github.com/smithy-lang/smithy/pull/2167): Remove this test once it's fixed in Smithy
apply AllQueryStringTypes @httpRequestTests([
{
id: "RestJsonZeroAndFalseQueryValuesFixed"
Expand All @@ -25,8 +25,8 @@ apply AllQueryStringTypes @httpRequestTests([
queryInteger: 0
queryBoolean: false
queryParamsMapOfStringList: {
queryInteger: ["0"]
queryBoolean: ["false"]
Integer: ["0"]
Boolean: ["false"]
}
}
}
Expand Down Expand Up @@ -89,11 +89,9 @@ service RestJsonExtras {
NullInNonSparse,
CaseInsensitiveErrorOperation,
EmptyStructWithContentOnWireOp,
// TODO(https://github.com/smithy-lang/smithy-rs/issues/2968): Remove the following once these tests are included in Smithy
// They're being added in https://github.com/smithy-lang/smithy/pull/1908
HttpPayloadWithUnion,
// TODO(https://github.com/smithy-lang/smithy-rs/issues/3315)
ZeroAndFalseQueryParams,
QueryPrecedence,
// TODO(https://github.com/smithy-lang/smithy/pull/2167): Remove this test once it's fixed in Smithy
AllQueryStringTypes,
],
errors: [ExtraError]
}
Expand Down Expand Up @@ -377,33 +375,3 @@ structure EmptyStructWithContentOnWireOpOutput {
operation EmptyStructWithContentOnWireOp {
output: EmptyStructWithContentOnWireOpOutput,
}
@http(uri: "/zero-and-false-query-params", method: "GET")
@httpRequestTests([
{
id: "RestJsonZeroAndFalseQueryParamsAreSerialized",
protocol: restJson1,
code: 200,
method: "GET",
uri: "/zero-and-false-query-params",
body: "",
queryParams: [
"Zero=0",
"False=false"
],
params: {
zeroValue: 0,
falseValue: false
}
}
])
operation ZeroAndFalseQueryParams {
input: ZeroAndFalseQueryParamsInput
}

structure ZeroAndFalseQueryParamsInput {
@httpQuery("Zero")
zeroValue: Integer

@httpQuery("False")
falseValue: Boolean
}
Original file line number Diff line number Diff line change
Expand Up @@ -805,15 +805,18 @@ class ServerProtocolTestGenerator(
private const val AwsJson11 = "aws.protocoltests.json#JsonProtocol"
private const val AwsJson10 = "aws.protocoltests.json10#JsonRpc10"
private const val RestJson = "aws.protocoltests.restjson#RestJson"
private const val RestJsonExtras = "aws.protocoltests.restjson#RestJsonExtras"
private const val RestJsonValidation = "aws.protocoltests.restjson.validation#RestJsonValidation"
private val ExpectFail: Set<FailingTest> =
setOf(
// Endpoint trait is not implemented yet, see https://github.com/smithy-lang/smithy-rs/issues/950.
FailingTest(RestJson, "RestJsonEndpointTrait", TestType.Request),
FailingTest(RestJson, "RestJsonEndpointTraitWithHostLabel", TestType.Request),
FailingTest(RestJson, "RestJsonOmitsEmptyListQueryValues", TestType.Request),
// TODO(https://github.com/smithy-lang/smithy/pull/2132): Remove this failing test once it's fixed in Smithy
// TODO(https://github.com/smithy-lang/smithy/pull/2167): BEGIN Remove this failing test once it's fixed in Smithy
FailingTest(RestJson, "RestJsonZeroAndFalseQueryValues", TestType.Request),
FailingTest(RestJsonExtras, "RestJsonZeroAndFalseQueryValues", TestType.Request),
// TODO(https://github.com/smithy-lang/smithy/pull/2167): END Remove this failing test once it's fixed in Smithy
// Tests involving `@range` on floats.
// Pending resolution from the Smithy team, see https://github.com/smithy-lang/smithy-rs/issues/2007.
FailingTest(RestJsonValidation, "RestJsonMalformedRangeFloat_case0", TestType.MalformedRequest),
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ kotlin.code.style=official

# codegen
smithyGradlePluginVersion=0.9.0
smithyVersion=1.44.0
smithyVersion=1.45.0

# kotlin
kotlinVersion=1.9.20
Expand Down
3 changes: 0 additions & 3 deletions rust-runtime/aws-smithy-runtime/src/client/orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

// TODO(msrvUpgrade): This can be removed once we upgrade the MSRV to Rust 1.69
#![allow(unknown_lints)]

use self::auth::orchestrate_auth;
use crate::client::interceptors::Interceptors;
use crate::client::orchestrator::endpoints::orchestrate_endpoint;
Expand Down

0 comments on commit a413b9b

Please sign in to comment.