Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 40fef9a

Browse files
build: update README for deprecation notice (#1771)
* build: update README for deprecation notice * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 262026f commit 40fef9a

9 files changed

Lines changed: 3131 additions & 3300 deletions

File tree

.github/auto-approve.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
rules:
2-
- author: "renovate-bot"
3-
title: "^(fix|chore)\\(deps\\):"
4-
changedFiles:
5-
- "package\\.json$"
6-
maxFiles: 2
1+
processes:
2+
- "NodeDependency"

.github/sync-repo-settings.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ branchProtectionRules:
88
- "ci/kokoro: Samples test"
99
- "ci/kokoro: System test"
1010
- lint
11-
- test (14)
12-
- test (16)
1311
- test (18)
12+
- test (20)
13+
- test (22)
1414
- cla/google
1515
- windows
16+
- OwlBot Post Processor
1617
permissionRules:
1718
- team: yoshi-admins
1819
permission: admin

.github/workflows/ci.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ jobs:
6060
node-version: 18
6161
- run: npm install
6262
- run: npm run lint
63-
# docs:
64-
# runs-on: ubuntu-latest
65-
# steps:
66-
# - uses: actions/checkout@v5
67-
# - uses: actions/setup-node@v6
68-
# with:
69-
# node-version: 18
70-
# - run: npm install
71-
# - run: npm run docs
72-
# - uses: JustinBeckwith/linkinator-action@v1
73-
# with:
74-
# paths: docs/
63+
docs:
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: actions/checkout@v5
67+
- uses: actions/setup-node@v6
68+
with:
69+
node-version: 18
70+
- run: npm install
71+
- run: npm run docs
72+
- uses: JustinBeckwith/linkinator-action@v1
73+
with:
74+
paths: docs/

.kokoro/samples-test.sh

Lines changed: 7 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/system-test.sh

Lines changed: 7 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/test.sh

Lines changed: 7 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
**_THIS REPOSITORY IS DEPRECATED. ALL OF ITS CONTENT AND HISTORY HAS BEEN MOVED TO [GOOGLE-CLOUD-NODE](https://github.com/googleapis/google-cloud-node/tree/main/packages/handwritten)_**
2+
13
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
24
[//]: # "To regenerate it, use `python -m synthtool`."
35
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
@@ -74,7 +76,8 @@ async function quickstart() {
7476

7577
// Print the row key and data (column value, labels, timestamp)
7678
const rowData = JSON.stringify(singleRow.data, null, 4);
77-
console.log(`Row key: ${singleRow.id}\nData: ${rowData}`);
79+
console.log(`Row key: ${singleRow.id}
80+
Data: ${rowData}`);
7881
}
7982
quickstart();
8083

owlbot.py

Lines changed: 4 additions & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Copyright 2021 Google LLC
1+
# Copyright 2022 Google LLC
22
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# Licensed under the Apache License, Version 2.0 (the License);
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
66
#
@@ -11,167 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
import synthtool as s
15-
import synthtool.gcp as gcp
1614
import synthtool.languages.node as node
17-
import logging
18-
import os
19-
from pathlib import Path
20-
from synthtool import _tracked_paths
21-
from typing import AnyStr
22-
import shutil
23-
24-
logging.basicConfig(level=logging.DEBUG)
25-
26-
staging = Path("owl-bot-staging")
27-
28-
if staging.is_dir():
29-
versions = ['v2']
30-
versions_admin = [f"admin/{p}" for p in versions]
31-
32-
logging.info(f"Copying files from staging directory {staging}.")
33-
34-
src_paths = {}
35-
src_files = {}
36-
for version in versions + versions_admin:
37-
src_paths[version] = staging / version
38-
src_files[version] = list([fn for fn in src_paths[version].glob('**/*.*')])
39-
40-
# Copy bigtable library.
41-
# src/index.ts src/admin/v2/index.ts has added AdminClients manually; we don't want to override it.
42-
# src/*.ts is a added layer for the client libraries, they need extra setting in tsconfig.json & tslint.json
43-
# Tracking issues: 1. https://github.com/googleapis/nodejs-bigtable/issues/636
44-
# 2. https://github.com/googleapis/nodejs-bigtable/issues/635
45-
for version in versions:
46-
library = src_paths[version]
47-
_tracked_paths.add(library)
48-
admin_files = filter(
49-
lambda f: str(f).find('_admin') >= 0,
50-
src_files[version]
51-
)
52-
excludes = [
53-
'package.json',
54-
'README.md',
55-
'src/index.ts',
56-
'src/v2/index.ts',
57-
'tsconfig.json',
58-
'tslint.json',
59-
'.github/sync-repo-settings.yaml',
60-
'.github/workflows/ci.yaml',
61-
'.OwlBot.yaml',
62-
'samples/generated/v2/*', # we don't want to encourage non-veneer use here.
63-
'.kokoro/samples-test.sh', # get to green
64-
'.kokoro/system-test.sh',
65-
'.kokoro/test.sh',
66-
] + list(admin_files)
67-
logging.info(f"excluding files for non-admin: {excludes}")
68-
s.copy([library], excludes = excludes)
69-
70-
# Copy the admin library pieces and knit them in.
71-
# Don't override system-test for admin/v2, just keep the v2 version.
72-
for version in versions:
73-
admin_version = f"admin/{version}"
74-
library = src_paths[admin_version]
75-
inProtoPath = f"protos/google/bigtable/{admin_version}"
76-
protos = library / inProtoPath
77-
classes = library / 'src' / version
78-
samples = library / 'samples' / 'generated'
79-
tests = library / 'test'
80-
_tracked_paths.add(library)
81-
82-
# We also have to munge the proto paths in the *_proto_list.json due to making it a level deeper.
83-
# That also applies to the classes themselves.
84-
classesStr = str(classes)
85-
jsons = [fn
86-
for fn
87-
in src_files[admin_version]
88-
if str(fn)[:len(classesStr)] == classesStr]
89-
for jfn in jsons:
90-
logging.info(f"munging json file: {str(jfn)}")
91-
contents = jfn.read_text()
92-
contents = contents.replace("'../..", "'../../..")
93-
contents = contents.replace('"../..', '"../../..')
94-
jfn.write_text(contents)
95-
96-
# Also to the tests that import stuff from src. ../ -> ../../../
97-
testsStr = str(tests)
98-
tfns = [fn
99-
for fn
100-
in src_files[admin_version]
101-
if str(fn)[:len(testsStr)] == testsStr]
102-
for tfn in tfns:
103-
logging.info(f"munging test file: {str(tfn)}")
104-
contents = tfn.read_text()
105-
106-
# Fix relative paths.
107-
contents = contents.replace("'../", "'../../../")
108-
109-
# Use the selective subclasses.
110-
contents = contents.replace(".v2.BigtableInstanceAdminClient", ".admin.InstanceAdminClient")
111-
contents = contents.replace(".v2.BigtableTableAdminClient", ".admin.TableAdminClient")
112-
113-
# Statics also.
114-
contents = contents.replace("bigtabletableadminModule.v2.BigtableTableAdminClient", \
115-
"bigtabletableadminModule.admin.TableAdminClient")
116-
contents = contents.replace("bigtabletableadminModule.v2.BigtableInstanceAdminClient", \
117-
"bigtabletableadminModule.admin.InstanceAdminClient")
118-
119-
tfn.write_text(contents)
120-
121-
# Finally, the samples. Shift to selective subclasses, and mark the samples
122-
# with CUJs as internal, in favour of the handwritten ones.
123-
samplesStr = str(samples)
124-
sfns = [fn
125-
for fn
126-
in src_files[admin_version]
127-
if str(fn)[:len(samplesStr)] == samplesStr]
128-
for sfn in sfns:
129-
logging.info(f"munging sample file: {str(sfn)}")
130-
contents = sfn.read_text()
131-
contents = contents.replace("const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2", \
132-
"const {InstanceAdminClient} = require('@google-cloud/bigtable').admin")
133-
contents = contents.replace("const {BigtableTableAdminClient} = require('@google-cloud/bigtable').v2", \
134-
"const {TableAdminClient} = require('@google-cloud/bigtable').admin")
135-
contents = contents.replace("new BigtableInstanceAdminClient", "new InstanceAdminClient")
136-
contents = contents.replace("new BigtableTableAdminClient", "new TableAdminClient")
137-
138-
# We need to disable this one so the handwritten sample
139-
# can take over for the CUJ.
140-
contents = contents.replace("bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async", \
141-
"bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_async_internal")
142-
143-
sfn.write_text(contents)
144-
145-
os.system(f"mkdir -p {inProtoPath}")
146-
s.copy([protos / '*'], destination=inProtoPath)
147-
os.system(f"mkdir -p src/{admin_version}")
148-
s.copy([classes / '*'], destination=f"src/{admin_version}")
149-
os.system(f"mkdir -p samples/generated/{admin_version}")
150-
s.copy([samples / 'v2' / '*admin*'], destination=f"samples/generated/{admin_version}")
151-
os.system(f"mkdir -p test/{admin_version}")
152-
s.copy([tests / '*admin*.ts'], destination=f"test/{admin_version}")
153-
154-
# Replace the client name for generated system-test.
155-
system_test_files=['system-test/fixtures/sample/src/index.ts','system-test/fixtures/sample/src/index.js']
156-
for file in system_test_files:
157-
s.replace(file, 'BigtableClient', 'Bigtable')
158-
s.replace(file, 'client.close', '// client.close') # this does not work with the manual layer
159-
s.replace(file, 'function doStuffWith', '// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction doStuffWith')
160-
161-
# The staging directory should never be merged into the main branch.
162-
shutil.rmtree(staging)
163-
164-
common_templates = gcp.CommonTemplates()
165-
templates = common_templates.node_library(
166-
source_location='build/src'
167-
)
168-
s.copy(templates,excludes=[
169-
'.github/auto-approve.yml',
170-
'.github/sync-repo-settings.yaml',
171-
'.github/workflows/ci.yaml',
172-
'.kokoro/samples-test.sh', # get to green
173-
'.kokoro/system-test.sh',
174-
'.kokoro/test.sh',
15+
node.owlbot_main(templates_excludes=[
16+
'README.md'
17517
])
176-
177-
node.postprocess_gapic_library_hermetic()

0 commit comments

Comments
 (0)