Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

gracefulswitch, stub: remove last UpdateSubConnState references #6533

Merged
merged 3 commits into from
Aug 10, 2023

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
1 check passed
@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
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants