Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Initial Support for Hyper 1.0 #3461

Merged
merged 10 commits into from
Mar 7, 2024
Merged

Add Initial Support for Hyper 1.0 #3461

merged 10 commits into from
Mar 7, 2024

Conversation

rcoh
Copy link
Collaborator

@rcoh rcoh commented Mar 5, 2024

Motivation and Context

Description

This adds a minimal Hyper client, focusing on not exposing any unstable APIs. For this reason, the Client::Builder customization API is not exposed anymore. We do this because at some point in the future, we will likely move away from the hyper-util based Client.

The code for this was lifted directly from the Hyper 0.14 implementation but updated for new traits.

However, this does come with some new valuable pieces:

  1. Support for aws-lc (no FIPS yet)
  2. Support for providing a custom DNS resolver

Testing

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates
  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rcoh rcoh requested review from a team as code owners March 5, 2024 16:39
@rcoh rcoh mentioned this pull request Mar 5, 2024
2 tasks
Copy link

github-actions bot commented Mar 5, 2024

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link
Collaborator

@jdisanti jdisanti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just a couple minor/non-blocking things.

hyper_rustls::HttpsConnectorBuilder::new()
.with_tls_config(
rustls::ClientConfig::builder_with_provider(Arc::new(restrict_ciphers(crypto_provider)))
//.with_safe_default_kx_groups()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah they removed that — it is only safe now.

None
}

// TODO(https://github.com/awslabs/aws-sdk-rust/issues/1090): CacheKey must also include ptr equality to RuntimeComponents
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think pointer equality will end up ballooning the cached connectors into a memory leak if someone uses a config override on a operation. We'll have to come up with something else.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah—that comment is badly worded. It should be the specific components of RC that are used.

Copy link

github-actions bot commented Mar 5, 2024

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link

github-actions bot commented Mar 6, 2024

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link

github-actions bot commented Mar 6, 2024

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link

github-actions bot commented Mar 6, 2024

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link

github-actions bot commented Mar 6, 2024

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

github-actions bot commented Mar 7, 2024

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

github-actions bot commented Mar 7, 2024

A new generated diff is ready to view.

A new doc preview is ready to view.

@@ -28,7 +28,6 @@ hex = "0.4"
hmac = "0.12"
http0 = { version = "0.2", optional = true, package = "http" }
http = { version = "1", optional = true }
num-bigint = { version = "0.4.2", optional = true }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@jdisanti jdisanti merged commit f68b5ee into main Mar 7, 2024
41 checks passed
@jdisanti jdisanti deleted the hyper-10-experimental branch March 7, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants