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

Update remaining examples to axum 0.7 #2356

Closed
10 of 11 tasks
davidpdrsn opened this issue Nov 26, 2023 · 20 comments
Closed
10 of 11 tasks

Update remaining examples to axum 0.7 #2356

davidpdrsn opened this issue Nov 26, 2023 · 20 comments
Labels
E-help-wanted Call for participation: Help is requested to fix this issue. T-docs Topic: documentation

Comments

@davidpdrsn
Copy link
Member

davidpdrsn commented Nov 26, 2023

This tracks the examples that haven't yet been updated to axum 0.7:

@davidpdrsn davidpdrsn added E-help-wanted Call for participation: Help is requested to fix this issue. T-docs Topic: documentation labels Nov 26, 2023
@rsdlt
Copy link
Contributor

rsdlt commented Nov 27, 2023

Hi David, I'll have some time the next couple of weeks and would like to help with this one, if possible.

Cheers

@davidpdrsn
Copy link
Member Author

Go ahead! Just post here which example you’re working on so others know.

@takkuumi
Copy link
Contributor

I'll fix rest-grpc-multiplex example until tonic support http 1.0.

@davidpdrsn
Copy link
Member Author

@takkuumi what do you mean? The example can't be updated yet.

@takkuumi
Copy link
Contributor

@takkuumi what do you mean? The example can't be updated yet.

Not this mean, I’d wrote this example and I think that i can help on it.

@davidpdrsn
Copy link
Member Author

I'm pretty sure the example can't be updated yet because tonic uses http 0.2 and axum now requires http 1.0. You can't convert requests/responses from 0.2 to 1.0 because extensions are totally opaque. Having to put a bunch of conversion code in an example isn't appropriate either.

I think people using axum with tonic will have to wait until tonic has been updated.

@sam-kirby
Copy link
Contributor

It looks like the tls-graceful-shutdown example is missing from this list.

@fan-tastic-z

This comment was marked as off-topic.

@rsdlt
Copy link
Contributor

rsdlt commented Nov 28, 2023

Go ahead! Just post here which example you’re working on so others know.

Thanks. Working on http-proxy first.

Will update here. Cheers.

@erebe
Copy link
Contributor

erebe commented Nov 29, 2023

Made a PR #2375 to update low-level-rustls
and #2376 to update low-level-openssl

@erebe
Copy link
Contributor

erebe commented Nov 30, 2023

Made a PR #2384 to update tls-graceful-shutdown

@markussilvan
Copy link
Contributor

Here's my shot at reverse_proxy example.

@prorealize
Copy link

prorealize commented Dec 7, 2023

Not sure this is the best place to report as I see testing is already updated.

I run with the following when running the example testing (with 0.7.1 and fresh git pull)

$cargo test -p example-testing
   Compiling hyper-util v0.1.1
error[E0599]: no method named `with_retries` found for struct `TcpKeepalive` in the current scope
   --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-util-0.1.1/src/client/legacy/connect/http.rs:130:12
    |
130 |         ka.with_retries(retries)
    |            ^^^^^^^^^^^^ help: there is a method with a similar name: `with_time`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `hyper-util` (lib) due to previous error

@jplatte
Copy link
Member

jplatte commented Dec 7, 2023

Sounds like hyper-util has one of its dependency specifications wrong. cargo update should work around it.

@gerardcl
Copy link
Contributor

@davidpdrsn I just realised I did update the only commit in the PR #2430 after you merged so the changes on the comments
here gerardcl@93799cf#diff-60c9dfa63b6f41b8064cb70bbde4726a91cc3895257ef8b6c39c73c46b223b8eR65 and here gerardcl@93799cf#diff-60c9dfa63b6f41b8064cb70bbde4726a91cc3895257ef8b6c39c73c46b223b8eR75 , did not get in. Let me know if you want me to fix it somehow. Thanks!

@davidpdrsn
Copy link
Member Author

The code looks okay to me https://github.com/tokio-rs/axum/blob/main/examples/reqwest-response/src/main.rs#L67. Am I missing something?

@gerardcl
Copy link
Contributor

hi @davidpdrsn , that is correct, but not the comment above and below, see the difference in the links in my previous comment. The first comment would be still fine but not the second IMHO.

@davidpdrsn
Copy link
Member Author

Ah I see. You're free to submit a PR to clean that up :)

gerardcl added a commit to gerardcl/axum that referenced this issue Dec 18, 2023
gerardcl added a commit to gerardcl/axum that referenced this issue Dec 18, 2023
@davidpdrsn
Copy link
Member Author

I think I'll close this issue now for now. All examples except rest-grpc-multiplex has been updated and that is blocked by tonic being updated. Nothing really we can do about that here. Follow hyperium/tonic#1579 for more updates.

Thanks to everyone who helped porting examples ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-help-wanted Call for participation: Help is requested to fix this issue. T-docs Topic: documentation
Projects
None yet
Development

No branches or pull requests