GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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
|
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 ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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.
There was an error while loading. Please reload this page.
| from library_generation.model.library_config import LibraryConfig | ||
| from library_generation.utils.monorepo_postprocessor import monorepo_postprocessing | ||
|
|
||
| PROTO_ONLY_LIBRARIES = ["common-protos"] |
There was a problem 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.
There was an error while loading. Please reload this page.
There was a problem 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.
There was an error while loading. Please reload this page.
| def is_monorepo(self) -> bool: | ||
| return len(self.libraries) > 1 | ||
|
|
||
| def contains_common_protos(self) -> bool: |
There was a problem 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.
There was an error while loading. Please reload this page.
| REPO_LEVEL_PARAMETER = "Repo level parameter" | ||
| LIBRARY_LEVEL_PARAMETER = "Library level parameter" | ||
| GAPIC_LEVEL_PARAMETER = "GAPIC level parameter" | ||
| COMMON_PROTOS = "common-protos" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| COMMON_PROTOS = "common-protos" | |
| COMMON_PROTOS_LIBRARY_NAME = "common-protos" |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Done.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| library=library, | ||
| output_folder=repo_config.output_folder, | ||
| versions_file=repo_config.versions_file, | ||
| gapic_repo=not config.contains_common_protos(), |
There was a problem 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.
There was an error while loading. Please reload this page.
There was a problem 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.
There was an error while loading. Please reload this page.
There was a problem 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.
There was an error while loading. Please reload this page.
| "library_type": library.library_type, | ||
| "requires_billing": library.requires_billing, | ||
| } | ||
| if config.contains_common_protos(): |
There was a problem 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.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Done.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if config.is_monorepo() | ||
| else f"googleapis/{language}-{library_name}" | ||
| ) | ||
| if config.contains_common_protos(): |
There was a problem 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.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.
🤖 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>
🤖 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>
🤖 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>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.