-
Notifications
You must be signed in to change notification settings - Fork 3.4k
hubble-relay: refactor deprecated call to grpc.DialContext #36027
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
hubble-relay: refactor deprecated call to grpc.DialContext #36027
Conversation
5c4ffba
to
9237203
Compare
I'm a bit unsure of the attempts to retain previous behavior regarding connecting to peers eagerly, though I'm still looking at the options we have available. I'm also a bit concerned about the fact that I'm also not sure if this is true:
Because at least in some areas it's reporting the underlying connection state, so it would report idle in that case, until an RPC is made. Can you clarify what you mean? Perhaps you could show what |
My bad, I actually meant connected as in the conn being set on the peer struct from manager.connect() and the log statement "connected" emitted for the peer. I felt this could be semi-lying compared to the previous impl where we would fail right away. But I just looked at the observer server, and it does filter on the state, and I guess the peer will correctly report a failed state on first rpc and be filtered out? I think I'll move this back to draft and play a bit with this plus update/add tests to see how it behaves. |
acaa1b7
to
39919d3
Compare
Alright I must admit I made my life more difficult for no reason. I updated the PR and removed the WaitForReady logic which after testing does not seem necessary at all. |
/test |
39919d3
to
0628988
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a little docs comment
Can you provide the output before/after first RPC? |
It says connected for all peers regardless if an RPC has been made or not. I also tested with hubble how it reacts when a hubble peer disappears:
|
0628988
to
c148f6f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sig-k8s LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @devodev 👍
Overall patch LGTM but I'll rather keep the CLI flag, see my comment on the serve.go
file.
c148f6f
to
bcc0033
Compare
Hmm, I was hoping it would report "idle" or "unknown" until we've actually established a connection, after which it would report Connected/Unavailable. Upon investigation, it looks liket it sets the state to |
bcc0033
to
eed7b1d
Compare
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/test |
Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
28c2bbe
to
10e28c9
Compare
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @devodev, patch LGTM now. Please open an issue to address the upcoming removal of both the .Values.hubble.relay.dialTimeout
Helm value along with the --dial-timeout
flag of Hubble Relay so we don't forget about them.
This PR replaces deprecated calls to
grpc.DialContext
withgrpc.NewClient
. It also removes the--dial-timeout
flag from the CLI and deprecates thehubble.relay.dialTimeout
in the Helm chart.Rework of: #34261
Fixes: #33065
Fixes: #36070