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

Let AndroidComponentAddress specify a target UserHandle #11670

Merged
merged 9 commits into from
Nov 19, 2024

Conversation

jdcormie
Copy link
Member

@jdcormie jdcormie commented Nov 6, 2024

The target UserHandle is best modeled as part of the SocketAddress since it's part of the server's location.

This change allows a NameResolver to select different target users over time within a single Channel.

Copy link
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

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

I know this is draft, but a few drive-by comments. Looks fair.

@jdcormie jdcormie added the kokoro:force-run Add this label to a PR to tell Kokoro to re-run all tests. Not generally necessary label Nov 11, 2024
@grpc-kokoro grpc-kokoro removed the kokoro:force-run Add this label to a PR to tell Kokoro to re-run all tests. Not generally necessary label Nov 11, 2024
@jdcormie jdcormie marked this pull request as ready for review November 13, 2024 20:34
@jdcormie jdcormie merged commit e58c998 into grpc:master Nov 19, 2024
14 of 15 checks passed
@wwtbuaa01
Copy link
Contributor

@ejona86 This change LGTM.

Discussed with John offline for this change.

Making the target UserHandle as part of the AndroidComponentAddress makes sense for two reasons:

  1. More and more OEM privileged applications (Google 1P applications internally) are onboarding with X-user usages, and all of them are only specifying target userHandle with INTERACT_ACROSS_USERS privilege permission pre-granted.
  2. Currently, optimization for channel creation is done in Google internal codebase. After this change, NameResolver + AndroidComponentAddress.getTargetUser can be utilized by other codebase, such as Android system image.

@jdcormie
Copy link
Member Author

Thanks Wentao!

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

Successfully merging this pull request may close these issues.

4 participants