balancer: remove grpc.lb.pick_first.* metrics#9215
Conversation
…ubchannel metrics
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9215 +/- ##
==========================================
- Coverage 83.33% 83.31% -0.03%
==========================================
Files 420 420
Lines 34028 34021 -7
==========================================
- Hits 28358 28343 -15
- Misses 4253 4257 +4
- Partials 1417 1421 +4
🚀 New features to boost your workflow:
|
|
@mbissa @arjan-bal @Pranjali-2501 @easwars Sorry for pinging everyone like this, but I'd really appreciate it if someone could take a quick look and review this when you have a chance. Thanks! |
| if holds[1].Wait(ctx) != true { | ||
| t.Fatalf("Timeout waiting for server %d with address %q to be contacted", 1, addrs[1]) | ||
| } | ||
| if got, _ := tmr.Metric("grpc.lb.pick_first.connection_attempts_failed"); got != 1 { |
There was a problem hiding this comment.
@mbissa : For all of these removed lines, what was the original plan? Would the pick_first tests continue to track the subchannel metrics or did we plan to have other tests that would track with these metrics?
There was a problem hiding this comment.
The plan was to move the tests to different place which is more apt for subchannel and not keep them in pickfirst.
|
@deepgolani4 can you please move the tests to a separate place in the otel package where we run e2e tests instead of changing just the existing tests. |
@mbissa Moved the OTel e2e metric coverage into stats/opentelemetry/e2e_test.go, and removed the duplicate pickfirst metric tests from balancer/pickfirst. |
easwars
left a comment
There was a problem hiding this comment.
LGTM, modulo one minor nit
| ss := &stubserver.StubServer{ | ||
| EmptyCallF: func(context.Context, *testpb.Empty) (*testpb.Empty, error) { | ||
| return &testpb.Empty{}, nil | ||
| }, | ||
| } | ||
| ss.StartServer() |
There was a problem hiding this comment.
Nit: This could be replaced with a single line call to stubserver.StartTestService
There was a problem hiding this comment.
@deepgolani4 , thanks for the changes - We should no longer be needing this file as practically there are no pick first metrics left. We should move all the relevant tests out and delete metrics_test.go altogether. I think other than that (and the nit that is pointed out by easwars) we are good. Once done, we can merge the changes.
Fixes #8752
The changes remove the three grpc.lb.pick_first.* metric registrations and their recording calls from pickfirst.go (along with the now-unneeded metricsRecorder/target fields), then update all tests and examples to assert on the equivalent grpc.subchannel.* metrics instead.
RELEASE NOTES:
grpc.lb.pick_first.*metrics.