Skip to content

Commit 8cee53c

Browse files
authored
Merge branch 'main' into crc-fast
2 parents a5635b1 + 3f9f97f commit 8cee53c

315 files changed

Lines changed: 21691 additions & 9328 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changelog/1769183956.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
applies_to:
3+
- client
4+
- aws-sdk-rust
5+
authors:
6+
- vcjana
7+
references:
8+
- smithy-rs#4454
9+
- smithy-rs#4467
10+
- aws-sdk-rust#1389
11+
breaking: true
12+
new_feature: true
13+
bug_fix: false
14+
---
15+
Enable retries by default for AWS SDK clients using `BehaviorVersion::v2026_01_12()` or later.
16+
17+
Previously, retries were only enabled when constructing clients via `aws_config::load_from_env()`. Clients constructed directly using `Client::from_conf()` did not have retries enabled, which was inconsistent with AWS SDK behavior in other languages.
18+
19+
This change affects AWS SDK clients constructed with `Client::from_conf()` when using `BehaviorVersion::v2026_01_12()` or `BehaviorVersion::latest()`. Generic Smithy clients (non-AWS) are not affected.
20+
21+
To disable retries:
22+
```rust
23+
let config = aws_sdk_s3::Config::builder()
24+
.retry_config(RetryConfig::disabled())
25+
// ...
26+
.build();
27+
```
28+
29+
For more context, see the [discussion on retry behavior](https://github.com/smithy-lang/smithy-rs/discussions/4466).
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
applies_to:
3+
- client
4+
- aws-sdk-rust
5+
authors:
6+
- vcjana
7+
references:
8+
- smithy-rs#4500
9+
breaking: false
10+
new_feature: false
11+
bug_fix: true
12+
---
13+
Fix JMESPath integer literal handling in waiters to support Smithy 1.66.0, which parses integer literals as `Long` instead of `Double`.

.changelog/http-1x.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
applies_to:
3+
- aws-sdk-rust
4+
- client
5+
- server
6+
authors:
7+
- landonxjames
8+
- drganjoo
9+
references:
10+
- smithy-rs#4484
11+
breaking: false
12+
new_feature: true
13+
bug_fix: false
14+
---
15+
16+
All Smithy-rs crates, for both servers and clients, now use the 1.x version of
17+
the `http` crate for all internal processing. Utility methods are still provided
18+
for users to convert between SDK types and both of the `http` 0.x and 1.x types.

.github/workflows/pull-request-bot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@ jobs:
118118
./gradlew -Paws.services=+sts,+sso,+ssooidc,+signin,+transcribestreaming,+dynamodb :aws:sdk:assemble
119119
120120
# Copy the Server runtime crate(s) in
121-
cp -r rust-runtime/aws-smithy-http-server rust-runtime/aws-smithy-http-server-python rust-runtime/aws-smithy-http-server-typescript aws/sdk/build/aws-sdk/sdk
121+
cp -r rust-runtime/aws-smithy-http-server rust-runtime/aws-smithy-http-server-python rust-runtime/aws-smithy-http-server-typescript rust-runtime/aws-smithy-legacy-http-server aws/sdk/build/aws-sdk/sdk
122122
123123
pushd aws/sdk/build/aws-sdk
124124
125125
# Remove example crates from workspace
126126
sed -i '/examples/d' Cargo.toml
127127
128128
# Add server runtime crates to the workspace
129-
sed -i 's/"sdk\/sts",/"sdk\/sts","sdk\/aws-smithy-http-server","sdk\/aws-smithy-http-server-python","sdk\/aws-smithy-http-server-typescript",/' Cargo.toml
129+
sed -i 's/"sdk\/sts",/"sdk\/sts","sdk\/aws-smithy-http-server","sdk\/aws-smithy-http-server-python","sdk\/aws-smithy-http-server-typescript","sdk\/aws-smithy-legacy-http-server",/' Cargo.toml
130130
131131
RUSTDOCFLAGS="--cfg docsrs" cargo +${{ env.rust_nightly_version }} doc --all-features --no-deps
132132

aws/SDK_CHANGELOG.next.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@
109109
}
110110
],
111111
"aws-sdk-model": []
112-
}
112+
}

aws/codegen-aws-sdk/src/main/kotlin/software/amazon/smithy/rustsdk/AwsChunkedContentEncodingDecorator.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class AwsChunkedContentEncodingDecorator : ClientCodegenDecorator {
2828
// This decorator must decorate after any of the following:
2929
// - HttpRequestChecksumDecorator
3030
// - HttpRequestCompressionDecorator
31-
override val order: Byte = (minOf(HttpRequestChecksumDecorator.ORDER, HttpRequestCompressionDecorator.ORDER) - 1).toByte()
31+
override val order: Byte =
32+
(minOf(HttpRequestChecksumDecorator.ORDER, HttpRequestCompressionDecorator.ORDER) - 1).toByte()
3233

3334
override fun operationCustomizations(
3435
codegenContext: ClientCodegenContext,
@@ -81,8 +82,8 @@ private fun RuntimeConfig.awsChunked() =
8182
InlineAwsDependency.forRustFile(
8283
"aws_chunked", visibility = Visibility.PUBCRATE,
8384
CargoDependency.Bytes,
84-
CargoDependency.Http,
85-
CargoDependency.HttpBody,
85+
CargoDependency.Http1x,
86+
CargoDependency.HttpBody1x,
8687
CargoDependency.Tracing,
8788
AwsCargoDependency.awsRuntime(this).withFeature("http-02x"),
8889
CargoDependency.smithyRuntimeApiClient(this),

aws/codegen-aws-sdk/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ class AwsPresigningDecorator internal constructor(
170170
rustCrate.mergeFeature(
171171
Feature(
172172
"http-1x",
173-
default = false,
174-
listOf("dep:http-body-1x", "aws-smithy-runtime-api/http-1x"),
173+
default = true,
174+
listOf("aws-smithy-runtime-api/http-1x"),
175175
),
176176
)
177177
}
@@ -204,6 +204,14 @@ class AwsPresignedFluentBuilderMethod(
204204
"SdkError" to RuntimeType.sdkError(runtimeConfig),
205205
)
206206

207+
// Presigning requires both http version features since it pub exposes into_http_02x_request
208+
// and into_http_1x_request functions
209+
private val smithyRuntimeApi =
210+
CargoDependency.smithyRuntimeApiClient(codegenContext.runtimeConfig)
211+
.withFeature("http-02x")
212+
.withFeature("http-1x")
213+
.toType()
214+
207215
override fun section(section: FluentClientSection): Writable =
208216
writable {
209217
if (section is FluentClientSection.FluentBuilderImpl && section.operationShape.hasTrait(PresignableTrait::class.java)) {
@@ -219,7 +227,7 @@ class AwsPresignedFluentBuilderMethod(
219227
*codegenScope,
220228
"OpError" to section.operationErrorType,
221229
"RawResponseType" to
222-
RuntimeType.smithyRuntimeApiClient(runtimeConfig)
230+
smithyRuntimeApi
223231
.resolve("client::orchestrator::HttpResponse"),
224232
) {
225233
renderPresignedMethodBody(section)
@@ -305,13 +313,13 @@ class AwsPresignedFluentBuilderMethod(
305313
"OperationError" to section.operationErrorType,
306314
"RuntimePlugins" to RuntimeType.runtimePlugins(runtimeConfig),
307315
"SharedInterceptor" to
308-
RuntimeType.smithyRuntimeApiClient(runtimeConfig).resolve("client::interceptors")
316+
smithyRuntimeApi.resolve("client::interceptors")
309317
.resolve("SharedInterceptor"),
310318
"SigV4PresigningRuntimePlugin" to
311319
AwsRuntimeType.presigningInterceptor(runtimeConfig)
312320
.resolve("SigV4PresigningRuntimePlugin"),
313321
"StopPoint" to RuntimeType.smithyRuntime(runtimeConfig).resolve("client::orchestrator::StopPoint"),
314-
"USER_AGENT" to CargoDependency.Http.toType().resolve("header::USER_AGENT"),
322+
"USER_AGENT" to CargoDependency.Http1x.toType().resolve("header::USER_AGENT"),
315323
"alternate_presigning_serializer" to
316324
writable {
317325
if (presignableOp.hasModelTransforms()) {
@@ -334,7 +342,7 @@ class AwsPresignedFluentBuilderMethod(
334342
"Layer" to smithyTypes.resolve("config_bag::Layer"),
335343
"RuntimePlugin" to RuntimeType.runtimePlugin(codegenContext.runtimeConfig),
336344
"SharedRequestSerializer" to
337-
RuntimeType.smithyRuntimeApiClient(codegenContext.runtimeConfig)
345+
smithyRuntimeApi
338346
.resolve("client::ser_de::SharedRequestSerializer"),
339347
)
340348
}

aws/codegen-aws-sdk/src/main/kotlin/software/amazon/smithy/rustsdk/AwsRuntimeType.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ object AwsRuntimeType {
3636
RuntimeType.forInlineDependency(
3737
InlineAwsDependency.forRustFile(
3838
"presigning", visibility = Visibility.PUBLIC,
39+
// Requires http_02x because of existing pub *_http_02x_request methods
40+
CargoDependency.Http0x,
3941
CargoDependency.Http1x,
4042
CargoDependency.HttpBody1x,
4143
),

aws/codegen-aws-sdk/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ internal fun RuntimeConfig.awsInlineableHttpRequestChecksum() =
4141
InlineAwsDependency.forRustFile(
4242
"http_request_checksum", visibility = Visibility.PUBCRATE,
4343
CargoDependency.Bytes,
44-
CargoDependency.Http,
45-
CargoDependency.HttpBody,
44+
CargoDependency.Http1x,
45+
CargoDependency.HttpBody1x,
46+
CargoDependency.HttpBodyUtil01x.toDevDependency(),
4647
CargoDependency.Tracing,
47-
AwsCargoDependency.awsRuntime(this).withFeature("http-02x"),
48+
AwsCargoDependency.awsRuntime(this).withFeature("http-1x"),
4849
CargoDependency.smithyChecksums(this),
4950
CargoDependency.smithyHttp(this),
5051
CargoDependency.smithyRuntimeApiClient(this),

aws/codegen-aws-sdk/src/main/kotlin/software/amazon/smithy/rustsdk/HttpResponseChecksumDecorator.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ private fun RuntimeConfig.awsInlineableHttpResponseChecksum() =
4040
InlineAwsDependency.forRustFile(
4141
"http_response_checksum", visibility = Visibility.PUBCRATE,
4242
CargoDependency.Bytes,
43-
CargoDependency.Http,
44-
CargoDependency.HttpBody,
4543
CargoDependency.Tracing,
4644
CargoDependency.smithyChecksums(this),
4745
CargoDependency.smithyHttp(this),

0 commit comments

Comments
 (0)