Open
Conversation
## Motivation and Context <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here --> The first steps to defaulting to `http-1x` dependencies instead of `http-02x` ## Description <!--- Describe your changes in detail --> For this PR I updated the dependencies on SDK crates to enable their `http-1x` features and worked backwards from there fixing the things that broke (this would be easier to see if the diff was working but it seems to be broken for feature branches after the new ECR update). This involved: * Updating the `http_request_checksum` inlineable to use `http-1x` types (and removing the `http-1x` feature since it is no longer needed and wasn't a "real" feature to begin with * Creating a new `pub mod content_encoding_http_1x` module in the `aws-runtime` crate. Most logic here is dedicated to implementing the `http_body_1x::Body` trait for `AwsChunkedBody`. I initially considered keeping this in the existing `content_encoding` module, but with the current feature flags and all of the changes I had to make it felt cleaner to break it out. * Update body polling logic for `ChecksumBody` calculation and validation for `http-1x` types ## Testing <!--- Please describe in detail how you tested your changes --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> Updated existing tests and added new ones for `http-1x` types ## TODOs Future PRs will * Update code generation logic in codegen-core to use `http-1x` * Remove pre-1.0 `http` dependencies (anywhere they aren't re-exported) * Normalize dependency names to `http-1x`, `http-02x`, etc ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
## Motivation and Context We released the feature [in this release](https://github.com/awslabs/aws-sdk-rust/releases/tag/release-2025-06-12), but till the infrastructure is fully ready, we'll temporarily revert the functionality. ## Testing - CI ## Checklist - [x] For changes to the AWS SDK, generated SDK code, or SDK runtime crates, I have created a changelog entry Markdown file in the `.changelog` directory, specifying "aws-sdk-rust" in the `applies_to` key. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
## Description This PR makes Rpc V2 CBOR a compatible protocol for `awsQuery` using `awsQueryCompatible` trait, as described in the `Important` section in [this page](https://smithy.io/2.0/aws/protocols/aws-query-protocol.html#aws-protocols-awsquerycompatible-trait). Previously, the implementation for `awsQueryCompatible` was tightly coupled to `awsJson1_0`. This PR makes the implementation a bit more abstract so that the implementation can support more target protocols generically. ## Testing - CI - Made `AwsQueryCompatibleTest` parameterized tests to support RpcV2Cbor and verified against modified cloudwatch service model (with `awsQueryCompatible` trait applied). ~Tests for RpcV2Cbor is commented out till #4185 is merged~. ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] For changes to the smithy-rs codegen or runtime crates, I have created a changelog entry Markdown file in the `.changelog` directory, specifying "client," "server," or both in the `applies_to` key. - [x] For changes to the AWS SDK, generated SDK code, or SDK runtime crates, I have created a changelog entry Markdown file in the `.changelog` directory, specifying "aws-sdk-rust" in the `applies_to` key. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
Continuing the work to default to `http-1x` types under the hood.
## Description
<!--- Describe your changes in detail -->
This is unfortunately an enormous PR (at least in terms of files
touched, not total lines). The vast majority of changes are just
replacing references to `http_02x` with `http_1x` or `http_body_04x`
with `http_body_1x` and updating code or feature flags to match.
The primary functional changes are in the vicintiy of
`rust-runtime/aws-smithy-types/src/body.rs`, updating methods for
`SdkBody` to understand `http_1x` types. This required several changes:
* Add a new `HttpBody1` variant to the `enum BoxBody`
* Update `SdkBody::from_body_1_x` to construct a `HttpBody1` variant
instead of the `HttpBody04` variant it was previously
* Add a new `trailers: Option<VecDeque<http_1x::HeaderMap>>` field to
`SdkBody` to cache polled trailers (`http_body_1x` doesn't allow polling
trailers separately, but `SdkBody` does, so we have to cache at least
the first trailer frame if it is encountered while polling the body)
* Update `SdkBody::{poll_next, poll_next_trailers}` to work with the new
`HttpBody1x` variant.
## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
Updated most existing tests to use `http-1x` types (Although I have
almost certainly missed some)
Note that some tests are failing here and that is expected:
* Semver tests: we have changed/deleted some `http_02x` trait impls in
pre-1.0 crates, so we expect these to fail
* Server tests: I haven't touched these and will work with Fahad to get
them updated
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
…4204) ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here --> There were some conflicts around checksum changes made in #4200 while merging main back into the `feature/http-1.x` branch. This PR reconciles those changes ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
cargoUpdateAllLockfiles Fix sigv4 test issues
## Motivation and Context <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here --> Request from @drganjoo >Also, in feature/http-1.x could we please bump version of aws-smithy-http to 0.63.x instead of [0.62.4](https://github.com/smithy-lang/smithy-rs/blob/feature/http-1.x/rust-runtime/aws-smithy-http/Cargo.toml#L3). This way on the server side we can keep on relying on 0.62.x to have http/0.x support for a while. Thanks. Note: I merged main back into the base `feature/http-1.x` branch as part of making this change ## Testing <!--- Please describe in detail how you tested your changes --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> Failing tests are all server related and expected since the server side of the codebase hasn't done this upgrade yet. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
…thy-json and aws-smithy-cbor
rcoh
reviewed
Nov 3, 2025
examples/upgrade-http1x.md
Outdated
Comment on lines
222
to
224
| ## Client-Side Changes | ||
|
|
||
| ### HTTP Client Connector Setup |
Collaborator
There was a problem hiding this comment.
need to call out that client/server http versions are totally decoupled.
Contributor
Author
There was a problem hiding this comment.
I need to check with the SDK team on this section. For the time being I am removing it.
examples/upgrade-http1x.md
Outdated
| ### 3. Request Handling | ||
|
|
||
| Most request handling code remains the same thanks to smithy-rs abstractions: | ||
|
|
Collaborator
There was a problem hiding this comment.
probably no need to bother calling this out.
| @@ -0,0 +1,54 @@ | |||
| // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. | |||
| #[allow(clippy::unnecessary_wraps)] | |||
| pub async fn de_check_health_http_request<B>( | |||
Collaborator
There was a problem hiding this comment.
I don't think you meant to check in this entire directory
## Motivation and Context Merge the latest main to the `feature/http-1.x` branch, plus replace http-0.x constructs with http-1.x constructs as described in [Tips for merging to feature/http-1.x](#4384) ## Testing - CI: ignore server related failures and semver hazard failure (the type being complained about `Uri` isn't exposed since its enclosing module `request` isn't exposed as pub, which confuses the semver hazard check) ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: Landon James <lnj@amazon.com> Co-authored-by: Russell Cohen <rcoh@amazon.com> Co-authored-by: AWS SDK Rust Bot <aws-sdk-rust-primary@amazon.com> Co-authored-by: AWS SDK Rust Bot <97246200+aws-sdk-rust-ci@users.noreply.github.com> Co-authored-by: vcjana <vcjana@amazon.com> Co-authored-by: Jason Gin <67525213+jasgin@users.noreply.github.com> Co-authored-by: Aaron Todd <aajtodd@users.noreply.github.com>
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
## Motivation and Context Merge the main branch to the `feature/http-1.x` branch. It takes all from the main branch except for [this](#4392 (comment)), which is replaced by `http-1.x` construct. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
## Motivation and Context <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here --> ## Description <!--- Describe your changes in detail --> ## Testing <!--- Please describe in detail how you tested your changes --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [ ] For changes to the smithy-rs codegen or runtime crates, I have created a changelog entry Markdown file in the `.changelog` directory, specifying "client," "server," or both in the `applies_to` key. - [ ] For changes to the AWS SDK, generated SDK code, or SDK runtime crates, I have created a changelog entry Markdown file in the `.changelog` directory, specifying "aws-sdk-rust" in the `applies_to` key. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: ysaito1001 <awsaito@amazon.com> Co-authored-by: Russell Cohen <rcoh@amazon.com> Co-authored-by: AWS SDK Rust Bot <aws-sdk-rust-primary@amazon.com> Co-authored-by: AWS SDK Rust Bot <97246200+aws-sdk-rust-ci@users.noreply.github.com> Co-authored-by: vcjana <vcjana@amazon.com> Co-authored-by: Jason Gin <67525213+jasgin@users.noreply.github.com> Co-authored-by: Aaron Todd <aajtodd@users.noreply.github.com> Co-authored-by: greenwoodcm <greenwd@amazon.com> Co-authored-by: Jason Gin <jasongin88@gmail.com> Co-authored-by: Aaron J Todd <todaaron@amazon.com> Co-authored-by: Anna H <annahay@amazon.com> Co-authored-by: Ariel Ben-Yehuda <ariel.byd@gmail.com> Co-authored-by: Ariel Ben-Yehuda <arielby@amazon.com>
Support for `http@1.x`/`hyper@1.x` in `aws-smithy-http-server` runtime crate for the server. ## Key Changes ### 1. Dependency Upgrades - **http**: `0.2.9` → `1.x` - **http-body**: `0.4.5` → `1.0` - **hyper**: `0.14.26` → `1.x` (with `server`, `http1`, `http2` features) - **hyper-util**: Added `0.1` for server utilities (`server-auto`, `server-graceful`, etc.) - **http-body-util**: Added `0.1` for body utilities - **tower-http**: `0.3` → `0.6` - **lambda_http**: `0.8.4` → `1` (for AWS Lambda support) Updated `aws-smithy-types` to use `http-body-1-x` feature instead of `http-body-0-4-x`. ### 2. New `serve` Module Added a comprehensive `serve` module (inspired by `axum::serve`) that provides: - **Simple server API**: Ergonomic `serve(listener, service)` function - **Connection limiting**: Built-in `limit_connections()` via`ListenerExt` - **Graceful shutdown**: Zero-cost when unused, opt-in with `.with_graceful_shutdown()` - **Hyper customization**: `.configure_hyper()` for protocol and performance tuning ## Migration Impact **Breaking Change**: This updates the public API to use `http@1.x` types (`http::Request`, `http::Response`, etc.).
21d6619 to
13d6532
Compare
13d6532 to
448b981
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit updates examples to demonstrate server SDK usage with both http@0.2.x
and http@1.x, supporting the http-1x migration effort.
Changes
New Directories
legacy/: Complete set of examples using http@0.2.x/hyper@0.14 with
aws-smithy-legacy-http-server. These examples preserve the original behavior
for users not yet ready to migrate.
pokemon-service-server-skd-patch/: Compatibility layer and patches for
bridging http@0 and http@1 types in server SDK.
Updated Examples
Modified existing examples to use http@1.x/hyper@1.x:
Key Updates
Testing
Examples can be run with both HTTP versions to verify compatibility.
Relates to #3362