-
Notifications
You must be signed in to change notification settings - Fork 3.9k
binder: Pre-factor out the guts of the BinderClientTransport handshake. #12292
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
Open
jdcormie
wants to merge
31
commits into
grpc:master
Choose a base branch
from
jdcormie:isolated-process-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
c11f45d
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie 8486ac1
don't rename binder
jdcormie efd855f
ComponentName
jdcormie 68535c1
Merge branch 'master' into isolated-process-2
jdcormie 80eee58
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie 6fd88de
Merge branch 'isolated-process-2' of https://github.com/jdcormie/grpc…
jdcormie 643144c
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie aedc3bc
ComponentName
jdcormie 6c73cca
Merge remote-tracking branch 'origin/master' into isolated-process-2
jdcormie ddf4f2f
Merge branch 'master' of https://github.com/grpc/grpc-java into isola…
jdcormie c208ab3
factor out the decorate() and wrap() calls common to all handshakes
jdcormie a5a6057
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie 0400204
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie 1bb363c
don't rename binder
jdcormie d77c6f5
ComponentName
jdcormie 1cfb40b
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie beb8f6e
ComponentName
jdcormie 3baa4b9
factor out the decorate() and wrap() calls common to all handshakes
jdcormie 24e3ba1
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie 9ff81d9
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie 72024df
ComponentName
jdcormie 0e2e9bc
Pre-factor out the guts of the BinderClientTransport handshake
jdcormie b60b721
ComponentName
jdcormie 883e471
factor out the decorate() and wrap() calls common to all handshakes
jdcormie 9e86b35
Merge branch 'isolated-process-2' of https://github.com/jdcormie/grpc…
jdcormie 1896db3
Merge remote-tracking branch 'refs/remotes/origin/isolated-process-2'…
jdcormie 25df7e8
fix imports
jdcormie 9711907
Merge branch 'grpc:master' into isolated-process-2
jdcormie 2086335
interface -> abstract class
jdcormie d53fe91
sync comments
jdcormie 01f46c7
address review comments
jdcormie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the plans for the next PR, but it seems like
authResultFuture
is never used by the parent class anymore except during cancellation.It feels a bit weird to see one class setting another one's fields, even if they are nested. Could we move
authResultFuture
into this one and add acancel
method toClientHandshake
?Ditto possibly for
attributes
; couldn't fully track all the places where it is used.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other ClientHandshake impl will also need to set and potentially cancel
authResultFuture
so I'd like to keep this member in some shared location. Fortunately I expect this issue will be going away soon with my proposed fix for #12283 (jdcormie@d0bcf4b). LMK if that would be satisfactory.As for
attributes
, deciding how and when to update the transport attributes with the peer's UID is one of the core responsibilities of ClientHandshake. As I mentioned in the other comment, the relationship between BinderClientTransport and the ClientHandshake impls is intentionally intimate. My goal withClientHandshake
isn't actually to create an arm's length relationship with the transport, rather it's just to avoid writingif (flag) { /* v1 */ } else { /* v2 */}
all over the place. LMK if you feel strongly and/or suggest a different approach.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re: "plans for the next PR" I just uploaded it as #12398. However, I recommend reviewing it as CR/814340095 which will let you ignore the diffbase (CR/808247923).
The critique view of this PR (CR/808247923) also does a much better job of showing how this PR is really just moving code around without changing it.