From bcd8a4f5c22c1dc72dec910355228271d84b2ae5 Mon Sep 17 00:00:00 2001 From: Alexander Fenster <fenster@google.com> Date: Mon, 6 Jul 2020 10:17:35 -0700 Subject: [PATCH] build: use bazel build (#407) --- .../src/v1/cloud_redis_client_config.json | 8 +++++++ .../v1beta1/cloud_redis_client_config.json | 9 ++++++++ packages/google-cloud-redis/synth.metadata | 22 ++++++------------- packages/google-cloud-redis/synth.py | 12 ++-------- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/packages/google-cloud-redis/src/v1/cloud_redis_client_config.json b/packages/google-cloud-redis/src/v1/cloud_redis_client_config.json index 1899c6c3c33..cb839e0de22 100644 --- a/packages/google-cloud-redis/src/v1/cloud_redis_client_config.json +++ b/packages/google-cloud-redis/src/v1/cloud_redis_client_config.json @@ -21,34 +21,42 @@ }, "methods": { "ListInstances": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "CreateInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ImportInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ExportInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "FailoverInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-redis/src/v1beta1/cloud_redis_client_config.json b/packages/google-cloud-redis/src/v1beta1/cloud_redis_client_config.json index 28f7aa946f9..52d2e5dc0e1 100644 --- a/packages/google-cloud-redis/src/v1beta1/cloud_redis_client_config.json +++ b/packages/google-cloud-redis/src/v1beta1/cloud_redis_client_config.json @@ -21,38 +21,47 @@ }, "methods": { "ListInstances": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "CreateInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpgradeInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ImportInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ExportInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "FailoverInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteInstance": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-redis/synth.metadata b/packages/google-cloud-redis/synth.metadata index 8a13f2d65cc..692cca07748 100644 --- a/packages/google-cloud-redis/synth.metadata +++ b/packages/google-cloud-redis/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-redis.git", - "sha": "23a3f7843dd2700746621c8341b579ef8481bd79" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "8be3770465a6cf19bea97a84b3e82b113b0239b6", - "internalRef": "314442049" + "remote": "git@github.com:googleapis/nodejs-redis.git", + "sha": "9adf2a257526fcb70a03c59d2740f58fc830e779" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" + "sha": "303271797a360f8a439203413f13a160f2f5b3b4" } } ], @@ -29,8 +21,8 @@ "source": "googleapis", "apiName": "redis", "apiVersion": "v1", - "language": "typescript", - "generator": "gapic-generator-typescript" + "language": "nodejs", + "generator": "bazel" } }, { @@ -38,8 +30,8 @@ "source": "googleapis", "apiName": "redis", "apiVersion": "v1beta1", - "language": "typescript", - "generator": "gapic-generator-typescript" + "language": "nodejs", + "generator": "bazel" } } ] diff --git a/packages/google-cloud-redis/synth.py b/packages/google-cloud-redis/synth.py index 6b6c239c8cc..d6a1c26f9a2 100644 --- a/packages/google-cloud-redis/synth.py +++ b/packages/google-cloud-redis/synth.py @@ -8,21 +8,13 @@ AUTOSYNTH_MULTIPLE_COMMITS = True -gapic = gcp.GAPICMicrogenerator() +gapic = gcp.GAPICBazel() # tasks has two product names, and a poorly named artman yaml versions = ['v1', 'v1beta1'] name = 'redis' for version in versions: - library = gapic.typescript_library( - name, - generator_args={ - "package-name": f"@google-cloud/{name}" - }, - proto_path=f'google/cloud/{name}/{version}', - extra_proto_files=["google/cloud/common_resources.proto"], - version=version, - ) + library = gapic.node_library(name, version) s.copy( library, excludes=['package.json', 'README.md'])