Skip to content

Remove Resolution trait #606

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

Merged
merged 7 commits into from
Aug 13, 2020
Merged

Remove Resolution trait #606

merged 7 commits into from
Aug 13, 2020

Conversation

zaharidichev
Copy link
Member

This PR removes the Resolution and replaces it with a TryStream<Ok = Update<Endpoint>, Error>. This will allow us to treat any resolution as a normal Stream and as a consequence make it easier to transition state machine based stream implementations to using async-stream.

In addition a ResolutionStreamExt trait is defined that abstracts away the fact that we expect this stream to never end (i.e. should never return None)

Signed-off-by: Zahari Dichev [email protected]

@zaharidichev zaharidichev requested a review from a team July 23, 2020 09:13
@olix0r
Copy link
Member

olix0r commented Jul 23, 2020

I think we probably aught to just let the resolution end rather than panic. And I don't think we need to lift the end-of-stream to a grpc error... and then I would probably avoid the Ext trait.

@zaharidichev zaharidichev force-pushed the zd/remove-resolution-trait branch from e64844f to e697da4 Compare July 24, 2020 11:25
@zaharidichev
Copy link
Member Author

@olix0r Understood. I made the requested changes

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.

Looks like this still needs main merged, but the changes look good.

@zaharidichev zaharidichev force-pushed the zd/remove-resolution-trait branch from e697da4 to fa3c340 Compare July 28, 2020 17:51
@zaharidichev
Copy link
Member Author

@kleimkuhler just rebased

@hawkw
Copy link
Contributor

hawkw commented Jul 29, 2020

@zaharidichev it looks like a bunch of the integration tests are now failing at this expect:

match ready!(this.discover.poll_discover(cx))
.expect("XXX(eliza): can this ever be none???")

which was written under the assumption that Discover streams would be terminated by errors rather than Nones.

@zaharidichev zaharidichev force-pushed the zd/remove-resolution-trait branch from 4c7e488 to 4b049f0 Compare August 7, 2020 11:35
Signed-off-by: Zahari Dichev <[email protected]>
Signed-off-by: Zahari Dichev <[email protected]>
Signed-off-by: Zahari Dichev <[email protected]>
Signed-off-by: Zahari Dichev <[email protected]>
Signed-off-by: Zahari Dichev <[email protected]>
@zaharidichev zaharidichev force-pushed the zd/remove-resolution-trait branch from 4b049f0 to c52a1f7 Compare August 7, 2020 12:03
Signed-off-by: Zahari Dichev <[email protected]>
@zaharidichev zaharidichev force-pushed the zd/remove-resolution-trait branch from d79d144 to e941ec9 Compare August 9, 2020 19:30
@olix0r olix0r merged commit 5a3c563 into main Aug 13, 2020
@olix0r olix0r deleted the zd/remove-resolution-trait branch August 13, 2020 00:06
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Aug 26, 2020
This release includes internal changes to the service discovery system,
especially when discovering control plane components (like the
destination and identity controllers). Now, the proxy attempts to
balance requests across all pods in each control plane service. This
requires control plane changes to use "headless" services so that SRV
records are exposed. When the control plane services have a `clusterIP`
set, the proxy falls back to using normal A-record lookups.

---

* tracing: add richer verbose spans to http clients (linkerd/linkerd2-proxy#622)
* trace: update tracing dependencies (linkerd/linkerd2-proxy#623)
* Remove `Resolution` trait (linkerd/linkerd2-proxy#606)
* Update proxy-identity to edge-20.8.2 (linkerd/linkerd2-proxy#627)
* Add build arg for skipping identity wrapper (linkerd/linkerd2-proxy#624)
* Wait for proxy thread to terminate in integration tests (linkerd/linkerd2-proxy#625)
* Remove scrubbing for unused headers (linkerd/linkerd2-proxy#628)
* Split orig-proto tests out of discovery tests (linkerd/linkerd2-proxy#629)
* Re-enable outbound timeout test (linkerd/linkerd2-proxy#630)
* profiles: perform profile resolution for IP addresses (linkerd/linkerd2-proxy#626)
* Move resolve api to async-stream (linkerd/linkerd2-proxy#599)
* Decouple discovery buffering from endpoint conversion (linkerd/linkerd2-proxy#631)
* resolve: Add a Reset state (linkerd/linkerd2-proxy#633)
* resolve: Eagerly fail resolutions (linkerd/linkerd2-proxy#634)
* test: replace `net2` dependency with `socket2` (linkerd/linkerd2-proxy#635)
* dns: Run DNS resolutions on the main runtime (linkerd/linkerd2-proxy#637)
* Load balance requests to the control plane (linkerd/linkerd2-proxy#594)
* Unify control plane client construction (linkerd/linkerd2-proxy#638)
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Aug 26, 2020
This release includes internal changes to the service discovery system,
especially when discovering control plane components (like the
destination and identity controllers). Now, the proxy attempts to
balance requests across all pods in each control plane service. This
requires control plane changes to use "headless" services so that SRV
records are exposed. When the control plane services have a `clusterIP`
set, the proxy falls back to using normal A-record lookups.

---

* tracing: add richer verbose spans to http clients (linkerd/linkerd2-proxy#622)
* trace: update tracing dependencies (linkerd/linkerd2-proxy#623)
* Remove `Resolution` trait (linkerd/linkerd2-proxy#606)
* Update proxy-identity to edge-20.8.2 (linkerd/linkerd2-proxy#627)
* Add build arg for skipping identity wrapper (linkerd/linkerd2-proxy#624)
* Wait for proxy thread to terminate in integration tests (linkerd/linkerd2-proxy#625)
* Remove scrubbing for unused headers (linkerd/linkerd2-proxy#628)
* Split orig-proto tests out of discovery tests (linkerd/linkerd2-proxy#629)
* Re-enable outbound timeout test (linkerd/linkerd2-proxy#630)
* profiles: perform profile resolution for IP addresses (linkerd/linkerd2-proxy#626)
* Move resolve api to async-stream (linkerd/linkerd2-proxy#599)
* Decouple discovery buffering from endpoint conversion (linkerd/linkerd2-proxy#631)
* resolve: Add a Reset state (linkerd/linkerd2-proxy#633)
* resolve: Eagerly fail resolutions (linkerd/linkerd2-proxy#634)
* test: replace `net2` dependency with `socket2` (linkerd/linkerd2-proxy#635)
* dns: Run DNS resolutions on the main runtime (linkerd/linkerd2-proxy#637)
* Load balance requests to the control plane (linkerd/linkerd2-proxy#594)
* Unify control plane client construction (linkerd/linkerd2-proxy#638)
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.

4 participants