From d2ccb0aa50960fc4f1e897695500a144ae9f184c Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Tue, 20 Apr 2021 10:35:37 -0700 Subject: [PATCH] chore: migrate to owl bot (#154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: migrate to owl bot * chore: copy files from googleapis-gen e0ea8b51f30e2ff6104abd1e4c8d1eb67078c86a * chore: run the post processor * 🦉 Updates from OwlBot Co-authored-by: Owl Bot --- .../.github/.OwlBot.yaml | 30 ++++++++++++ .../.repo-metadata.json | 17 +++---- .../{synth.py => owlbot.py} | 22 ++------- .../synth.metadata | 46 ------------------- 4 files changed, 43 insertions(+), 72 deletions(-) create mode 100644 packages/google-cloud-bigquery-storage/.github/.OwlBot.yaml rename packages/google-cloud-bigquery-storage/{synth.py => owlbot.py} (51%) delete mode 100644 packages/google-cloud-bigquery-storage/synth.metadata diff --git a/packages/google-cloud-bigquery-storage/.github/.OwlBot.yaml b/packages/google-cloud-bigquery-storage/.github/.OwlBot.yaml new file mode 100644 index 00000000000..52a82ebed51 --- /dev/null +++ b/packages/google-cloud-bigquery-storage/.github/.OwlBot.yaml @@ -0,0 +1,30 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-preserve-regex: + - /owl-bot-staging/v1alpha2 + - /owl-bot-staging/v1beta2 + + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/bigquery/storage/(v.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + +begin-after-commit-hash: e0ea8b51f30e2ff6104abd1e4c8d1eb67078c86a + diff --git a/packages/google-cloud-bigquery-storage/.repo-metadata.json b/packages/google-cloud-bigquery-storage/.repo-metadata.json index 1c173eeacf9..aa908c00509 100644 --- a/packages/google-cloud-bigquery-storage/.repo-metadata.json +++ b/packages/google-cloud-bigquery-storage/.repo-metadata.json @@ -1,14 +1,15 @@ { - "name": "bigquerystorage", - "name_pretty": "Google BigQuery Storage", - "product_documentation": "https://cloud.google.com/bigquery/docs/reference/storage", - "client_documentation": "https://googleapis.dev/nodejs/bigquerystorage/latest", - "issue_tracker": "https://b.corp.google.com/savedsearches/559654", + "distribution_name": "@google-cloud/bigquery-storage", "release_level": "ga", - "language": "nodejs", + "product_documentation": "https://cloud.google.com/bigquery/docs/reference/storage", "repo": "googleapis/nodejs-bigquery-storage", - "distribution_name": "@google-cloud/bigquery-storage", - "api_id": "bigquerystorage.googleapis.com", + "default_version": "v1", + "language": "nodejs", "requires_billing": true, + "issue_tracker": "https://b.corp.google.com/savedsearches/559654", + "client_documentation": "https://googleapis.dev/nodejs/bigquerystorage/latest", + "name": "bigquerystorage", + "name_pretty": "Google BigQuery Storage", + "api_id": "bigquerystorage.googleapis.com", "codeowner_team": "@googleapis/api-bigquery" } diff --git a/packages/google-cloud-bigquery-storage/synth.py b/packages/google-cloud-bigquery-storage/owlbot.py similarity index 51% rename from packages/google-cloud-bigquery-storage/synth.py rename to packages/google-cloud-bigquery-storage/owlbot.py index 1cb8ff00d59..44b15e78f18 100644 --- a/packages/google-cloud-bigquery-storage/synth.py +++ b/packages/google-cloud-bigquery-storage/owlbot.py @@ -12,23 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. """This script is used to synthesize generated parts of this library.""" -import synthtool as s -import synthtool.gcp as gcp import synthtool.languages.node as node -import logging -logging.basicConfig(level=logging.DEBUG) -AUTOSYNTH_MULTIPLE_COMMITS = True - -# Run the gapic generator -gapic = gcp.GAPICBazel() -name = 'bigquery-storage' -versions = ['v1beta1', 'v1'] -for version in versions: - library = gapic.node_library(name, version, proto_path=f'google/cloud/bigquery/storage/{version}') - s.copy(library, excludes=['package.json', 'README.md', 'src/index.ts']) -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library(source_location='build/src') -s.copy(templates, excludes=[]) -node.postprocess_gapic_library() +node.owlbot_main( + staging_excludes=['package.json', 'README.md', 'src/index.ts'], + templates_excludes=['src/index.ts'] +) diff --git a/packages/google-cloud-bigquery-storage/synth.metadata b/packages/google-cloud-bigquery-storage/synth.metadata deleted file mode 100644 index d7fca4f6a6b..00000000000 --- a/packages/google-cloud-bigquery-storage/synth.metadata +++ /dev/null @@ -1,46 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-bigquery-storage.git", - "sha": "abe5106d1faba875bc419693bc9ede1a0912f1e8" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c539b9b08b3366ee00c0ec1950f4df711552a269", - "internalRef": "365759522" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "bigquery-storage", - "apiVersion": "v1beta1", - "language": "nodejs", - "generator": "bazel" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "bigquery-storage", - "apiVersion": "v1", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file