Skip to content

update service profiles to std::future#537

Merged
hawkw merged 16 commits intomaster-tokio-0.2from
eliza/0.2-profiles
May 29, 2020
Merged

update service profiles to std::future#537
hawkw merged 16 commits intomaster-tokio-0.2from
eliza/0.2-profiles

Conversation

@hawkw
Copy link
Contributor

@hawkw hawkw commented May 27, 2020

This branch updates the service profiles controller client and stack
layers to std::future, and puts service profiles back in the outbound
and inbound stacks. Retries do not actually happen yet because the retry
code hasn't been updated.

All of the tests for profile destination overrides can now be
re-enabled. In addition, some of the the tests in profiles.rs could
also be re-enabled, with the exception of the ones that actually expect
retries to happen.

Depends on #536.

Signed-off-by: Eliza Weisman [email protected]

@hawkw hawkw requested review from a team, adleong and olix0r May 27, 2020 21:31
@hawkw hawkw self-assigned this May 27, 2020
@hawkw hawkw force-pushed the eliza/0.2-profiles branch from 89fabde to a663c50 Compare May 27, 2020 22:11
Copy link
Contributor

@kleimkuhler kleimkuhler left a comment

Choose a reason for hiding this comment

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

👍

hawkw added 15 commits May 29, 2020 10:32
turns out this is just un-commenting it

Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
retries don't actually happen yet

Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
@hawkw hawkw force-pushed the eliza/0.2-profiles branch from c3eda25 to 6990ca6 Compare May 29, 2020 17:42
Signed-off-by: Eliza Weisman <[email protected]>
@hawkw hawkw merged commit 6e1a641 into master-tokio-0.2 May 29, 2020
hawkw added a commit that referenced this pull request May 29, 2020
This PR updates everything remaining in the `linkerd2-proxy-http` crate
to use `std::future`. In particular, this includes the following
modules:

* `add_header`
* `insert`
* `override_authority`
* `header_from_target`

The updates for these modules was pretty mechanical and there are no
significant changes, just updates to use the new versions of the
`Future` and `Service` traits.

In addition, I've put back the stack layers from these modules, where
possible (in some cases, these modules were used by other code that has
yet to be updated or is pending in a separate branch). I've also
re-enabled some of the the `discovery` integration tests for the
`linkerd2-dst-override` header. Some of these tests depend on service
profiles as well, so they will be enabled once #537 merges.

Furthermore, I've done a little cleanup now that everything in the crate
has been updated. I removed the `grpc` module entirely. Its only purpose
was converting between the `tower_grpc::Body` and `hyper::Payload`
traits, and `tonic` and the `std::future` version of `hyper` both use
the `http_body::Body` trait, so this conversion is unnecessary. Finally,
since all the code which depended on the old versions of `tokio` and
`futures` has now been updated, I've removed the dependencies on the
legacy versions, and renamed the `futures_03` and `tokio_02` renaming
imports to just `futures` and `tokio`.

Signed-off-by: Eliza Weisman <[email protected]>
hawkw added a commit that referenced this pull request Jun 1, 2020
This branch updates the proxy's retry implementation to work with
`std::future`. Retries in service profiles now work correctly!

Again, nothing too out of the ordinary to see here. 

Depends on #537 

Signed-off-by: Eliza Weisman <[email protected]>
@olix0r olix0r deleted the eliza/0.2-profiles branch May 25, 2021 15:49
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.

3 participants