grpc/service_config: make LB config parsing produce non-optional value - #2840
Open
arjan-bal wants to merge 2 commits into
Open
grpc/service_config: make LB config parsing produce non-optional value#2840arjan-bal wants to merge 2 commits into
arjan-bal wants to merge 2 commits into
Conversation
arjan-bal
marked this pull request as draft
August 27, 2026 18:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change updates
LbConfigSerdeparsing to return a non-optional value, simplifying its use for load balancers that require a child configuration. Consequently, theload_balancing_configfield inServiceConfigSerdeis now optional.Since
load_balancing_configis arepeatedfield in the Protobuf definition, and Protobuf cannot differentiate between an unset repeated field and an empty list, a helper functiondeserialize_load_balancing_configis used to parse this optional field and treat an empty list asNone. This avoids parsing errors and enables falling back to the deprecatedload_balancing_policyfield if it is set.