Skip to content

grpc/service_config: make LB config parsing produce non-optional value - #2840

Open
arjan-bal wants to merge 2 commits into
grpc:masterfrom
arjan-bal:lb-config-optional
Open

grpc/service_config: make LB config parsing produce non-optional value#2840
arjan-bal wants to merge 2 commits into
grpc:masterfrom
arjan-bal:lb-config-optional

Conversation

@arjan-bal

@arjan-bal arjan-bal commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

This change updates LbConfigSerde parsing to return a non-optional value, simplifying its use for load balancers that require a child configuration. Consequently, the load_balancing_config field in ServiceConfigSerde is now optional.

Since load_balancing_config is a repeated field in the Protobuf definition, and Protobuf cannot differentiate between an unset repeated field and an empty list, a helper function deserialize_load_balancing_config is used to parse this optional field and treat an empty list as None. This avoids parsing errors and enables falling back to the deprecated load_balancing_policy field if it is set.

@arjan-bal arjan-bal added C-cleanup Category: PRs that clean code up or issues documenting cleanup. A-grpc-next labels Aug 27, 2026
@arjan-bal arjan-bal changed the title grpc/service_config: Make LB config parsing produce non-optional value grpc/service_config: make LB config parsing produce non-optional value Aug 27, 2026
@arjan-bal
arjan-bal marked this pull request as draft August 27, 2026 18:40
@arjan-bal
arjan-bal marked this pull request as ready for review August 27, 2026 20:29
@arjan-bal
arjan-bal requested a review from dfawley August 27, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-grpc-next C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants