Skip to content

Conversation

@dfawley
Copy link
Member

@dfawley dfawley commented Aug 9, 2023

  • gracefulswitch_test: make UpdateSubConnState error if called, and do that behavior directly in the StateListeners
  • stub: delete UpdateSubConnState field, which requires all tests that use it to use StateListeners now (all migrated before this PR; requires balancer/weightedtarget: stop forwarding UpdateSubConnState calls #6525, included here as a separate commit).

RELEASE NOTES: none

@dfawley dfawley added this to the 1.58 Release milestone Aug 9, 2023
@dfawley dfawley requested a review from zasweq August 9, 2023 22:34
Copy link
Contributor

@zasweq zasweq left a comment

Choose a reason for hiding this comment

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

LGTM.

opts.StateListener = func(state balancer.SubConnState) { vb.UpdateSubConnState(sc, state) }
opts.StateListener = func(state balancer.SubConnState) {
if vb.closed.HasFired() {
vb.t.Fatalf("UpdateSubConnState(%+v) was called after Close(), which breaks the balancer API", state)
Copy link
Contributor

Choose a reason for hiding this comment

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

Update the error message.

Copy link
Member Author

Choose a reason for hiding this comment

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

Whoops. Done.

@zasweq zasweq assigned dfawley and unassigned zasweq Aug 9, 2023
@dfawley dfawley merged commit 68704f8 into grpc:master Aug 10, 2023
@dfawley dfawley deleted the UpdateSCS branch August 10, 2023 19:07
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants