-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat(gax): add protobuf version tracking to headers #3199
Conversation
ccdd15d
to
ea7e7ec
Compare
gax-java/gax/src/main/java/com/google/api/gax/core/GaxProperties.java
Outdated
Show resolved
Hide resolved
gax-java/gax/src/main/java/com/google/api/gax/rpc/ApiClientHeaderProvider.java
Show resolved
Hide resolved
gax-java/gax/src/main/java/com/google/api/gax/core/GaxProperties.java
Outdated
Show resolved
Hide resolved
gax-java/gax/src/main/java/com/google/api/gax/rpc/ApiClientHeaderProvider.java
Outdated
Show resolved
Hide resolved
gax-java/gax/src/main/java/com/google/api/gax/rpc/ApiClientHeaderProvider.java
Show resolved
Hide resolved
LGTM w/ addition of Showcase tests showing gRPC + httpjson clients are both providing the new headers. Looking for approval from @blakeli0 |
gax-java/gax/src/test/java/com/google/api/gax/rpc/ApiClientHeaderProviderTest.java
Outdated
Show resolved
Hide resolved
gax-java/gax/src/main/java/com/google/api/gax/core/GaxProperties.java
Outdated
Show resolved
Hide resolved
gax-java/gax/src/main/java/com/google/api/gax/core/GaxProperties.java
Outdated
Show resolved
Hide resolved
gax-java/gax/src/main/java/com/google/api/gax/rpc/ApiClientHeaderProvider.java
Outdated
Show resolved
Hide resolved
gax-java/gax/src/main/java/com/google/api/gax/rpc/ApiClientHeaderProvider.java
Outdated
Show resolved
Hide resolved
Pattern.compile("gl-java/.+ gapic/.+--protobuf-.+ gax/.+ rest/ protobuf/.*"); | ||
httpJsonClient.echo(EchoRequest.newBuilder().build()); | ||
ArrayList headerValues = | ||
(ArrayList) httpJsonInterceptor.metadata.getHeaders().get(HTTP_CLIENT_API_HEADER_KEY); |
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.
Rather than using raw-types, use ArrayList<?>
if you don't know the type. In this case, we're casting to String in the next line so we might as well cast to ArrayList<String>
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.
done
Thank you for the showcase tests - LGTM. |
Adding |
Understood about DNM, but is this verbally LGTM? |
Quality Gate passed for 'gapic-generator-java-root'Issues Measures |
Quality Gate passed for 'java_showcase_integration_tests'Issues Measures |
🤖 I have created a release *beep* *boop* --- <details><summary>2.48.0</summary> ## [2.48.0](v2.47.0...v2.48.0) (2024-10-22) ### Features * **gax:** add protobuf version tracking to headers ([#3199](#3199)) ([40c19b1](40c19b1)) * selectively generate libraries ([#3290](#3290)) ([dfe1a50](dfe1a50)) ### Bug Fixes * generator setting incorrect name/class for sample due to region tag (2nd attempt) ([#3293](#3293)) ([771bd0e](771bd0e)) ### Dependencies * update dependency com.google.errorprone:error_prone_annotations to v2.34.0 ([#3303](#3303)) ([5b01274](5b01274)) * update dependency com.google.errorprone:error_prone_annotations to v2.34.0 ([#3304](#3304)) ([5bd6c9c](5bd6c9c)) * update google api dependencies ([#3282](#3282)) ([a9eac85](a9eac85)) * update google auth library dependencies to v1.29.0 ([#3302](#3302)) ([e64eda2](e64eda2)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Update the Java client libraries to report the runtime version of Protobuf as part of the existing x-goog-api-client request header.
Tested: java-cloud-library api (billing) and hand written api (storage)