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 — feat: Selective gapic generation phase II by cindy-peng · Pull Request #3730 · googleapis/sdk-platform-java

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

Conversation

@cindy-peng

@cindy-peng cindy-peng commented Apr 2, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Implement Selective GAPIC Generation (Phase II)

This PR implements Phase II of selective GAPIC generation within the gapic-generator-java project. This allows for finer control over the intended usage of generated client methods (public, internal, or hidden) by providing selective gapic generation configuration in service yaml.

Key Changes:

1. Model Updates

  • Added a isInternalApi attribute to the internal representation of methods to track their intended visibility (e.g., public, internal).

2. Parser Logic

  • Introduced the getMethodSelectiveGapicType() method responsible for parsing the selective generation configuration for each method.
  • Modified service filtering logic: Service classes will not be generated if the service definition contains no methods or includes only methods marked as HIDDEN.
  • Enhanced parseService() to determine and assign the appropriate SelectiveGapicType to each service method and its corresponding generated variants (e.g., overloaded methods).

3. Composer (Code Generation) Updates

  • Method Annotations: For all method variants designated as INTERNAL, generate an @InternalApi annotation accompanied by a warning message discouraging external use.
  • Method Header Comments: For methods marked as INTERNAL, generate a specific comment in the method's header indicating its intended internal-only usage.
  • Sample Generation: Adjusted the logic for generating package-info.java samples to prevent the usage of any methods marked as INTERNAL.

4. Tests

  • Added unit tests covering the new parser logic and comment generation changes related to selective generation types.
  • Added/updated golden unit/integration tests to verify the correct code output for various selective generation scenarios, including services with:
    • All public methods.
    • A mix of public, INTERNAL, and/or HIDDEN methods.
    • No public methods (verifying that the service class is not generated).

Sorry, something went wrong.

Uh oh!

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

All reactions
@cindy-peng
feat: Selective gapic generation phase II
595198b
@product-auto-label product-auto-label Bot added the size: l Pull request size is large. label Apr 2, 2025
@cindy-peng
Add selective gapic yaml files and golden files
f5c93db
@product-auto-label product-auto-label Bot added size: xl Pull request size is extra large. and removed size: l Pull request size is large. labels Apr 2, 2025
@cindy-peng
add golden test files
734efa9
zhumin8
zhumin8 reviewed Apr 2, 2025
View reviewed changes
Comment thread test/integration/goldens/iam/src/com/google/iam/v1/IAMPolicyClient.java Resolved

Uh oh!

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

cindy-peng added 8 commits April 2, 2025 12:51
@cindy-peng
Revert service client throw comment
fbb19ea
@cindy-peng
Revert integration golden files
03220b9
@cindy-peng
Merge branch 'main' into cindy/selective-gapic
c516814
@cindy-peng
Merge branch 'main' into cindy/selective-gapic
55de64f
@cindy-peng
Merge branch 'main' into cindy/selective-gapic
27bdc9e
@cindy-peng
Remove enum from method model
1f77302
@cindy-peng
Set default method level to be public
eb0c6bf
@cindy-peng
Fix formatting errors
5a21be7
@zhumin8

zhumin8 commented Apr 10, 2025

Copy link
Copy Markdown
Contributor

/gcbrun

All reactions

Sorry, something went wrong.

Uh oh!

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

cindy-peng added 3 commits April 10, 2025 13:23
@cindy-peng
Change isPublic attribute to isInternalApi in method class
5fad1fe
@cindy-peng
Merge branch 'main' into cindy/selective-gapic
182a517
@cindy-peng
Fix linter
221eb8f
zhumin8
zhumin8 reviewed Apr 11, 2025
View reviewed changes

@zhumin8 zhumin8 left a comment

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.

Looks good to me so far. Left a few small comments and I will take another pass.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread gapic-generator-java/src/test/resources/selective_api_generation_generate_omitted_v1beta1.yaml Resolved

Uh oh!

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

Comment thread .../goldens/samples/echoserviceselectivegapicclient/AsyncChatAgainShouldGenerateAsPublic.golden Resolved

Uh oh!

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

Comment thread ...va/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java Resolved

Uh oh!

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

Comment thread gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java Resolved

Uh oh!

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

Comment thread gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/ComposerTest.java Resolved

Uh oh!

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

Comment thread .../com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden Resolved

Uh oh!

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

Comment thread ...test/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposerTest.java Outdated
Service service = context.services().get(1);
GapicClass clazz = GrpcServiceStubClassComposer.instance().generate(context, service);

Assert.assertGoldenClass(this.getClass(), clazz, "SelectiveGapicStub.golden");

@zhumin8 zhumin8 Apr 11, 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.

I don't see any @InternalApi in the golden file for this test. Is this test necessary?

Sorry, something went wrong.

Uh oh!

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

All reactions

@cindy-peng cindy-peng Apr 15, 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.

Yeah this should not impact the stubclass. I have removed the test and the golden file.

Sorry, something went wrong.

Uh oh!

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

All reactions

@zhumin8 zhumin8 Apr 15, 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.

Am I missing it or there is only test setup to verify -Client changes, but not -Stub, -StubSettings or -ClientSettings ?
For example, in below snippet of golden file, I expect chatShouldGenerateAsInternalCallable() also be marked as internal, and I believe changes in AbstractServiceStubClassComposer.java should do it. Do you have any test coverages for it?

sdk-platform-java/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden

Lines 568 to 571 in a87d3b0

@InternalApi("Internal API. This API is not intended for public consumption.")
public final UnaryCallable<EchoRequest, EchoResponse> chatShouldGenerateAsInternalCallable() {
return stub.chatShouldGenerateAsInternalCallable();
}

Sorry, something went wrong.

Uh oh!

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

All reactions

@cindy-peng cindy-peng Apr 16, 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.

No I didn't add those tests earlier. I just updated the test files to include coverage for service settings, stub and stub settings. Please take a look:)

Sorry, something went wrong.

Uh oh!

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

All reactions
zhumin8
zhumin8 reviewed Apr 11, 2025
View reviewed changes
Comment thread gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java Resolved

Uh oh!

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

zhumin8
zhumin8 reviewed Apr 11, 2025
View reviewed changes
Comment thread ...a/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java Resolved

Uh oh!

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

zhumin8
zhumin8 reviewed Apr 11, 2025
View reviewed changes
Comment thread ...com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java Outdated
private static final String SETTINGS_LITERAL = "Settings";

private static final String DOT = ".";
private static final String INTERNAL_API_WARNING =

@zhumin8 zhumin8 Apr 11, 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.

nit: perhaps extract INTERNAL_API_WARNING to a somewhere to be accessible for each of these composes.

Sorry, something went wrong.

Uh oh!

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

blakeli0 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@cindy-peng cindy-peng Apr 15, 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.

Yeah that makes sense. It looks like each abstract composer currently maintains its own string constants currently and there are some duplicates for other strings as well.
For example: this string private static final String PAGED_RESPONSE_TYPE_NAME_PATTERN = "%sPagedResponse"; exists in AbstractServiceClientClassComposer, AbstractServiceStubClassComposer, AbstractServiceSettingsClassComposer, etc.

However I didn't find a central place where I can put the common strings. Do we want to create a new class (e.g. CommonStrings.java) under gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/utils/ to store all the common strings there? Or that's something we want to do in a separate refactoring PR?

Sorry, something went wrong.

Uh oh!

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

All reactions

@zhumin8 zhumin8 Apr 15, 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.

composer/utils/CommonStrings.java sounds good to me. I'd rather just include with this PR so we do not forget about it.

Sorry, something went wrong.

Uh oh!

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

All reactions

@cindy-peng cindy-peng Apr 16, 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.

I just realized classes under composer/utils/ are in a different package than all the composers under composer/common/. This will require common strings to be exposed as Public in order to be referenced in the composers, which could be a concern.

Should I just create a CommonStrings.java file under common folder? Seems like it is mostly for the common abstract composer classes.

Sorry, something went wrong.

Uh oh!

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

All reactions

@zhumin8 zhumin8 Apr 16, 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.

Either way is good with me. I am not super concerned about it being public because this is generator code and not client library code.

Sorry, something went wrong.

Uh oh!

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

All reactions

@cindy-peng cindy-peng Apr 17, 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.

Sounds good. Added composer/utils/CommonStrings.java.

Sorry, something went wrong.

Uh oh!

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

All reactions
zhumin8
zhumin8 reviewed Apr 11, 2025
View reviewed changes
Comment thread ...ava/com/google/api/generator/gapic/composer/common/AbstractServiceSettingsClassComposer.java Resolved

Uh oh!

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

zhumin8
zhumin8 reviewed Apr 11, 2025
View reviewed changes
Comment thread .../java/com/google/api/generator/gapic/composer/common/AbstractServiceClientClassComposer.java Resolved

Uh oh!

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

cindy-peng added 3 commits April 15, 2025 11:18
@cindy-peng
Fix comments from PR review.
ffd66db
@cindy-peng
Merge branch 'main' into cindy/selective-gapic
602b910
@cindy-peng
Fix linter.
a87d3b0
@cindy-peng

cindy-peng commented Apr 15, 2025

Copy link
Copy Markdown
Contributor Author

/gcbrun

All reactions

Sorry, something went wrong.

Uh oh!

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

@zhumin8 zhumin8 mentioned this pull request Apr 1, 2026
[sdk-platform-java] (generator) test setup generates samples and produces golden files not used in tests googleapis/google-cloud-java#12383
Closed
cindy-peng added 2 commits April 15, 2025 17:50
@cindy-peng
Add unit tests for stub, stub settings,service settings
cbb7ce5
@cindy-peng
Fix Javadoc comment line break before @internalapi comment
6c30173
zhumin8
zhumin8 reviewed Apr 16, 2025
View reviewed changes
Comment thread ...le/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicServiceSettings.golden Resolved

Uh oh!

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

zhumin8
zhumin8 reviewed Apr 16, 2025
View reviewed changes
Comment thread ...c-generator-java/src/main/java/com/google/api/generator/engine/writer/JavaWriterVisitor.java Outdated

// fixing @InternalApi comment after formatting
// formatter removes the line break before @InternalApi comment.
// See https://github.com/google/google-java-format/issues/1249

@zhumin8 zhumin8 Apr 16, 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.

Great finding!
I think by convention, block tags should be starting with lowercase, changing it might make formatter recognize it correctly.
One other thing I am not certain about, by using this custom tag, does the tools used in the publishing chain (e.g. https://github.com/googleapis/java-docfx-doclet) all be able to handle it correctly? From this guide, looks like some customizations are needed.

Sorry, something went wrong.

Uh oh!

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

All reactions

@zhumin8 zhumin8 Apr 16, 2025 •
edited
Loading

Uh oh!

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

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.

Perhaps it might be easier to include this notice as part of the descriptive text and not use custom tag in Javadoc?

WDYT, @blakeli0 ?

Sorry, something went wrong.

Uh oh!

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

All reactions

@cindy-peng cindy-peng Apr 16, 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.

@zhumin8 You are absolutely right! After changing block tag @InternalApi to start with lowercase @internalApi, Java formatter was able to format everything correctly. I will make the change and remove the regex fix here.

Sorry, something went wrong.

Uh oh!

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

All reactions

@cindy-peng cindy-peng Apr 17, 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.

@zhumin8 I have changed the block tag into descriptive text. please help take a look. Thanks!

Sorry, something went wrong.

Uh oh!

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

All reactions
cindy-peng added 2 commits April 16, 2025 09:37
@cindy-peng
Change block tag to start with lowercase to resolve formatter issue.
b481cc7
@cindy-peng
Fix comment to be lowercase @internalapi
edafba1
blakeli0
blakeli0 reviewed Apr 16, 2025
View reviewed changes
Comment thread gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java Outdated
// is in the allow list.
// Otherwise, generate this method as INTERNAL or HIDDEN based on GenerateOmittedAsInternal
// flag.
if (includeMethodsList.isEmpty() && generateOmittedAsInternal == false

@blakeli0 blakeli0 Apr 16, 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 logic is not easy to understand, can we refactor it to make it more readable?
In addition, I don't see test cases in ParserTest that test all scenarios. There are no tests for INTERNAL and HIDDEN either.

Sorry, something went wrong.

Uh oh!

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

cindy-peng reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@cindy-peng cindy-peng Apr 17, 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.

I have refactored the logic and added unit tests in ParserTest to cover Internal, Hidden, Public. Please help take a look.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread gapic-generator-java/src/test/java/com/google/api/generator/engine/ast/JavaDocCommentTest.java Outdated
LineFormatter.lines(
"@throws java.lang.RuntimeException if the remote call fails.\n",
"@deprecated Use the {@link ShelfBookName} class instead.\n",
"@internalApi This method is internal used only. Please do not use directly.\n",

@blakeli0 blakeli0 Apr 16, 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.

I don't think this works out of box, we would have to change our doc generation to include this custom tag. See discussions. Can we remove @inernalapi part from the comment for now?

Sorry, something went wrong.

Uh oh!

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

cindy-peng reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@cindy-peng cindy-peng Apr 17, 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.

Sounds good. I have also discussed this with @zhumin8 . For now I have removed this tag @internalApi and added a descriptive text to indicate internalApi before block tags. It will be something like this in the comment block:

   *
   * <p><b>Warning: </b>This method is internal used only. Please do not use directly.
   *

Please take at the EchoServiceSelectiveGapicClient.golden and let me know if that works. Thanks!

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread .../com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden Resolved

Uh oh!

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

@cindy-peng
Change internalApi javadoc comment to be additional descriptive text.
f4c9cf7
@cindy-peng
cindy-peng force-pushed the cindy/selective-gapic branch from 838fdff to f4c9cf7 Compare April 17, 2025 00:45
cindy-peng added 3 commits April 16, 2025 18:10
@cindy-peng
Merge branch 'main' into cindy/selective-gapic
385873d
@cindy-peng
Add common string and unit tests for parser.
7c3aeaa
@cindy-peng
Add common string and unit tests for parser.
b0553ac
zhumin8
zhumin8 approved these changes Apr 17, 2025
View reviewed changes

@zhumin8 zhumin8 left a comment

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.

LGTM.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread .../com/google/api/generator/gapic/composer/grpc/goldens/EchoServiceSelectiveGapicClient.golden Resolved

Uh oh!

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

cindy-peng added 2 commits April 17, 2025 08:01
@cindy-peng
Change internal use warning message.
01bc7f7
@cindy-peng
Fix linter formatting.
2ece35b
@cindy-peng

cindy-peng commented Apr 17, 2025

Copy link
Copy Markdown
Contributor Author

/gcbrun

All reactions

Sorry, something went wrong.

Uh oh!

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

1 similar comment
@diegomarquezp

diegomarquezp commented Apr 17, 2025

Copy link
Copy Markdown
Contributor

/gcbrun

All reactions

Sorry, something went wrong.

Uh oh!

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

blakeli0
blakeli0 approved these changes Apr 17, 2025
View reviewed changes
@blakeli0
blakeli0 merged commit 64ac2c1 into googleapis:main Apr 17, 2025
@release-please release-please Bot mentioned this pull request Apr 17, 2025
chore(main): release 2.56.0 #3715
Merged
lqiu96 pushed a commit that referenced this pull request Apr 17, 2025
@cindy-peng @lqiu96
feat: Selective gapic generation phase II (#3730)
e5eee2d
## Implement Selective GAPIC Generation (Phase II)

This PR implements Phase II of selective GAPIC generation within the
`gapic-generator-java` project. This allows for finer control over the
intended usage of generated client methods (public, internal, or hidden)
by providing selective gapic generation configuration in service yaml.

### Key Changes:

#### 1. Model Updates
* Added a `isInternalApi` attribute to the internal representation of
methods to track their intended visibility (e.g., public, internal).

#### 2. Parser Logic
* Introduced the `getMethodSelectiveGapicType()` method responsible for
parsing the selective generation configuration for each method.
* Modified service filtering logic: Service classes will not be
generated if the service definition contains no methods or includes only
methods marked as **`HIDDEN`**.
* Enhanced `parseService()` to determine and assign the appropriate
`SelectiveGapicType` to each service method and its corresponding
generated variants (e.g., overloaded methods).

#### 3. Composer (Code Generation) Updates
* **Method Annotations:** For all method variants designated as
`INTERNAL`, generate an `@InternalApi` annotation accompanied by a
warning message discouraging external use.
* **Method Header Comments:** For methods marked as `INTERNAL`, generate
a specific comment in the method's header indicating its intended
internal-only usage.
* **Sample Generation:** Adjusted the logic for generating
`package-info.java` samples to prevent the usage of any methods marked
as `INTERNAL`.

#### 4. Tests
* Added **unit tests** covering the new parser logic and comment
generation changes related to selective generation types.
* Added/updated **golden unit/integration tests** to verify the correct
code output for various selective generation scenarios, including
services with:
    * All public methods.
    * A mix of public, `INTERNAL`, and/or `HIDDEN` methods.
* No public methods (verifying that the service class is not generated).
diegomarquezp pushed a commit that referenced this pull request Apr 18, 2025
@release-please
chore(main): release 2.56.0 (#3715)
e303ead
🤖 I have created a release *beep* *boop*
---


<details><summary>2.56.0</summary>

##
[2.56.0](v2.55.1...v2.56.0)
(2025-04-18)


### Features

* Selective gapic generation phase II
([#3730](#3730))
([64ac2c1](64ac2c1))


### Bug Fixes

* **hermetic-build:** use correct image name in templated graalvm jobs
([#3743](#3743))
([29a78d3](29a78d3))
* plumb mtls endpoint to TransportChannelProvider
([#3673](#3673))
([a961459](a961459))


### Dependencies

* add opentelemetry gcp-resources to shared deps
([#3722](#3722))
([b1b075d](b1b075d))
</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>
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request May 6, 2025
@github-cash-renovate-jvm-2 @svc-squareup-copybara
This PR contains the following updates:
738ccb1
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
|
[com.google.api.grpc:proto-google-common-protos](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.55.3` -> `2.56.0` |
|
[com.google.cloud:google-cloud-core-http](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.54.3` -> `2.55.0` |
|
[com.google.cloud:google-cloud-core](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.54.3` -> `2.55.0` |
| [com.google.api:gax](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.64.3` -> `2.65.0` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |
| [software.amazon.awssdk:sqs](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |
| [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |
| [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |
| [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.31.35` -> `2.31.36` |

---

### Release Notes

<details>
<summary>googleapis/sdk-platform-java
(com.google.api.grpc:proto-google-common-protos)</summary>

###
[`v2.56.0`](https://github.com/googleapis/sdk-platform-java/blob/HEAD/CHANGELOG.md#2560-2025-04-18)

##### Features

- Selective gapic generation phase II
([#&#8203;3730](googleapis/sdk-platform-java#3730))
([64ac2c1](googleapis/sdk-platform-java@64ac2c1))

##### Bug Fixes

- **hermetic-build:** use correct image name in templated graalvm jobs
([#&#8203;3743](googleapis/sdk-platform-java#3743))
([29a78d3](googleapis/sdk-platform-java@29a78d3))
- plumb mtls endpoint to TransportChannelProvider
([#&#8203;3673](googleapis/sdk-platform-java#3673))
([a961459](googleapis/sdk-platform-java@a961459))

##### Dependencies

- add opentelemetry gcp-resources to shared deps
([#&#8203;3722](googleapis/sdk-platform-java#3722))
([b1b075d](googleapis/sdk-platform-java@b1b075d))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: 1a1f0ef96fb9d22ffd1976f1eea8999c165d6c37
lqiu96 pushed a commit that referenced this pull request Jun 10, 2025
@cindy-peng @lqiu96
feat: Selective gapic generation phase II (#3730)
c8ba065
## Implement Selective GAPIC Generation (Phase II)

This PR implements Phase II of selective GAPIC generation within the
`gapic-generator-java` project. This allows for finer control over the
intended usage of generated client methods (public, internal, or hidden)
by providing selective gapic generation configuration in service yaml.

### Key Changes:

#### 1. Model Updates
* Added a `isInternalApi` attribute to the internal representation of
methods to track their intended visibility (e.g., public, internal).

#### 2. Parser Logic
* Introduced the `getMethodSelectiveGapicType()` method responsible for
parsing the selective generation configuration for each method.
* Modified service filtering logic: Service classes will not be
generated if the service definition contains no methods or includes only
methods marked as **`HIDDEN`**.
* Enhanced `parseService()` to determine and assign the appropriate
`SelectiveGapicType` to each service method and its corresponding
generated variants (e.g., overloaded methods).

#### 3. Composer (Code Generation) Updates
* **Method Annotations:** For all method variants designated as
`INTERNAL`, generate an `@InternalApi` annotation accompanied by a
warning message discouraging external use.
* **Method Header Comments:** For methods marked as `INTERNAL`, generate
a specific comment in the method's header indicating its intended
internal-only usage.
* **Sample Generation:** Adjusted the logic for generating
`package-info.java` samples to prevent the usage of any methods marked
as `INTERNAL`.

#### 4. Tests
* Added **unit tests** covering the new parser logic and comment
generation changes related to selective generation types.
* Added/updated **golden unit/integration tests** to verify the correct
code output for various selective generation scenarios, including
services with:
    * All public methods.
    * A mix of public, `INTERNAL`, and/or `HIDDEN` methods.
* No public methods (verifying that the service class is not generated).
lqiu96 pushed a commit that referenced this pull request Jun 10, 2025
@release-please @lqiu96
chore(main): release 2.56.0 (#3715)
a60c8c2
🤖 I have created a release *beep* *boop*
---


<details><summary>2.56.0</summary>

##
[2.56.0](v2.55.1...v2.56.0)
(2025-04-18)


### Features

* Selective gapic generation phase II
([#3730](#3730))
([64ac2c1](64ac2c1))


### Bug Fixes

* **hermetic-build:** use correct image name in templated graalvm jobs
([#3743](#3743))
([29a78d3](29a78d3))
* plumb mtls endpoint to TransportChannelProvider
([#3673](#3673))
([a961459](a961459))


### Dependencies

* add opentelemetry gcp-resources to shared deps
([#3722](#3722))
([b1b075d](b1b075d))
</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 Aug 21, 2025
@cindy-peng @lqiu96
feat: Selective gapic generation phase II (#3730)
7e37d80
## Implement Selective GAPIC Generation (Phase II)

This PR implements Phase II of selective GAPIC generation within the
`gapic-generator-java` project. This allows for finer control over the
intended usage of generated client methods (public, internal, or hidden)
by providing selective gapic generation configuration in service yaml.

### Key Changes:

#### 1. Model Updates
* Added a `isInternalApi` attribute to the internal representation of
methods to track their intended visibility (e.g., public, internal).

#### 2. Parser Logic
* Introduced the `getMethodSelectiveGapicType()` method responsible for
parsing the selective generation configuration for each method.
* Modified service filtering logic: Service classes will not be
generated if the service definition contains no methods or includes only
methods marked as **`HIDDEN`**.
* Enhanced `parseService()` to determine and assign the appropriate
`SelectiveGapicType` to each service method and its corresponding
generated variants (e.g., overloaded methods).

#### 3. Composer (Code Generation) Updates
* **Method Annotations:** For all method variants designated as
`INTERNAL`, generate an `@InternalApi` annotation accompanied by a
warning message discouraging external use.
* **Method Header Comments:** For methods marked as `INTERNAL`, generate
a specific comment in the method's header indicating its intended
internal-only usage.
* **Sample Generation:** Adjusted the logic for generating
`package-info.java` samples to prevent the usage of any methods marked
as `INTERNAL`.

#### 4. Tests
* Added **unit tests** covering the new parser logic and comment
generation changes related to selective generation types.
* Added/updated **golden unit/integration tests** to verify the correct
code output for various selective generation scenarios, including
services with:
    * All public methods.
    * A mix of public, `INTERNAL`, and/or `HIDDEN` methods.
* No public methods (verifying that the service class is not generated).
lqiu96 pushed a commit that referenced this pull request Aug 21, 2025
@release-please @lqiu96
chore(main): release 2.56.0 (#3715)
f14e0f4
🤖 I have created a release *beep* *boop*
---


<details><summary>2.56.0</summary>

##
[2.56.0](v2.55.1...v2.56.0)
(2025-04-18)


### Features

* Selective gapic generation phase II
([#3730](#3730))
([64ac2c1](64ac2c1))


### Bug Fixes

* **hermetic-build:** use correct image name in templated graalvm jobs
([#3743](#3743))
([29a78d3](29a78d3))
* plumb mtls endpoint to TransportChannelProvider
([#3673](#3673))
([a961459](a961459))


### Dependencies

* add opentelemetry gcp-resources to shared deps
([#3722](#3722))
([b1b075d](b1b075d))
</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>
@suztomo suztomo mentioned this pull request Nov 5, 2025
chore(2.59.x): release 2.59.3 #3982
Merged
@release-please release-please Bot mentioned this pull request Dec 11, 2025
chore(protobuf-4.x-rc): release 2.65.0-rc1 #3999
Merged
chingor13 pushed a commit to googleapis/google-cloud-java that referenced this pull request Mar 24, 2026
@release-please
chore(main): release 2.56.0 (#3715)
741d398
🤖 I have created a release *beep* *boop*
---


<details><summary>2.56.0</summary>

##
[2.56.0](googleapis/sdk-platform-java@v2.55.1...v2.56.0)
(2025-04-18)


### Features

* Selective gapic generation phase II
([#3730](googleapis/sdk-platform-java#3730))
([d4bafa0](googleapis/sdk-platform-java@d4bafa0))


### Bug Fixes

* **hermetic-build:** use correct image name in templated graalvm jobs
([#3743](googleapis/sdk-platform-java#3743))
([c71223d](googleapis/sdk-platform-java@c71223d))
* plumb mtls endpoint to TransportChannelProvider
([#3673](googleapis/sdk-platform-java#3673))
([d7daf89](googleapis/sdk-platform-java@d7daf89))


### Dependencies

* add opentelemetry gcp-resources to shared deps
([#3722](googleapis/sdk-platform-java#3722))
([4b94c7d](googleapis/sdk-platform-java@4b94c7d))
</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
@zhumin8 zhumin8 zhumin8 approved these changes
@blakeli0 blakeli0 blakeli0 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: xl Pull request size is extra large.

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.

4 participants

@cindy-peng @zhumin8 @diegomarquezp @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.