Skip to content

endpointsharding: Export parsed pickfirst config instead of json string#8007

Merged
arjan-bal merged 1 commit intogrpc:masterfrom
arjan-bal:epsharding-parse-pf-config
Jan 15, 2025
Merged

endpointsharding: Export parsed pickfirst config instead of json string#8007
arjan-bal merged 1 commit intogrpc:masterfrom
arjan-bal:epsharding-parse-pf-config

Conversation

@arjan-bal
Copy link
Copy Markdown
Contributor

@arjan-bal arjan-bal commented Jan 13, 2025

All the users of PickFirstConfig needed to handle parsing errors while using the exported config. This PR exports the parsed config making the usage simpler for users.

RELEASE NOTES:

  • balancer/endpointsharding: The parsed pickfirst load balancer config is exported instead of the load balancer config json.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.04%. Comparing base (aad8a12) to head (390f93f).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
balancer/endpointsharding/endpointsharding.go 40.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8007      +/-   ##
==========================================
- Coverage   82.13%   82.04%   -0.09%     
==========================================
  Files         381      381              
  Lines       38542    38545       +3     
==========================================
- Hits        31655    31626      -29     
- Misses       5575     5599      +24     
- Partials     1312     1320       +8     
Files with missing lines Coverage Δ
balancer/weightedroundrobin/balancer.go 83.47% <ø> (+0.60%) ⬆️
balancer/endpointsharding/endpointsharding.go 76.16% <40.00%> (-1.22%) ⬇️

... and 14 files with indirect coverage changes

@arjan-bal arjan-bal force-pushed the epsharding-parse-pf-config branch from e902bb7 to 390f93f Compare January 13, 2025 12:32
var PickFirstConfig string
var (
// PickFirstConfig is a pick first config without shuffling enabled.
PickFirstConfig serviceconfig.LoadBalancingConfig
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a pubic API change, but the package is experimental. @dfawley should I export a new var instead of replacing the existing one?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should be fine to just change it since it's experimental and very new.

@dfawley dfawley assigned arjan-bal and unassigned dfawley Jan 13, 2025
@arjan-bal arjan-bal merged commit 74ac821 into grpc:master Jan 15, 2025
@arjan-bal arjan-bal deleted the epsharding-parse-pf-config branch January 15, 2025 02:59
janardhanvissa pushed a commit to janardhanvissa/grpc-go that referenced this pull request Jan 26, 2025
janardhanvissa pushed a commit to janardhanvissa/grpc-go that referenced this pull request Feb 13, 2025
janardhanvissa pushed a commit to janardhanvissa/grpc-go that referenced this pull request Feb 13, 2025
janardhanvissa pushed a commit to janardhanvissa/grpc-go that referenced this pull request Feb 15, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants