GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: add per-service api_version to gapic_metadata by noahdietz · Pull Request #3984 · googleapis/sdk-platform-java

This repository was archived by the owner on Oct 29, 2026. It is now read-only.

Conversation

@noahdietz

@noahdietz noahdietz commented Nov 6, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Populates the api_version field on a per-service basis to the generated gapic_metadata.json using the value from the service-level annotation google.api.api_version already parsed for use in the X-Goog-Api-Version/$apiVersion system parameter (as of #2671).

Updates the googleapis.commit used in internal dependency artifact generation to capture change to gapic_metadata.proto. Chose the most recent as of writing this. This also has the effect of updating some unit test goldens and unit test fixture dependencies that are based on protos at that commit.

The Showcase echo.proto already has the google.api.api_version set on service Echo, so the java-showcase package is appropriately updated to account for inclusion of apiVersion in the gapic_metadata.json output. It is not in use by any API yet.

It's presence in gapic_metadata.json will allow parsers to correlate service client to API version.

Internal bug http://b/452365074.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
noahdietz added 2 commits November 6, 2025 19:37
@noahdietz
fix: add per-service api_version to gapic_metadata
685ccfd
@noahdietz
chore: update java-showcase gapic_metadata.json
472ab57
@product-auto-label product-auto-label Bot added the size: s Pull request size is small. label Nov 6, 2025
@noahdietz
fix formatting
40fe026
@noahdietz noahdietz changed the title Gapic metadata api version fix: add per-service api_version to gapic_metadata Nov 6, 2025
@noahdietz
update a unit test golden
c5f8d8d
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Nov 6, 2025
noahdietz added 3 commits November 6, 2025 20:25
@noahdietz
fix missing test dep
2c4de61
@noahdietz
remove unused import
db2674f
@noahdietz
fix formatting in test
78c8241
@noahdietz
noahdietz marked this pull request as ready for review November 6, 2025 20:49
@noahdietz
noahdietz requested a review from lqiu96 November 6, 2025 20:49
@noahdietz

noahdietz commented Nov 6, 2025

Copy link
Copy Markdown
Contributor Author

The SonarCloud Build/ Build failure has the following error:
Failed to query JRE metadata: GET https://api.sonarcloud.io/analysis/jres?os=linux&arch=x86_64 failed with HTTP 401. Please check the property sonar.token or the environment variable SONAR_TOKEN

Seems unrelated to this PR

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lqiu96

lqiu96 commented Nov 6, 2025

Copy link
Copy Markdown
Member

The SonarCloud Build/ Build failure has the following error: Failed to query JRE metadata: GET https://api.sonarcloud.io/analysis/jres?os=linux&arch=x86_64 failed with HTTP 401. Please check the property sonar.token or the environment variable SONAR_TOKEN

Seems unrelated to this PR

Yeah this is a known limitation where sonar can't run when changes come in from a fork. We can ignore this issue.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lqiu96
lqiu96 reviewed Nov 6, 2025
View reviewed changes
Comment thread .../java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java
.build());
GapicMetadata.ServiceForTransport.Builder grpcServiceClient =
GapicMetadata.ServiceForTransport.newBuilder()
.putClients("grpc", serviceClientProtoBuilder.build());

@lqiu96 lqiu96 Nov 6, 2025

Copy link
Copy Markdown
Member

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.

@blakeli0 Do you know why if there is a reason we don't have a "rest" client here as well?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blakeli0 blakeli0 Nov 7, 2025

Copy link
Copy Markdown
Contributor

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.

It was probably a miss when REGAPIC was implemented.
This maybe outside of the scope of this PR, @noahdietz do you have any concerns of not having rest in gapic_metadata.json?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@noahdietz noahdietz Nov 7, 2025

Copy link
Copy Markdown
Contributor Author

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.

do you have any concerns of not having rest in gapic_metadata.json?

ATM, i have no concerns. In my survey of other languages, Java is not the only one. We've gone X years without publishing that metadata with no complaints, so I'm not sure it's all that urgent. I can file an idea bug to capture my findings across languages and at least document that there is a gap in the metadata for rest.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lqiu96
lqiu96 requested a review from blakeli0 November 6, 2025 22:08
lqiu96
lqiu96 approved these changes Nov 6, 2025
View reviewed changes

@lqiu96 lqiu96 left a comment

Copy link
Copy Markdown
Member

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.

Changes LGTM. @blakeli0 can you also take a quick look?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
blakeli0
blakeli0 approved these changes Nov 7, 2025
View reviewed changes
Comment thread gapic-generator-java/pom.xml
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Should be in sync with repositories.bzl -->
<googleapis.commit>44d6bef0ca6db8bba3fb324c8186e694bcc4829c</googleapis.commit>
<googleapis.commit>9fcfbea0aa5b50fa22e190faceb073d74504172b</googleapis.commit>

@blakeli0 blakeli0 Nov 7, 2025

Copy link
Copy Markdown
Contributor

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.

This is probably a tech debt on our end. gapic_metadata.proto should be updated automatically along side other "config protos" like service.proto.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@noahdietz noahdietz Nov 7, 2025

Copy link
Copy Markdown
Contributor Author

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.

Yep, agreed. I will leave this here for now, but LMK if you want me to file a tracking issue with some details.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .../java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java
.build());
GapicMetadata.ServiceForTransport.Builder grpcServiceClient =
GapicMetadata.ServiceForTransport.newBuilder()
.putClients("grpc", serviceClientProtoBuilder.build());

@blakeli0 blakeli0 Nov 7, 2025

Copy link
Copy Markdown
Contributor

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.

It was probably a miss when REGAPIC was implemented.
This maybe outside of the scope of this PR, @noahdietz do you have any concerns of not having rest in gapic_metadata.json?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@noahdietz
noahdietz merged commit d589306 into googleapis:main Nov 7, 2025
@noahdietz
noahdietz deleted the gapic-metadata-api-version branch November 7, 2025 20:31
@release-please release-please Bot mentioned this pull request Nov 7, 2025
chore(main): release 2.64.2 #3987
Merged
@release-please release-please Bot mentioned this pull request Dec 4, 2025
chore(protobuf-4.x-rc): release 2.65.0-rc1 #3999
Merged
blakeli0 pushed a commit that referenced this pull request Dec 10, 2025
@release-please
chore(main): release 2.64.2 (#3987)
c931e1b
🤖 I have created a release *beep* *boop*
---


<details><summary>2.64.2</summary>

##
[2.64.2](v2.64.1...v2.64.2)
(2025-12-10)


### Bug Fixes

* add per-service api_version to gapic_metadata
([#3984](#3984))
([d589306](d589306))


### Dependencies

* Upgrade auth to 1.41.0.
([#4008](#4008))
([833b3e5](833b3e5))
* upgrade grpc to 1.76.1
([#3993](#3993))
([958611e](958611e))
* Upgrade grpc to 1.76.2
([#4006](#4006))
([a8060a2](a8060a2))
</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>
lqiu96 pushed a commit that referenced this pull request Feb 12, 2026
@noahdietz @lqiu96
fix: add per-service api_version to gapic_metadata (#3984)
443c4e8
Populates the `api_version` field on a per-`service` basis to the
generated `gapic_metadata.json` using the value from the `service`-level
annotation `google.api.api_version` already parsed for use in the
`X-Goog-Api-Version`/`$apiVersion` system parameter (as of #2671).

Updates the `googleapis.commit` used in internal dependency artifact
generation to capture change to `gapic_metadata.proto`. Chose the most
recent as of writing this. This also has the effect of updating some
unit test goldens and unit test fixture dependencies that are based on
protos at that commit.

The Showcase `echo.proto` already has the `google.api.api_version` set
on `service Echo`, so the `java-showcase` package is appropriately
updated to account for inclusion of `apiVersion` in the
`gapic_metadata.json` output. It is not in use by any API yet.

It's presence in `gapic_metadata.json` will allow parsers to correlate
`service` client to API version.

Internal bug http://b/452365074.
lqiu96 pushed a commit that referenced this pull request Feb 12, 2026
@release-please @lqiu96
chore(main): release 2.64.2 (#3987)
0ba7fb0
🤖 I have created a release *beep* *boop*
---


<details><summary>2.64.2</summary>

##
[2.64.2](v2.64.1...v2.64.2)
(2025-12-10)


### Bug Fixes

* add per-service api_version to gapic_metadata
([#3984](#3984))
([d589306](d589306))


### Dependencies

* Upgrade auth to 1.41.0.
([#4008](#4008))
([833b3e5](833b3e5))
* upgrade grpc to 1.76.1
([#3993](#3993))
([958611e](958611e))
* Upgrade grpc to 1.76.2
([#4006](#4006))
([a8060a2](a8060a2))
</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 to googleapis/google-cloud-java that referenced this pull request Mar 24, 2026
@release-please
chore(main): release 2.64.2 (#3987)
c7124d8
🤖 I have created a release *beep* *boop*
---


<details><summary>2.64.2</summary>

##
[2.64.2](googleapis/sdk-platform-java@v2.64.1...v2.64.2)
(2025-12-10)


### Bug Fixes

* add per-service api_version to gapic_metadata
([#3984](googleapis/sdk-platform-java#3984))
([ba93524](googleapis/sdk-platform-java@ba93524))


### Dependencies

* Upgrade auth to 1.41.0.
([#4008](googleapis/sdk-platform-java#4008))
([f601805](googleapis/sdk-platform-java@f601805))
* upgrade grpc to 1.76.1
([#3993](googleapis/sdk-platform-java#3993))
([75b709f](googleapis/sdk-platform-java@75b709f))
* Upgrade grpc to 1.76.2
([#4006](googleapis/sdk-platform-java#4006))
([e4ba36c](googleapis/sdk-platform-java@e4ba36c))
</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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@blakeli0 blakeli0 blakeli0 approved these changes
@lqiu96 lqiu96 lqiu96 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size: m Pull request size is medium.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@noahdietz @lqiu96 @blakeli0
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.