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

Remove ConnClient, it's pointless now #1453

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bleggett
Copy link
Contributor

No description provided.

@bleggett bleggett requested a review from a team as a code owner February 11, 2025 23:50
@istio-testing istio-testing added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 11, 2025
Copy link
Member

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

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

Is there some context on why we want to do this? To me this seems to break the abstraction -- before, the h2 client was just a pure http2 client without Istio-isms. Now we are leaking istio specific pooling semantics into the general h2 client?

@bleggett
Copy link
Contributor Author

bleggett commented Feb 12, 2025

Is there some context on why we want to do this? To me this seems to break the abstraction -- before, the h2 client was just a pure http2 client without Istio-isms. Now we are leaking istio specific pooling semantics into the general h2 client?

Yep, fair - I thought so too (I added ConnClient in the first place I think), but when passing back thru here ConnClient started to look redundant to me.

  • ConnClient does nothing but hold a H2ConnClient and a WorkloadKey.
  • H2ConnClient and ConnClient are both only used internally by the pool in the first place.
  • H2ConnClient is already an Istio-specific client, in the sense that we wrote our own, only we use it, and only in this spot.
  • In the only places we use H2ConnClient, it is a critical invariant that it should be unambiguously tied to a specific WorkloadKey.
  • WorkloadKey isn't really pooling-related, it's just a unique key that identifies the src/dest of the workloads the H2ConnClient is bound to, for its lifespan. The pool builds on the assurance that H2ConnClients are not "multi-tenant" in this sense.

So the tl;dr is that yes, it breaks the abstraction in that it makes H2ConnClient import e.g. Identity and such, but the abstraction itself serves no purpose here, so the ConnClient wrapper is functionally redundant.

Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
@bleggett bleggett force-pushed the bleggett/drop-struct branch from 2a594b0 to e38c81d Compare February 12, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants