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

[rust] Update to modern hyper and futures crates #9919

Merged
merged 2 commits into from
Nov 24, 2021
Merged

[rust] Update to modern hyper and futures crates #9919

merged 2 commits into from
Nov 24, 2021

Conversation

softdevca
Copy link
Contributor

@softdevca softdevca commented Jul 9, 2021

The hyper and futures crates used by the Rust client were significantly out of date. This pull request addresses the issue by updating futures to 0.3.* and hyper to 0.14.*.

The newer futures crate required a breaking change in the generated APIs - the return types are now Future<Result> instead of Future<Output,Error>

The newer version of hyper is required to work with modern versions of tokio.

Fixes #8400

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
  • File the PR against the correct branch: master, 5.1.x, 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05)

@wing328
Copy link
Member

wing328 commented Jul 21, 2021

@softdevca thanks for the PR. Can you please PM me via Slack to discuss this change further?

jsoverson added a commit to jsoverson/openapi-generator that referenced this pull request Aug 20, 2021
@wing328
Copy link
Member

wing328 commented Aug 25, 2021

Can you please resolve the merge conflicts when you've time?

Upcoming 5.3.0 release allow breaking changes without fallback so I think we can include this change if all tests are good.

@softdevca
Copy link
Contributor Author

Conflict resolved and rebased to master.

@wing328
Copy link
Member

wing328 commented Oct 5, 2021

Looks like the rebase went wrong and therefore this PR contains many commits that do not belong to you.

Can you please create a new PR by cherry-picking the commits that belong to you?

@BroderickCarlin
Copy link

@softdevca is this PR still being worked on? If this just needs a rebase + cherrypick I'm happy to help to get this pushed over the line

@softdevca
Copy link
Contributor Author

softdevca commented Nov 17, 2021 via email

@BroderickCarlin
Copy link

@softdevca would you be able to provide me with push permissions to your fork/branch? That should allow us to not have to open a whole new PR

@softdevca
Copy link
Contributor Author

@softdevca would you be able to provide me with push permissions to your fork/branch? That should allow us to not have to open a whole new PR

Invite sent - thanks again.

@BroderickCarlin
Copy link

@softdevca @wing328 the rebase was cleaned up and the PR should be ready for a final review

@wing328
Copy link
Member

wing328 commented Nov 24, 2021

Tested with updated samples locally and the result is good

warning: `petstore-reqwest-async` (lib) generated 1 warning
warning: `petstore-hyper` (lib) generated 2 warnings
    Finished dev [unoptimized + debuginfo] target(s) in 2.08s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.722 s
[INFO] Finished at: 2021-11-24T17:05:36+08:00
[INFO] ------------------------------------------------------------------------

I consider this a security fix to hyper (https://www.cvedetails.com/vulnerability-list/vendor_id-17878/Hyper.html) so that we can merge this into master (upcoming v5.3.1 is a patch release)

@wing328 wing328 added this to the 5.3.1 milestone Nov 24, 2021
@wing328 wing328 merged commit d01ad05 into OpenAPITools:master Nov 24, 2021
@wing328
Copy link
Member

wing328 commented Nov 24, 2021

FYI. Samples updated via 962e8c4

@softdevca
Copy link
Contributor Author

Thanks for the assistance while other tasks took priority - appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REQ] Upgrade Hyper/packages in Rust Client
3 participants