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

clusterimpl: use gsb.UpdateClientConnState instead of switchTo, on receipt of config update #7567

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

aranjans
Copy link
Contributor

@aranjans aranjans commented Aug 28, 2024

#7210 talks about not using deprecated APIs in the gracefulswitch.Balancer while switching the child policy on reciept of configuration update of clusterimpl. This PR makes the required changes for the same.

RELEASE NOTES:

  • clusterimpl: use gsb.UpdateClientConnState instead of switchTo, on receipt of config update

@aranjans aranjans added the Type: Internal Cleanup Refactors, etc label Aug 28, 2024
@aranjans aranjans added this to the 1.67 Release milestone Aug 28, 2024
Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@ac41314). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #7567   +/-   ##
=========================================
  Coverage          ?   81.94%           
=========================================
  Files             ?      361           
  Lines             ?    27818           
  Branches          ?        0           
=========================================
  Hits              ?    22795           
  Misses            ?     3837           
  Partials          ?     1186           
Files with missing lines Coverage Δ
xds/internal/balancer/clusterimpl/clusterimpl.go 90.61% <100.00%> (ø)

@aranjans aranjans force-pushed the stop_using_switchTo_clusterimpl branch 2 times, most recently from 6b07deb to 0f5b421 Compare August 28, 2024 11:10
@aranjans aranjans force-pushed the stop_using_switchTo_clusterimpl branch 5 times, most recently from 0c2482c to 51d0d75 Compare August 29, 2024 06:47
@aranjans aranjans assigned purnesh42H and unassigned aranjans Aug 29, 2024
xds/internal/balancer/clusterimpl/clusterimpl.go Outdated Show resolved Hide resolved
xds/internal/balancer/clusterimpl/clusterimpl.go Outdated Show resolved Hide resolved
xds/internal/balancer/clusterimpl/clusterimpl.go Outdated Show resolved Hide resolved
xds/internal/balancer/clusterimpl/clusterimpl.go Outdated Show resolved Hide resolved
xds/internal/balancer/clusterimpl/balancer_test.go Outdated Show resolved Hide resolved
@aranjans aranjans assigned easwars and unassigned purnesh42H and aranjans Sep 5, 2024
@aranjans aranjans force-pushed the stop_using_switchTo_clusterimpl branch from 943294d to 07b3fd9 Compare September 5, 2024 06:12
xds/internal/balancer/clusterimpl/balancer_test.go Outdated Show resolved Hide resolved
xds/internal/balancer/clusterimpl/balancer_test.go Outdated Show resolved Hide resolved
xds/internal/balancer/clusterimpl/balancer_test.go Outdated Show resolved Hide resolved
xds/internal/balancer/clusterimpl/balancer_test.go Outdated Show resolved Hide resolved
xds/internal/balancer/clusterimpl/balancer_test.go Outdated Show resolved Hide resolved
@easwars easwars assigned purnesh42H and aranjans and unassigned easwars and purnesh42H Sep 5, 2024
@aranjans aranjans assigned easwars and unassigned aranjans Sep 6, 2024
@easwars easwars removed their assignment Sep 9, 2024
@purnesh42H purnesh42H modified the milestones: 1.67 Release, 1.68 Release Sep 10, 2024
@aranjans aranjans assigned easwars and unassigned aranjans Sep 11, 2024
@aranjans aranjans force-pushed the stop_using_switchTo_clusterimpl branch from 842c3d8 to 60a5a8e Compare September 11, 2024 07:06
@aranjans aranjans assigned dfawley and unassigned easwars Sep 18, 2024
@easwars
Copy link
Contributor

easwars commented Sep 18, 2024

@aranjans : Could you please handle any open comments here. Thanks.

Comment on lines +245 to +253
// Build config for the gracefulswitch balancer. It is safe to ignore JSON
// marshaling errors here, since the config was already validated as part of
// ParseConfig().
cfg := []map[string]any{{newConfig.ChildPolicy.Name: newConfig.ChildPolicy.Config}}
cfgJSON, _ := json.Marshal(cfg)
parsedCfg, err := gracefulswitch.ParseConfig(cfgJSON)
if err != nil {
return err
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm... actually what is the reason for moving this block to be done after handling telemetry labels and drop/request counts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants