Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adding cloud-trace-v2#2630

Merged
garrettjonesgoogle merged 1 commit into
googleapis:mastergoogleapis/google-cloud-java:masterfrom
garrettjonesgoogle:mastergarrettjonesgoogle/gcloud-java:masterCopy head branch name to clipboard
Nov 15, 2017
Merged

Adding cloud-trace-v2#2630
garrettjonesgoogle merged 1 commit into
googleapis:mastergoogleapis/google-cloud-java:masterfrom
garrettjonesgoogle:mastergarrettjonesgoogle/gcloud-java:masterCopy head branch name to clipboard

Conversation

@garrettjonesgoogle

Copy link
Copy Markdown
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 15, 2017
@garrettjonesgoogle garrettjonesgoogle merged commit f1b114f into googleapis:master Nov 15, 2017
chingor13 pushed a commit that referenced this pull request Feb 20, 2026
…#2630)

* chore: Update generation configuration at Fri Sep  6 02:20:36 UTC 2024

* chore: Update generation configuration at Sat Sep  7 02:18:51 UTC 2024

* chore: Update generation configuration at Sun Sep  8 02:24:19 UTC 2024
chingor13 pushed a commit that referenced this pull request Mar 24, 2026
This is part one to resolve b/330980553, this pr allows read and parse
api versioning from proto to service model.

Changes included in this pr:
- rename current apiVersion to packageVersion. This packageVersion is
parsed from package name and exposed in #1075. It was intended to be
used in Spring codegen, but not actually used. It is used in generating
sample region tags (see details
[9ec3531](googleapis/sdk-platform-java@9ec3531))
- exposing apiVersion from Service model.
- Parser.java to parse apiVersion from `ClientProto.apiVersion` to
service.
chingor13 pushed a commit that referenced this pull request Mar 24, 2026
#2671)

This is part 2, following changes in
googleapis/sdk-platform-java#2630

Changes in this pr:
- ApiClientHeaderProvider: add key and token setter for api version.
- AbstractServiceStubSettingsClassComposer: add logic to set this header
when api-version is present (not null or empty)
- Unit and golden tests to reflect above changes. (This includeds a few
new golden files created for tests based on the dedicated proto created
in #2630)

This pr does not include gapic-showcased testing for now.
---
manual tested with
[gapic-showcase](https://github.com/googleapis/gapic-showcase) v0.33.0

steps: 
- Use gapic-showcase v0.33.0 (which includes update in 1484)
- use `gapic-showcase run -v` which prints the request header
- From showcase folder, run `mvn verify -P enable-integration-tests
-Dit.test=ITAutoPopulatedFields.java -pl=gapic-showcase`

Printed header in manual testing
Grpc
```
2024/04/16 10:26:41 Received Unary Request for Method: /google.showcase.v1beta1.Echo/Echo
2024/04/16 10:26:41     Request headers:
2024/04/16 10:26:41       grpc-accept-encoding: gzip
2024/04/16 10:26:41       content-type: application/grpc
2024/04/16 10:26:41       x-goog-api-version: v1_20240408
2024/04/16 10:26:41       :authority: localhost:7469
2024/04/16 10:26:41       user-agent: grpc-java-netty/1.62.2
2024/04/16 10:26:41       x-goog-api-client: gl-java/17.0.7__Eclipse-Adoptium__Temurin-17.0.7-7 gapic/0.0.1-SNAPSHOT gax/2.46.2-SNAPSHOT grpc/1.62.2
2024/04/16 10:26:41     Request:  error:{code:2}  request_id:"1e26ee16-ed07-4eeb-be0e-49b769678779"  other_request_id:"40883e5d-3b20-4add-854c-9808bd009260"
2024/04/16 10:26:41     Returning Error: rpc error: code = Unknown desc = 
```
Httpjson
```
2024/04/16 10:26:41 Received POST request matching '/v1beta1/echo:echo': "/v1beta1/echo:echo"                                                               
2024/04/16 10:26:41   urlPathParams (expect 0, have 0): map[]                 
2024/04/16 10:26:41   urlRequestHeaders:                                                                                                                    
    User-Agent: "Google-HTTP-Java-Client/1.44.1 (gzip)"                                                                                                     
    Content-Type: "application/json; charset=utf-8"                           
    Connection: "keep-alive"                                                                                                                                
    Accept-Encoding: "gzip"                                                   
    X-Goog-Api-Client: "gl-java/17.0.7__Eclipse-Adoptium__Temurin-17.0.7-7 gapic/0.0.1-SNAPSHOT gax/2.46.2-SNAPSHOT rest/"                                  
    X-Goog-Api-Version: "v1_20240408"                                                                                                                       
    Accept: "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"            
    Content-Length: "129"                                                     
2024/04/16 10:26:41   request: {                                                                                                                            
  "error":  {                                                                                                                                               
    "code":  500,                                                                                                                                           
    "message":  "",                                                                                                                                         
    "details":  []                                                            
  },                                                                                                                                                        
  "severity":  "UNNECESSARY",                                                                                                                               
  "header":  "",                                                                                                                                            
  "otherHeader":  "",                                                         
  "requestId":  "e690a84b-176d-421e-9e5d-ba752f68fec8",                       
  "otherRequestId":  "47e0fbde-056a-43ae-bba6-8b6770d861f7"                   
}    
```
chingor13 pushed a commit that referenced this pull request Mar 24, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>2.40.0</summary>

##
[2.40.0](googleapis/sdk-platform-java@v2.39.0...v2.40.0)
(2024-05-02)


### Features

* [common-protos] add `Weight` to common types for Shopping APIs to be
used for accounts bundle
([#2699](googleapis/sdk-platform-java#2699))
([90a28ef](googleapis/sdk-platform-java@90a28ef))
* add a CLI tool to validate generation configuration
([#2691](googleapis/sdk-platform-java#2691))
([f52f8cc](googleapis/sdk-platform-java@f52f8cc))
* Parser to consume the api-versioning value from proto
([#2630](googleapis/sdk-platform-java#2630))
([c112b37](googleapis/sdk-platform-java@c112b37))
* Update Gapic generator and Gax to emit api-versioning via header
([#2671](googleapis/sdk-platform-java#2671))
([cb5ada0](googleapis/sdk-platform-java@cb5ada0))


### Bug Fixes

* change folder prefix for adding headers
([#2688](googleapis/sdk-platform-java#2688))
([ab5ba1d](googleapis/sdk-platform-java@ab5ba1d))
* Log HttpJson's async thread pool core size
([#2697](googleapis/sdk-platform-java#2697))
([31038d1](googleapis/sdk-platform-java@31038d1))
* replace `cfg = "host"` with `cfg = "exec"`
([#2637](googleapis/sdk-platform-java#2637))
([fd12e0f](googleapis/sdk-platform-java@fd12e0f))
* Return resolved endpoint from StubSettings' Builder
([#2715](googleapis/sdk-platform-java#2715))
([6139a73](googleapis/sdk-platform-java@6139a73))


### Dependencies

* Make opentelemetry-api an optional dependency.
([#2681](googleapis/sdk-platform-java#2681))
([2239c8c](googleapis/sdk-platform-java@2239c8c))
* update dependency absl-py to v2.1.0
([#2659](googleapis/sdk-platform-java#2659))
([b2b7738](googleapis/sdk-platform-java@b2b7738))
* update dependency gitpython to v3.1.43
([#2656](googleapis/sdk-platform-java#2656))
([6d273ad](googleapis/sdk-platform-java@6d273ad))
* update dependency lxml to v5.2.1
([#2661](googleapis/sdk-platform-java#2661))
([7a34168](googleapis/sdk-platform-java@7a34168))
* update dependency net.bytebuddy:byte-buddy to v1.14.14
([#2703](googleapis/sdk-platform-java#2703))
([72b0441](googleapis/sdk-platform-java@72b0441))
* update dependency typing to v3.10.0.0
([#2663](googleapis/sdk-platform-java#2663))
([4c64e98](googleapis/sdk-platform-java@4c64e98))
* update gapic-showcase to v0.33.0
([#2653](googleapis/sdk-platform-java#2653))
([5c12155](googleapis/sdk-platform-java@5c12155))


### Documentation

* Add contributing guidelines to PR and issue templates
([#2682](googleapis/sdk-platform-java#2682))
([82f5ce8](googleapis/sdk-platform-java@82f5ce8))
</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>
chingor13 pushed a commit that referenced this pull request Mar 24, 2026
This pr updates gapic-showcase version to 0.35.0 and adds showcase tests
to verify behavior of api version headers being emitted (changes in
#2630 and #2671).
rahul2393 pushed a commit to akash329d/google-cloud-java that referenced this pull request May 21, 2026
Change-Id: I10bfd50174fe2c790aa4a10086a3b14017ba6156

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] Rollback plan is reviewed and LGTMed
- [ ] All new data plane features have a completed end to end testing plan

Fixes #<issue_number_goes_here> ☕️

If you write sample code, please follow the [samples format](
https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.