Conversation
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]>
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]>
olix0r
reviewed
Sep 15, 2020
Signed-off-by: Eliza Weisman <[email protected]>
olix0r
requested changes
Sep 16, 2020
Member
olix0r
left a comment
There was a problem hiding this comment.
Tests look great. Some superficial feedback
|
|
||
| pub use futures::{future, FutureExt, TryFuture, TryFutureExt}; | ||
|
|
||
| pub use linkerd2_app_core::{self as app_core, Addr, Error}; |
Member
There was a problem hiding this comment.
just call this core? or are there other cores we should be aware of?
Contributor
Author
There was a problem hiding this comment.
IIRC it clashed with libcore. will double check if this is the case.
Contributor
Author
There was a problem hiding this comment.
yup:
error[E0659]: `core` is ambiguous (name vs any other name during import resolution)
--> linkerd/app/outbound/src/tests.rs:12:9
|
12 | use core::{
| ^^^^ ambiguous name
|
= note: `core` could refer to a built-in crate
= help: use `::core` to refer to this crate unambiguously
note: `core` could also refer to the crate imported here
--> linkerd/app/outbound/src/tests.rs:3:25
|
3 | use linkerd2_app_core::{self as core, metrics::Metrics, Addr};
| ^^^^^^^^^^^^
= help: use `self::core` to refer to this crate unambiguously
error: aborting due to previous error
Co-authored-by: Oliver Gould <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
olix0r
approved these changes
Sep 16, 2020
kleimkuhler
approved these changes
Sep 16, 2020
linkerd/app/test/src/resolver.rs
Outdated
| atomic::{AtomicBool, Ordering}, | ||
| Arc, Mutex, | ||
| }; | ||
| // use std::future::Future; |
linkerd/app/test/src/resolver.rs
Outdated
| use std::net::SocketAddr; | ||
| use std::task::{Context, Poll}; | ||
| use tokio::sync::mpsc; | ||
| // use tower::Service; |
Signed-off-by: Eliza Weisman <[email protected]>
olix0r
added a commit
to linkerd/linkerd2
that referenced
this pull request
Sep 18, 2020
This release fixes a recent regression in multicluster gateway configurations that would forbid inbound gateway traffic. It also fixes URI normalization for orig-proto-upgrade requests that do not include a `Host` header. --- * http: Simplify stacks and target types (linkerd/linkerd2-proxy#656) * Make SkipDetect more generic as stack::MakeSwitch (linkerd/linkerd2-proxy#657) * introduce tests for isolated services (linkerd/linkerd2-proxy#655) * http: Put normalize_uri back on the stack (linkerd/linkerd2-proxy#659) * inbound: Apply loop detection on the connect stack (linkerd/linkerd2-proxy#660) * tracing: Elide redundant info in tracing contexts (linkerd/linkerd2-proxy#661) * outbound: Reorganize outbound stacks (linkerd/linkerd2-proxy#662) * app: Decouple stacks from listeners (linkerd/linkerd2-proxy#663) * inbound: Split HTTP detection stack from TLS (linkerd/linkerd2-proxy#664) * integration: Bundle tests in src (linkerd/linkerd2-proxy#665)
olix0r
added a commit
to linkerd/linkerd2
that referenced
this pull request
Sep 19, 2020
This release fixes a recent regression in multicluster gateway configurations that would forbid inbound gateway traffic. It also fixes URI normalization for orig-proto-upgrade requests that do not include a `Host` header. --- * http: Simplify stacks and target types (linkerd/linkerd2-proxy#656) * Make SkipDetect more generic as stack::MakeSwitch (linkerd/linkerd2-proxy#657) * introduce tests for isolated services (linkerd/linkerd2-proxy#655) * http: Put normalize_uri back on the stack (linkerd/linkerd2-proxy#659) * inbound: Apply loop detection on the connect stack (linkerd/linkerd2-proxy#660) * tracing: Elide redundant info in tracing contexts (linkerd/linkerd2-proxy#661) * outbound: Reorganize outbound stacks (linkerd/linkerd2-proxy#662) * app: Decouple stacks from listeners (linkerd/linkerd2-proxy#663) * inbound: Split HTTP detection stack from TLS (linkerd/linkerd2-proxy#664) * integration: Bundle tests in src (linkerd/linkerd2-proxy#665)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch introduces a new style of tests to the proxy codebase, and
an initial implementation of new test support code for writing tests in
this style. Rather than running an entire proxy alongside a simulated
control plane, and binding actual network socket, as the present
integration tests do, the new tests run individual proxy components in
isolation, using simpler mock implementations of components like name
resolution and IO.
This approach has a few advantages. It should reduce flakiness
significantly, since we don't perform any IO and don't need to
synchronize events between multiple threads running test support
servers/controllers (the new mocks all just synchronously provide values
immediately). We can run everything in a single thread using Tokio's
basic scheduler. Additionally, since we are testing individual
components in isolation, these tests can live within the crate for the
part of the proxy being tested. This means we have access to more
internal state to make assertions on, rather than having to make
assertions on side effects like metrics.
I've added a new
linkerd2-app-testcrate that adds some initial mocksfor this kind of testing, including a simple mock resolver and a mock
connector using
tokio-test's mock IO. I've also added a simple "helloworld" test for the outbound TCP stack written in this style. The
intention is to use the new test support code for testing the recent
changes adding TCP mTLS and load-balancing.
In order to make this code more testable, it was necessary to move a few
things around. In particular, the outbound TCP balancer stack is now
constructed in a separate method, rather than in
Config::build_server,so that it can be tested without requiring all the dependencies of the
full HTTP server stack. A few other similar changes were also necessary.
Signed-off-by: Eliza Weisman [email protected]