From 3515982cec6a41f85db8461051b919fdd4ac72cd Mon Sep 17 00:00:00 2001 From: Blake Li Date: Thu, 4 Jan 2024 13:16:00 -0500 Subject: [PATCH 1/8] test: Add hermetic build test config. --- .../resources/google-cloud-java_config.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 library_generation/test/resources/google-cloud-java_config.yaml diff --git a/library_generation/test/resources/google-cloud-java_config.yaml b/library_generation/test/resources/google-cloud-java_config.yaml new file mode 100644 index 0000000000..6220298aa3 --- /dev/null +++ b/library_generation/test/resources/google-cloud-java_config.yaml @@ -0,0 +1,59 @@ +#Required. +gapic_generator_version: 2.30.0 +#Required. +googleapis-commitish: 4512234113a18c1fda1fb0d0ceac8f4b4efe9801 +#Required. +owlbot-cli-image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 +#Required. +synthtool-commitish: 59fe44fde9866a26e7ee4e4450fd79f67f8cf599 +#Required. +python-version: 3.11.2 +#Optional. The root folder name of generated client libraries. If empty, modules will be created under current folder, useful for single module +destination-path: google-cloud-java +#Required. +apis: + #Required. The folder name of the module. This is the destination-name in new-client.py. + - name: java-asset + #Optional. The default value is the title of service yaml + name-pretty: Cloud Asset + #Required. + api_shortname: asset + #Required. + library_type: GAPIC_AUTO + #Optional. The default value is com.google.cloud + group_id: com.google.cloud + #Optional. The default value is google.cloud.{api_shortname} + artifact_id: google.cloud.asset + #Optiona. The default value is true. + requires-billing: true + #Optional. The default value is documentation.summary from service yaml + api_description: + #Optional. + product_documentation: + #Optional. + client_documentation: + #Optional. + rest_documentation: + #Optional. + rpc_documentation: + #Required. + services: + #Required. relative path to google3/third_party/googleapis/stable + - proto_path: google/cloud/asset/v1 + #Required. Remove this parameter once https://github.com/googleapis/sdk-platform-java/issues/2050 is fixed. + proto_only: false + - proto_path: google/cloud/asset/v1p1beta1 + proto_only: false + - proto_path: google/cloud/asset/v1p2beta1 + proto_only: false + - proto_path: google/cloud/asset/v1p5beta1 + proto_only: false + - proto_path: google/cloud/asset/v1p7beta1 + proto_only: false + - name: java-speech + api_shortname: speech + library_type: GAPIC_AUTO + services: + - proto_path: google/cloud/asset/v1 + proto_only: false + From 4ffdfc4a1ad482140069842983a8c532dc45bbb9 Mon Sep 17 00:00:00 2001 From: Blake Li Date: Thu, 4 Jan 2024 14:24:50 -0500 Subject: [PATCH 2/8] chore: Add versions path --- library_generation/test/resources/google-cloud-java_config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library_generation/test/resources/google-cloud-java_config.yaml b/library_generation/test/resources/google-cloud-java_config.yaml index 6220298aa3..931510dfd0 100644 --- a/library_generation/test/resources/google-cloud-java_config.yaml +++ b/library_generation/test/resources/google-cloud-java_config.yaml @@ -10,6 +10,8 @@ synthtool-commitish: 59fe44fde9866a26e7ee4e4450fd79f67f8cf599 python-version: 3.11.2 #Optional. The root folder name of generated client libraries. If empty, modules will be created under current folder, useful for single module destination-path: google-cloud-java +#Optional. We will create a new versions.txt file if it is not specified +versions_path: #Required. apis: #Required. The folder name of the module. This is the destination-name in new-client.py. From dbf8d975cea2ecb25e841c4c809e1a8092242c55 Mon Sep 17 00:00:00 2001 From: Blake Li Date: Thu, 4 Jan 2024 18:17:50 -0500 Subject: [PATCH 3/8] chore: Remove proto_only. --- .../test/resources/google-cloud-java_config.yaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/library_generation/test/resources/google-cloud-java_config.yaml b/library_generation/test/resources/google-cloud-java_config.yaml index 931510dfd0..0b94266430 100644 --- a/library_generation/test/resources/google-cloud-java_config.yaml +++ b/library_generation/test/resources/google-cloud-java_config.yaml @@ -10,8 +10,8 @@ synthtool-commitish: 59fe44fde9866a26e7ee4e4450fd79f67f8cf599 python-version: 3.11.2 #Optional. The root folder name of generated client libraries. If empty, modules will be created under current folder, useful for single module destination-path: google-cloud-java -#Optional. We will create a new versions.txt file if it is not specified -versions_path: +#Optional. This is a relative path to destination-path above. We will create a new versions.txt file if it is not specified +versions_path: versions.txt #Required. apis: #Required. The folder name of the module. This is the destination-name in new-client.py. @@ -40,18 +40,12 @@ apis: rpc_documentation: #Required. services: - #Required. relative path to google3/third_party/googleapis/stable + #Required. This is a relative path to googleapis/googleapis. We'll parse all the parameters needed by generate_library.sh from BUILD.bazel in this folder. - proto_path: google/cloud/asset/v1 - #Required. Remove this parameter once https://github.com/googleapis/sdk-platform-java/issues/2050 is fixed. - proto_only: false - proto_path: google/cloud/asset/v1p1beta1 - proto_only: false - proto_path: google/cloud/asset/v1p2beta1 - proto_only: false - proto_path: google/cloud/asset/v1p5beta1 - proto_only: false - proto_path: google/cloud/asset/v1p7beta1 - proto_only: false - name: java-speech api_shortname: speech library_type: GAPIC_AUTO From 30d0fc3b5f45e6303a7ca144292c18f6736f894e Mon Sep 17 00:00:00 2001 From: Blake Li Date: Fri, 5 Jan 2024 17:27:47 -0500 Subject: [PATCH 4/8] Rename APIs to products, remove name from api configs. --- .../test/resources/google-cloud-java_config.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/library_generation/test/resources/google-cloud-java_config.yaml b/library_generation/test/resources/google-cloud-java_config.yaml index 0b94266430..846c55362c 100644 --- a/library_generation/test/resources/google-cloud-java_config.yaml +++ b/library_generation/test/resources/google-cloud-java_config.yaml @@ -13,14 +13,12 @@ destination-path: google-cloud-java #Optional. This is a relative path to destination-path above. We will create a new versions.txt file if it is not specified versions_path: versions.txt #Required. -apis: - #Required. The folder name of the module. This is the destination-name in new-client.py. - - name: java-asset +products: + #Required. Can be used for populating the folder name java-{api_shortName}. This is also the destination-name in new-client.py. + - api_shortname: asset #Optional. The default value is the title of service yaml name-pretty: Cloud Asset #Required. - api_shortname: asset - #Required. library_type: GAPIC_AUTO #Optional. The default value is com.google.cloud group_id: com.google.cloud @@ -46,8 +44,7 @@ apis: - proto_path: google/cloud/asset/v1p2beta1 - proto_path: google/cloud/asset/v1p5beta1 - proto_path: google/cloud/asset/v1p7beta1 - - name: java-speech - api_shortname: speech + - api_shortname: speech library_type: GAPIC_AUTO services: - proto_path: google/cloud/asset/v1 From 9b40631d0ce46fe619544f6338c90b1f94c3b2df Mon Sep 17 00:00:00 2001 From: Blake Li Date: Thu, 11 Jan 2024 15:52:24 -0500 Subject: [PATCH 5/8] Add grpc and protobuf versions. Rename products to libraries, services to GAPICs. --- .../test/resources/google-cloud-java_config.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/library_generation/test/resources/google-cloud-java_config.yaml b/library_generation/test/resources/google-cloud-java_config.yaml index 846c55362c..7871ea2344 100644 --- a/library_generation/test/resources/google-cloud-java_config.yaml +++ b/library_generation/test/resources/google-cloud-java_config.yaml @@ -1,5 +1,9 @@ #Required. gapic_generator_version: 2.30.0 +#Optional. +grpc_version: 1.59.1 +#Optional. +protobuf_version: 3.25.1 #Required. googleapis-commitish: 4512234113a18c1fda1fb0d0ceac8f4b4efe9801 #Required. @@ -13,7 +17,7 @@ destination-path: google-cloud-java #Optional. This is a relative path to destination-path above. We will create a new versions.txt file if it is not specified versions_path: versions.txt #Required. -products: +libraries: #Required. Can be used for populating the folder name java-{api_shortName}. This is also the destination-name in new-client.py. - api_shortname: asset #Optional. The default value is the title of service yaml @@ -24,7 +28,7 @@ products: group_id: com.google.cloud #Optional. The default value is google.cloud.{api_shortname} artifact_id: google.cloud.asset - #Optiona. The default value is true. + #Optional. The default value is true. requires-billing: true #Optional. The default value is documentation.summary from service yaml api_description: @@ -37,7 +41,7 @@ products: #Optional. rpc_documentation: #Required. - services: + GAPICs: #Required. This is a relative path to googleapis/googleapis. We'll parse all the parameters needed by generate_library.sh from BUILD.bazel in this folder. - proto_path: google/cloud/asset/v1 - proto_path: google/cloud/asset/v1p1beta1 @@ -48,5 +52,3 @@ products: library_type: GAPIC_AUTO services: - proto_path: google/cloud/asset/v1 - proto_only: false - From e418836ceaa2a677a7e3436b908bb7bd94e0d75c Mon Sep 17 00:00:00 2001 From: Blake Li Date: Thu, 11 Jan 2024 15:54:46 -0500 Subject: [PATCH 6/8] Remove versions.txt path. --- library_generation/test/resources/google-cloud-java_config.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/library_generation/test/resources/google-cloud-java_config.yaml b/library_generation/test/resources/google-cloud-java_config.yaml index 7871ea2344..f8c2808739 100644 --- a/library_generation/test/resources/google-cloud-java_config.yaml +++ b/library_generation/test/resources/google-cloud-java_config.yaml @@ -14,8 +14,6 @@ synthtool-commitish: 59fe44fde9866a26e7ee4e4450fd79f67f8cf599 python-version: 3.11.2 #Optional. The root folder name of generated client libraries. If empty, modules will be created under current folder, useful for single module destination-path: google-cloud-java -#Optional. This is a relative path to destination-path above. We will create a new versions.txt file if it is not specified -versions_path: versions.txt #Required. libraries: #Required. Can be used for populating the folder name java-{api_shortName}. This is also the destination-name in new-client.py. From 16ade9089f47b71cc6a86dd56244be7ecc897657 Mon Sep 17 00:00:00 2001 From: Blake Li Date: Thu, 11 Jan 2024 15:56:32 -0500 Subject: [PATCH 7/8] Rename the config file. --- ...-java_config.yaml => google-cloud-java_generation_config.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename library_generation/test/resources/{google-cloud-java_config.yaml => google-cloud-java_generation_config.yaml} (100%) diff --git a/library_generation/test/resources/google-cloud-java_config.yaml b/library_generation/test/resources/google-cloud-java_generation_config.yaml similarity index 100% rename from library_generation/test/resources/google-cloud-java_config.yaml rename to library_generation/test/resources/google-cloud-java_generation_config.yaml From d1177aa50292ef9f9e0c93315b51a180b837c799 Mon Sep 17 00:00:00 2001 From: Blake Li Date: Thu, 11 Jan 2024 17:37:45 -0500 Subject: [PATCH 8/8] Move the config file. --- .../google-cloud-java/generation_config.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename library_generation/test/resources/{google-cloud-java_generation_config.yaml => integration/google-cloud-java/generation_config.yaml} (100%) diff --git a/library_generation/test/resources/google-cloud-java_generation_config.yaml b/library_generation/test/resources/integration/google-cloud-java/generation_config.yaml similarity index 100% rename from library_generation/test/resources/google-cloud-java_generation_config.yaml rename to library_generation/test/resources/integration/google-cloud-java/generation_config.yaml