bes: Allow additional headers to be passed to the server.#13812
Closed
benjaminp wants to merge 1 commit intobazelbuild:masterfrom
Closed
bes: Allow additional headers to be passed to the server.#13812benjaminp wants to merge 1 commit intobazelbuild:masterfrom
benjaminp wants to merge 1 commit intobazelbuild:masterfrom
Conversation
7a6d5a9 to
5bc2068
Compare
lfpino
reviewed
Aug 9, 2021
| T stub, @Nullable CallCredentials callCredentials, @Nullable ClientInterceptor interceptor) { | ||
| stub = callCredentials != null ? stub.withCallCredentials(callCredentials) : stub; | ||
| stub = interceptor != null ? stub.withInterceptors(interceptor) : stub; | ||
| return stub; |
Contributor
There was a problem hiding this comment.
What happens if both callCredentials and interceptor are present? Is that possible?
Collaborator
Author
There was a problem hiding this comment.
The stub should be wrapped by with call-credentials and then the header interceptor.
lfpino
approved these changes
Aug 10, 2021
Contributor
michaeledgar
left a comment
There was a problem hiding this comment.
Thanks for sending this pull request - the functionality makes sense and looks good!
I just have a couple of cleanups to suggest before merging.
There is already a --remote_header option that passes extra headers to the remote cache and executor. This revision allows extra headers to be passed along to a BES server with the --bes_header option. RELNOTES[NEW]: Add `--bes_header` flag to pass extra headers to the BES server.
bazel-io
pushed a commit
that referenced
this pull request
Aug 17, 2021
With this refactoring, the `BuildEventServiceGrpcClient` is not concerned with interpreting command-line options and can operate purely on gRPC domain objects. The `BazelBuildEventServiceModule` is responsible for preparing the domain objects from the command-line options. This refactoring was requested but skipped during PR #13812 because the BazelBuildEventServiceModuleTest was not yet open-sourced. Now that the test is open-sourced we can more easily separate (and test) these concerns. PiperOrigin-RevId: 391347857
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.
There is already a --remote_header option that passes extra headers to the remote cache and executor. This revision allows extra headers to be passed along to a BES server with the --bes_header option.
RELNOTES[NEW]: Add
--bes_headerflag to pass extra headers to the BES server.