-
Notifications
You must be signed in to change notification settings - Fork 68
fix(Spring CodeGen): To only include options to set to rest transport when supported #1078 10000
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
Merged
zhumin8
merged 11 commits into
autoconfig-gen-draft2
from
autoconfig-gen-draft2-transport
Nov 7, 2022
Merged
fix(Spring CodeGen): To only include options to set to rest transport when supported #1078
zhumin8
merged 11 commits into
autoconfig-gen-draft2
from
autoconfig-gen-draft2-transport
Nov 7, 2022
Conversation
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
…f Transport.GRPC_REST.
diegomarquezp
approved these changes
Nov 1, 2022
emmileaf
reviewed
Nov 1, 2022
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.
Two minor comments, otherwise LGTM!
src/main/java/com/google/api/generator/spring/composer/SpringAutoConfigClassComposer.java
Outdated
Show resolved
Hide resolved
src/test/java/com/google/api/generator/spring/composer/SpringAutoConfigClassComposerTest.java
Outdated
Show resolved
Hide resolved
emmileaf
approved these changes
Nov 2, 2022
Kudos, SonarCloud Quality Gate passed! |
diegomarquezp
pushed a commit
that referenced
this pull request
Nov 14, 2022
… when supported (#1078) As per earlier discussions, `defaultHttpJsonTransportProvider` is only applicable when Transport.REST_GRPC (e.g. in case of [java_vision](https://github.com/googleapis/googleapis/blob/master/google/cloud/vision/v1/BUILD.bazel#L86)). In this change: - if Transport.GRPC: do not provide property `useRest` to override TransportProvider, use default `defaultTransportChannelProvider()`. - if Transport.REST_GRPC: by default, set `useRest = false` and use default settings same as above. But override to `defaultHttpJsonTransportProvider` when property `useRest` is set to `true`. - In both cases, keep `TransportChannelProvider` bean. This bean defaults to `defaultTransportChannelProvider()`, but allows advanced users to override in user application (e.g. to [set a proxy](https://github.com/googleapis/google-cloud-java#configuring-a-proxy))
suztomo
pushed a commit
that referenced
this pull request
Mar 21, 2023
…1078) * chore: Upgrade to later version of gcp-uploader and protobuf * chore: Add secretstorage version * chore: Use python 3.9.13 * chore: Unpin all python versions * chore: Rerun pipcompile tool * chore: Rerun pipcompile tool with --allow-unsafe * chore: Add --require-hashes * chore: Update requirements file * chore: Remove --require-hashes * chore: Print python version * chore: Add new generated hashes for requirements.txt * chore: Remove python version check in cloud build * chore: Allow synthtool to update python dependencies * chore: Add typing-extensions into requirements * chore: Unpin docker requirements.in file * chore: Add java synthtool validation * chore: Add check to import java synthtool python package Source-Link: googleapis/synthtool@91904bf Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:4566cf7fcd0eece77705330267b2b61a70165711c7829d049b60bc2f1bbcd74e Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
spring
pr that's related to spring code gen, intend to merge into autoconfig-gen-draft2 branch.
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.
As per earlier discussions,
defaultHttpJsonTransportProvider
is only applicable when Transport.REST_GRPC (e.g. in case of java_vision). In this change:useRest
to override TransportProvider, use defaultdefaultTransportChannelProvider()
.useRest = false
and use default settings same as above. But override todefaultHttpJsonTransportProvider
when propertyuseRest
is set totrue
.TransportChannelProvider
bean. This bean defaults todefaultTransportChannelProvider()
, but allows advanced users to override in user application (e.g. to set a proxy)