Repository navigation
api, xds: Move weighted_target's locality attribute to NameResolver - #13217
Open
shivaspeaks wants to merge 1 commit into
Open
shivaspeaks wants to merge 1 commit into
shivaspeaks wants to merge 1 commit into
Conversation
sauravzg
requested changes
Dec 3, 2026
sauravzg
left a comment
Contributor
There was a problem hiding this comment.
I think this is worth a discussion.
I am not convinced about adding an internal attribute to a public class which doesn't have any other internal attributes.
Our attributes are sprayed across the board in LoadBalancer, NameResolver, EAG and GrpcAttributes.
At a first look, I tend to lean towards internal version of GrpcAttributes since that doesn't leak at all into any public class at all.
@kannanjgithub Do you know the correct place to add this attribute which is supposed to be populated by the weighted target lb policy?
This branch has not been deployed
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.
The autosharding LB policy (gRFC A119, #13039) needs it: it replaces
%sinautosharding_targetwith the "Locality" attribute set byweighted_targetand since autosharding cannot depend on xds we need to move it.Placing the Attribute
ATTR_LOCALITYinNameResolver.javabecause looking at the historyATTR_BACKEND_SERVICEwas also moved to NameResolver (#11990).