Skip to content

turn inbound proxy back into a proxy#516

Merged
hawkw merged 12 commits intomaster-tokio-0.2from
eliza/0.2-actual-proxy
May 18, 2020
Merged

turn inbound proxy back into a proxy#516
hawkw merged 12 commits intomaster-tokio-0.2from
eliza/0.2-actual-proxy

Conversation

@hawkw
Copy link
Contributor

@hawkw hawkw commented May 14, 2020

Now that the HTTP connect- and accept-side machinery has all been
updated to use std::future, we can start turning the proxy back
into...a proxy. This branch does so on the inbound side. Much of the
actual functionality (approximately everything not directly required to
actually proxy requests) is still disabled, as a lot of the code still
needs to be updated.

I had to make a few additional changes in order to get the proxy to
compile, primarily to deal with trait bounds on Service impls that
were no longer satisfied as a result of changes made to update other
parts of the codebase. I also disabled two more of the transparency
integration tests, both of which tested whether the proxy stripped
connection-level headers from proxied requests. Previously, these were
passing "accidentally" — because the proxy was replaced with a HTTP
server that just responded to every request with an empty 200 OK
response, the headers were, of course, not present. Now that we're
actually proxying requests, these tests fail, because the code for
stripping headers has yet to be updated.

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

@hawkw
Copy link
Contributor Author

hawkw commented May 14, 2020

this compiles but there appear to be some (new!) test failures, which is cool and fun!

hawkw added a commit that referenced this pull request May 14, 2020
It turns out that most of the tests that can be re-enabled as a result
of #516 expect URIs to be normalized.

Therefore, I ported the `normalize_uri` layer to std::future. This is
a pretty mechanical translation.

Signed-off-by: Eliza Weisman <[email protected]>
hawkw added a commit that referenced this pull request May 14, 2020
It turns out that most of the tests that can be re-enabled as a result
of #516 expect URIs to be normalized.

Therefore, I ported the `normalize_uri` layer to std::future. This is
a pretty mechanical translation.

Signed-off-by: Eliza Weisman <[email protected]>
hawkw added 10 commits May 14, 2020 14:10
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]>
Signed-off-by: Eliza Weisman <[email protected]>
@hawkw hawkw force-pushed the eliza/0.2-actual-proxy branch from 39a3fb5 to 1755e2d Compare May 14, 2020 22:08
@hawkw hawkw marked this pull request as ready for review May 14, 2020 22:47
@hawkw hawkw changed the title [DRAFT] turn inbound proxy back into a proxy turn inbound proxy back into a proxy May 14, 2020
@hawkw hawkw requested review from a team and olix0r May 14, 2020 22:47
Copy link
Member

@olix0r olix0r left a comment

Choose a reason for hiding this comment

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

No hard blockers. Especially curious about the connection transport though.

hawkw added 2 commits May 15, 2020 08:49
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
@hawkw hawkw requested a review from a team May 17, 2020 21:28
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 hawkw merged commit 7d208ef into master-tokio-0.2 May 18, 2020
hawkw added a commit that referenced this pull request May 26, 2020
This branch turns the outbound side of the proxy back into a real proxy,
similarly to what #516 did for the inbound side. Getting outbound to
work again was somewhat more complex, since the outbound side also
requires the load balancer (and, therefore, discovery). In order to get
this all working, it was also necessary to update the
`linkerd2-request-filter` crate (which was quite trivial), as it's
necessary for the resolver to work, and to make some changes in the
resolver so that all trait bounds were satisfied.

In addition, now that both inbound and outbound work, we're now able
to re-enable a large amount of the integration tests in the 
`transparency` and `discovery` modules. Some of these tests are still
disabled, as they either depend on service profiles, HTTP upgrades and
orig-proto, or header maniuplation, all of which have yet to be 
updated.

Signed-off-by: Eliza Weisman <[email protected]>
@olix0r olix0r deleted the eliza/0.2-actual-proxy 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