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

aws_sdk_dynamodb::client::Builder::new().rustls() no longer work as of v0.7.0 #467

Closed
nmoutschen opened this issue Feb 21, 2022 · 5 comments · Fixed by smithy-lang/smithy-rs#1217
Assignees
Labels
bug This issue is a bug.

Comments

@nmoutschen
Copy link
Contributor

What is the problem?

When creating a client using the Builder and the .rustls() method, the builder no longer works.

Version

├── aws-config v0.7.0 │ ├── aws-http v0.7.0 │ │ ├── aws-smithy-http v0.37.0 │ │ │ ├── aws-smithy-types v0.37.0 │ │ ├── aws-smithy-types v0.37.0 () │ │ ├── aws-types v0.7.0 │ │ │ ├── aws-smithy-async v0.37.0 │ │ │ ├── aws-smithy-client v0.37.0 │ │ │ │ ├── aws-smithy-async v0.37.0 () │ │ │ │ ├── aws-smithy-http v0.37.0 () │ │ │ │ ├── aws-smithy-http-tower v0.37.0 │ │ │ │ │ ├── aws-smithy-http v0.37.0 () │ │ │ │ ├── aws-smithy-types v0.37.0 () │ │ │ ├── aws-smithy-types v0.37.0 () │ ├── aws-sdk-sso v0.7.0 │ │ ├── aws-endpoint v0.7.0 │ │ │ ├── aws-smithy-http v0.37.0 () │ │ │ ├── aws-types v0.7.0 () │ │ ├── aws-http v0.7.0 () │ │ ├── aws-sig-auth v0.7.0 │ │ │ ├── aws-sigv4 v0.7.0 │ │ │ │ ├── aws-smithy-http v0.37.0 () │ │ │ ├── aws-smithy-http v0.37.0 () │ │ │ ├── aws-types v0.7.0 () │ │ ├── aws-smithy-async v0.37.0 () │ │ ├── aws-smithy-client v0.37.0 () │ │ ├── aws-smithy-http v0.37.0 () │ │ ├── aws-smithy-http-tower v0.37.0 () │ │ ├── aws-smithy-json v0.37.0 │ │ │ └── aws-smithy-types v0.37.0 () │ │ ├── aws-smithy-types v0.37.0 () │ │ ├── aws-types v0.7.0 () │ ├── aws-sdk-sts v0.7.0 │ │ ├── aws-endpoint v0.7.0 () │ │ ├── aws-http v0.7.0 () │ │ ├── aws-sig-auth v0.7.0 () │ │ ├── aws-smithy-async v0.37.0 () │ │ ├── aws-smithy-client v0.37.0 () │ │ ├── aws-smithy-http v0.37.0 () │ │ ├── aws-smithy-http-tower v0.37.0 () │ │ ├── aws-smithy-query v0.37.0 │ │ │ ├── aws-smithy-types v0.37.0 () │ │ ├── aws-smithy-types v0.37.0 () │ │ ├── aws-smithy-xml v0.37.0 │ │ ├── aws-types v0.7.0 () │ ├── aws-smithy-async v0.37.0 () │ ├── aws-smithy-client v0.37.0 () │ ├── aws-smithy-http v0.37.0 () │ ├── aws-smithy-http-tower v0.37.0 () │ ├── aws-smithy-json v0.37.0 () │ ├── aws-smithy-types v0.37.0 () │ ├── aws-types v0.7.0 () ├── aws-sdk-dynamodb v0.7.0 │ ├── aws-endpoint v0.7.0 () │ ├── aws-http v0.7.0 () │ ├── aws-sig-auth v0.7.0 () │ ├── aws-smithy-async v0.37.0 () │ ├── aws-smithy-client v0.37.0 () │ ├── aws-smithy-http v0.37.0 () │ ├── aws-smithy-http-tower v0.37.0 () │ ├── aws-smithy-json v0.37.0 () │ ├── aws-smithy-types v0.37.0 () │ ├── aws-types v0.7.0 () ├── aws-smithy-client v0.37.0 (*)

Platform

Linux CENSORED 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

AWS Services

aws_sdk_dynamodb

Description

Here is my code that worked with aws_sdk_dynamodb version 0.7.0 and aws_smithy_http version 0.37.0:

let inner_client = aws_sdk_dynamodb::client::Builder::new()
    .rustls()
    .middleware(DynMiddleware::new(middleware))
    .build();
let client = aws_sdk_dynamodb::Client::with_config(inner_client, config);

I had to change my code to this for it to work:

let connector = aws_smithy_client::hyper_ext::Adapter::builder().build(aws_smithy_client::conns::https());
let inner_client = aws_sdk_dynamodb::client::Builder::new()
    .connector(DynConnector::new(connector))
    .middleware(DynMiddleware::new(middleware))
    .build();
let client = aws_sdk_dynamodb::Client::with_config(inner_client, config);

Logs

As of version 0.7.0 and 0.37.0, using .rustls() returns the following error:

  --> src/main.rs:24:56
   |
24 |     let client = aws_sdk_dynamodb::Client::with_config(inner_client, config);
   |                                                        ^^^^^^^^^^^^ expected struct `DynConnector`, found struct `Adapter`
   |
   = note: expected struct `aws_smithy_client::Client<DynConnector, DynMiddleware<DynConnector>>`
              found struct `aws_smithy_client::Client<Adapter<hyper_rustls::connector::HttpsConnector<hyper::client::connect::http::HttpConnector>>, DynMiddleware<_>>`
@nmoutschen nmoutschen added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 21, 2022
@Velfi
Copy link
Contributor

Velfi commented Feb 21, 2022

Hey @nmoutschen, I probably broke this during my refactor of connectors. Sorry about that; I'm investigating a fix.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@jdisanti
Copy link
Contributor

Hmmm... Looks like I unintentionally rigged this up for auto-close 😅 Reopening until the fix goes out with the next release.

@jdisanti jdisanti reopened this Feb 23, 2022
@jdisanti
Copy link
Contributor

The fix for this went out in v0.8.0.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants