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: generate proto-only repository by JoeWang1127 · Pull Request #2720 · googleapis/sdk-platform-java

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

Conversation

@JoeWang1127

@JoeWang1127 JoeWang1127 commented May 2, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

In this PR:

  • Enable hermetic build script to generate java-common-protos and java-iam in this repo.
  • Change libraries_bom_version to optional.
  • Refactor unit tests.
  • Remove java-common-protos/codecov.yaml and java-iam/codecov.yaml as they are no longer needed.

Sorry, something went wrong.

Uh oh!

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

All reactions
@JoeWang1127
chore: add generation config
53e0a2b
@product-auto-label product-auto-label Bot added the size: s Pull request size is small. label May 2, 2024
JoeWang1127 added 6 commits May 2, 2024 13:21
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
7541b67
@JoeWang1127
add gapics
4f5118c
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
6629f2f
@JoeWang1127
add java-iam
b8be0b2
@JoeWang1127
fix proto_path
7f48e08
@JoeWang1127
rename OwlBot.yaml
0026eed
@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 May 2, 2024
JoeWang1127 added 15 commits May 2, 2024 23:23
@JoeWang1127
change command
78dd8d7
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
788e30c
@JoeWang1127
restore change
971867e
@JoeWang1127
change source dir
f3a6fbd
@JoeWang1127
change source
ddce346
@JoeWang1127
change to snapshot
8c21004
@JoeWang1127
change readme template
7da4e21
@JoeWang1127
change copyright year
abcc81b
@JoeWang1127
do not apply repo level postprocessing if it has proto-only libraries
9a65467
@JoeWang1127
generate proto-only repo
e19c0ff
@JoeWang1127
do not generate api-id
edc09e2
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
4321f11
@JoeWang1127
refactor unit tests
a4f945f
@JoeWang1127
add unit test to verify proto-only BUILD
8b3563b
@JoeWang1127
change readme template
396ea8e
@JoeWang1127 JoeWang1127 changed the title chore: add generation config feat: generate proto-only repository May 8, 2024
JoeWang1127 added 2 commits May 8, 2024 14:37
@JoeWang1127
fix unit test
905ce01
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
ed8e811
@blakeli0

blakeli0 commented May 9, 2024

Copy link
Copy Markdown
Contributor

java-iam/README.md is excluded from templating, should we not generate it?

I don't think it makes sense for both java-iam and java-common-protos to have READMEs, I think we can remove them and exclude them from generation. WDYT @suztomo ?

All reactions

Sorry, something went wrong.

Uh oh!

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

@JoeWang1127
merge main
afa2f2f
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
bd7859f
@JoeWang1127
JoeWang1127 requested a review from diegomarquezp May 14, 2024 17:47
JoeWang1127 added 4 commits May 14, 2024 19:31
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
c18090f
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
b46723d
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
685905a
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
7748828
diegomarquezp
diegomarquezp approved these changes May 15, 2024
View reviewed changes

@diegomarquezp diegomarquezp 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, just some minor comments.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread library_generation/generate_repo.py Outdated
from library_generation.model.library_config import LibraryConfig
from library_generation.utils.monorepo_postprocessor import monorepo_postprocessing

PROTO_ONLY_LIBRARIES = ["common-protos"]

@diegomarquezp diegomarquezp May 15, 2024

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 believe this one should also be changed to "common proto libraries"

Sorry, something went wrong.

Uh oh!

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

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

@JoeWang1127 JoeWang1127 May 15, 2024

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.

This variable is actually not used, I removed it.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread library_generation/model/generation_config.py
def is_monorepo(self) -> bool:
return len(self.libraries) > 1

def contains_common_protos(self) -> bool:

@diegomarquezp diegomarquezp May 15, 2024

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.

We have one method to set the value and one to compute, plus we store a variable in the config object. Maybe we can put the logic of the setter in the getter method and compute the value once in the field we create in the constructor. That would leave us with one less method.

Sorry, something went wrong.

Uh oh!

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

JoeWang1127 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
JoeWang1127 added 4 commits May 15, 2024 16:53
@JoeWang1127
remove variable
a25e604
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
958ef5a
@JoeWang1127
remove setter
efa3efa
@JoeWang1127
add break
c76524d
blakeli0
blakeli0 reviewed May 16, 2024
View reviewed changes
Comment thread library_generation/model/generation_config.py Outdated
REPO_LEVEL_PARAMETER = "Repo level parameter"
LIBRARY_LEVEL_PARAMETER = "Library level parameter"
GAPIC_LEVEL_PARAMETER = "GAPIC level parameter"
COMMON_PROTOS = "common-protos"

@blakeli0 blakeli0 May 16, 2024

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.

Suggested change
COMMON_PROTOS = "common-protos"
COMMON_PROTOS_LIBRARY_NAME = "common-protos"

Sorry, something went wrong.

Uh oh!

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

All reactions

@JoeWang1127 JoeWang1127 May 16, 2024

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.

Done.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread library_generation/generate_repo.py Outdated
library=library,
output_folder=repo_config.output_folder,
versions_file=repo_config.versions_file,
gapic_repo=not config.contains_common_protos(),

@blakeli0 blakeli0 May 16, 2024

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.

Why do we call this gapic_repo? I see that config is already being passed around, can we just use config.contains_common_protos()? I feel it is easier to understand.

Sorry, something went wrong.

Uh oh!

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

All reactions

@JoeWang1127 JoeWang1127 May 16, 2024

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 removed this parameter as we already pass the config.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread library_generation/test/model/gapic_inputs_unit_tests.py

@blakeli0 blakeli0 May 16, 2024

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.

Thanks for backfilling this test!

Sorry, something went wrong.

Uh oh!

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

JoeWang1127 reacted with laugh emoji
All reactions
  • 😄 1 reaction
JoeWang1127 added 2 commits May 16, 2024 12:12
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
c4731d1
@JoeWang1127
remove a parameter
7385de4
@JoeWang1127
JoeWang1127 requested a review from blakeli0 May 16, 2024 12:55
blakeli0
blakeli0 reviewed May 16, 2024
View reviewed changes
Comment thread library_generation/utils/utilities.py Outdated
"library_type": library.library_type,
"requires_billing": library.requires_billing,
}
if config.contains_common_protos():

@blakeli0 blakeli0 May 16, 2024

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: Can we add a comment saying that this is for java-common-protos and java-iam modules in sdk-platform-java? And/or change the logic to if repo == "googleapis/sdk-platform-java"?

Sorry, something went wrong.

Uh oh!

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

All reactions

@JoeWang1127 JoeWang1127 May 16, 2024

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.

Done.

Sorry, something went wrong.

Uh oh!

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

All reactions
blakeli0
blakeli0 reviewed May 16, 2024
View reviewed changes
Comment thread library_generation/utils/utilities.py
if config.is_monorepo()
else f"googleapis/{language}-{library_name}"
)
if config.contains_common_protos():

@blakeli0 blakeli0 May 16, 2024

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.

Future consideration: Maybe we want to introduce a repo level config called repo or repo_name to represent this.

Sorry, something went wrong.

Uh oh!

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

JoeWang1127 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
blakeli0
blakeli0 approved these changes May 16, 2024
View reviewed changes

@blakeli0 blakeli0 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
JoeWang1127 added 2 commits May 16, 2024 21:28
@JoeWang1127
refactor
534ae9c
@JoeWang1127
Merge branch 'main' into chore/add-generation-config
1751738
@sonarqubecloud

sonarqubecloud Bot commented May 16, 2024

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed for 'gapic-generator-java-root'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

All reactions

Sorry, something went wrong.

Uh oh!

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

@sonarqubecloud

sonarqubecloud Bot commented May 16, 2024

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

All reactions

Sorry, something went wrong.

Uh oh!

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

@JoeWang1127
JoeWang1127 merged commit f7a5161 into main May 16, 2024
@JoeWang1127
JoeWang1127 deleted the chore/add-generation-config branch May 16, 2024 21:52
@release-please release-please Bot mentioned this pull request May 16, 2024
chore(main): release 2.41.0 #2780
Closed
lqiu96 pushed a commit that referenced this pull request May 22, 2024
@JoeWang1127 @lqiu96
feat: generate proto-only repository (#2720)
36d358f
In this PR:
- Enable hermetic build script to generate `java-common-protos` and
`java-iam` in this repo.
- Change `libraries_bom_version` to optional.
- Refactor unit tests.
- Remove `java-common-protos/codecov.yaml` and `java-iam/codecov.yaml`
as they are no longer needed.
@release-please release-please Bot mentioned this pull request May 24, 2024
chore(main): release 2.41.0 #2820
Merged
diegomarquezp pushed a commit that referenced this pull request May 31, 2024
@release-please
chore(main): release 2.41.0 (#2820)
317f472
🤖 I have created a release *beep* *boop*
---


<details><summary>2.41.0</summary>

##
[2.41.0](v2.40.1...v2.41.0)
(2024-05-31)


### Features

* add a github client
([#2747](#2747))
([f8ea0a0](f8ea0a0))
* generate proto-only repository
([#2720](#2720))
([f7a5161](f7a5161))


### Bug Fixes

* [#2785](#2785).
([599f5da](599f5da))


### Dependencies

* update dependency com.google.api-client:google-api-client-bom to
v2.6.0
([#2782](#2782))
([5bc8928](5bc8928))
* update dependency
com.google.cloud.opentelemetry:detector-resources-support to v0.29.0
([#2831](#2831))
([6c1dbfc](6c1dbfc))
* update dependency com.google.code.gson:gson to v2.11.0
([#2786](#2786))
([91f3254](91f3254))
* update dependency com.google.code.gson:gson to v2.11.0
([#2787](#2787))
([e81893c](e81893c))
* update dependency com.google.errorprone:error_prone_annotations to
v2.28.0
([#2835](#2835))
([b8f11b1](b8f11b1))
* update dependency com.google.errorprone:error_prone_annotations to
v2.28.0
([#2838](#2838))
([5c46f3f](5c46f3f))
* update dependency net.bytebuddy:byte-buddy to v1.14.16
([#2797](#2797))
([dfedafc](dfedafc))
* update dependency net.bytebuddy:byte-buddy to v1.14.17
([#2828](#2828))
([6eb9041](6eb9041))
* update dependency org.checkerframework:checker-qual to v3.43.0
([#2730](#2730))
([b7fa736](b7fa736))
* update dependency requests to v2.32.0 [security]
([#2791](#2791))
([c2ea6cc](c2ea6cc))
* update dependency watchdog to v4.0.1
([#2800](#2800))
([d5771dd](d5771dd))
* update google api dependencies
([#2672](#2672))
([6643536](6643536))
* update google http client dependencies to v1.44.2
([#2783](#2783))
([dee7e00](dee7e00))
* update googleapis/java-cloud-bom digest to 59c776b
([#2827](#2827))
([03b3eb4](03b3eb4))
* update netty dependencies to v4.1.110.final
([#2796](#2796))
([d1aaa68](d1aaa68))
</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 Jun 10, 2024
@release-please @lqiu96
chore(main): release 2.41.0 (#2820)
8531102
🤖 I have created a release *beep* *boop*
---


<details><summary>2.41.0</summary>

##
[2.41.0](v2.40.1...v2.41.0)
(2024-05-31)


### Features

* add a github client
([#2747](#2747))
([f8ea0a0](f8ea0a0))
* generate proto-only repository
([#2720](#2720))
([f7a5161](f7a5161))


### Bug Fixes

* [#2785](#2785).
([599f5da](599f5da))


### Dependencies

* update dependency com.google.api-client:google-api-client-bom to
v2.6.0
([#2782](#2782))
([5bc8928](5bc8928))
* update dependency
com.google.cloud.opentelemetry:detector-resources-support to v0.29.0
([#2831](#2831))
([6c1dbfc](6c1dbfc))
* update dependency com.google.code.gson:gson to v2.11.0
([#2786](#2786))
([91f3254](91f3254))
* update dependency com.google.code.gson:gson to v2.11.0
([#2787](#2787))
([e81893c](e81893c))
* update dependency com.google.errorprone:error_prone_annotations to
v2.28.0
([#2835](#2835))
([b8f11b1](b8f11b1))
* update dependency com.google.errorprone:error_prone_annotations to
v2.28.0
([#2838](#2838))
([5c46f3f](5c46f3f))
* update dependency net.bytebuddy:byte-buddy to v1.14.16
([#2797](#2797))
([dfedafc](dfedafc))
* update dependency net.bytebuddy:byte-buddy to v1.14.17
([#2828](#2828))
([6eb9041](6eb9041))
* update dependency org.checkerframework:checker-qual to v3.43.0
([#2730](#2730))
([b7fa736](b7fa736))
* update dependency requests to v2.32.0 [security]
([#2791](#2791))
([c2ea6cc](c2ea6cc))
* update dependency watchdog to v4.0.1
([#2800](#2800))
([d5771dd](d5771dd))
* update google api dependencies
([#2672](#2672))
([6643536](6643536))
* update google http client dependencies to v1.44.2
([#2783](#2783))
([dee7e00](dee7e00))
* update googleapis/java-cloud-bom digest to 59c776b
([#2827](#2827))
([03b3eb4](03b3eb4))
* update netty dependencies to v4.1.110.final
([#2796](#2796))
([d1aaa68](d1aaa68))
</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.41.0 (#2820)
86b29e1
🤖 I have created a release *beep* *boop*
---


<details><summary>2.41.0</summary>

##
[2.41.0](googleapis/sdk-platform-java@v2.40.1...v2.41.0)
(2024-05-31)


### Features

* add a github client
([#2747](googleapis/sdk-platform-java#2747))
([29e7035](googleapis/sdk-platform-java@29e7035))
* generate proto-only repository
([#2720](googleapis/sdk-platform-java#2720))
([2e0a5fb](googleapis/sdk-platform-java@2e0a5fb))


### Bug Fixes

* [#2785](googleapis/sdk-platform-java#2785).
([536e30f](googleapis/sdk-platform-java@536e30f))


### Dependencies

* update dependency com.google.api-client:google-api-client-bom to
v2.6.0
([#2782](googleapis/sdk-platform-java#2782))
([3dacbec](googleapis/sdk-platform-java@3dacbec))
* update dependency
com.google.cloud.opentelemetry:detector-resources-support to v0.29.0
([#2831](googleapis/sdk-platform-java#2831))
([941135e](googleapis/sdk-platform-java@941135e))
* update dependency com.google.code.gson:gson to v2.11.0
([#2786](googleapis/sdk-platform-java#2786))
([492d359](googleapis/sdk-platform-java@492d359))
* update dependency com.google.code.gson:gson to v2.11.0
([#2787](googleapis/sdk-platform-java#2787))
([c3ac13a](googleapis/sdk-platform-java@c3ac13a))
* update dependency com.google.errorprone:error_prone_annotations to
v2.28.0
([#2835](googleapis/sdk-platform-java#2835))
([102c011](googleapis/sdk-platform-java@102c011))
* update dependency com.google.errorprone:error_prone_annotations to
v2.28.0
([#2838](googleapis/sdk-platform-java#2838))
([dfa3146](googleapis/sdk-platform-java@dfa3146))
* update dependency net.bytebuddy:byte-buddy to v1.14.16
([#2797](googleapis/sdk-platform-java#2797))
([b0a0563](googleapis/sdk-platform-java@b0a0563))
* update dependency net.bytebuddy:byte-buddy to v1.14.17
([#2828](googleapis/sdk-platform-java#2828))
([c998f43](googleapis/sdk-platform-java@c998f43))
* update dependency org.checkerframework:checker-qual to v3.43.0
([#2730](googleapis/sdk-platform-java#2730))
([98b00d6](googleapis/sdk-platform-java@98b00d6))
* update dependency requests to v2.32.0 [security]
([#2791](googleapis/sdk-platform-java#2791))
([f0be3c4](googleapis/sdk-platform-java@f0be3c4))
* update dependency watchdog to v4.0.1
([#2800](googleapis/sdk-platform-java#2800))
([fa53f78](googleapis/sdk-platform-java@fa53f78))
* update google api dependencies
([#2672](googleapis/sdk-platform-java#2672))
([a1b1bac](googleapis/sdk-platform-java@a1b1bac))
* update google http client dependencies to v1.44.2
([#2783](googleapis/sdk-platform-java#2783))
([98344c0](googleapis/sdk-platform-java@98344c0))
* update googleapis/java-cloud-bom digest to 59c776b
([#2827](googleapis/sdk-platform-java#2827))
([0163ce4](googleapis/sdk-platform-java@0163ce4))
* update netty dependencies to v4.1.110.final
([#2796](googleapis/sdk-platform-java#2796))
([4148d4c](googleapis/sdk-platform-java@4148d4c))
</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
@diegomarquezp diegomarquezp diegomarquezp 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: l Pull request size is 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

@JoeWang1127 @blakeli0 @suztomo @diegomarquezp
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.