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

Commit 27145b1

Browse files
committed
fixes merge conflict... ensures sync-repo-settings is deleted
1 parent 529daf4 commit 27145b1

22 files changed

Lines changed: 808 additions & 233 deletions

.github/.OwlBot.lock.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/.OwlBot.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/auto-approve.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/release-please.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/release-trigger.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/snippet-bot.yml

Whitespace-only changes.

.github/sync-repo-settings.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "spanner",
3+
"name_pretty": "Cloud Spanner",
4+
"product_documentation": "https://cloud.google.com/spanner/docs/",
5+
"client_documentation": "https://cloud.google.com/python/docs/reference/spanner/latest",
6+
"issue_tracker": "https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open",
7+
"release_level": "stable",
8+
"language": "python",
9+
"library_type": "GAPIC_COMBO",
10+
"repo": "googleapis/python-spanner",
11+
"distribution_name": "google-cloud-spanner",
12+
"api_id": "spanner.googleapis.com",
13+
"requires_billing": true,
14+
"default_version": "v1",
15+
"codeowner_team": "@googleapis/spanner-client-libraries-python",
16+
"api_shortname": "spanner",
17+
"api_description": "is a fully managed, mission-critical, \nrelational database service that offers transactional consistency at global scale, \nschemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication \nfor high availability.\n\nBe sure to activate the Cloud Spanner API on the Developer's Console to\nuse Cloud Spanner from your project."
18+
}

owlbot.py renamed to .librarian/generator-input/librarian.py

Lines changed: 14 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -25,58 +25,9 @@
2525

2626
common = gcp.CommonTemplates()
2727

28-
29-
def get_staging_dirs(
30-
# This is a customized version of the s.get_staging_dirs() function
31-
# from synthtool to # cater for copying 3 different folders from
32-
# googleapis-gen:
33-
# spanner, spanner/admin/instance and spanner/admin/database.
34-
# Source:
35-
# https://github.com/googleapis/synthtool/blob/master/synthtool/transforms.py#L280
36-
default_version: Optional[str] = None,
37-
sub_directory: Optional[str] = None,
38-
) -> List[Path]:
39-
"""Returns the list of directories, one per version, copied from
40-
https://github.com/googleapis/googleapis-gen. Will return in lexical sorting
41-
order with the exception of the default_version which will be last (if specified).
42-
43-
Args:
44-
default_version (str): the default version of the API. The directory for this version
45-
will be the last item in the returned list if specified.
46-
sub_directory (str): if a `sub_directory` is provided, only the directories within the
47-
specified `sub_directory` will be returned.
48-
49-
Returns: the empty list if no file were copied.
50-
"""
51-
52-
staging = Path("owl-bot-staging")
53-
54-
if sub_directory:
55-
staging /= sub_directory
56-
57-
if staging.is_dir():
58-
# Collect the subdirectories of the staging directory.
59-
versions = [v.name for v in staging.iterdir() if v.is_dir()]
60-
# Reorder the versions so the default version always comes last.
61-
versions = [v for v in versions if v != default_version]
62-
versions.sort()
63-
if default_version is not None:
64-
versions += [default_version]
65-
dirs = [staging / v for v in versions]
66-
for dir in dirs:
67-
s._tracked_paths.add(dir)
68-
return dirs
69-
else:
70-
return []
71-
72-
73-
spanner_default_version = "v1"
74-
spanner_admin_instance_default_version = "v1"
75-
spanner_admin_database_default_version = "v1"
76-
7728
clean_up_generated_samples = True
7829

79-
for library in get_staging_dirs(spanner_default_version, "spanner"):
30+
for library in s.get_staging_dirs("v1"):
8031
if clean_up_generated_samples:
8132
shutil.rmtree("samples/generated_samples", ignore_errors=True)
8233
clean_up_generated_samples = False
@@ -202,22 +153,6 @@ def get_staging_dirs(
202153
if count < 1:
203154
raise Exception("Expected replacements for gRPC channel options not made.")
204155

205-
s.move(
206-
library,
207-
excludes=[
208-
"google/cloud/spanner/**",
209-
"*.*",
210-
"noxfile.py",
211-
"docs/index.rst",
212-
"google/cloud/spanner_v1/__init__.py",
213-
"**/gapic_version.py",
214-
"testing/constraints-3.7.txt",
215-
],
216-
)
217-
218-
for library in get_staging_dirs(
219-
spanner_admin_instance_default_version, "spanner_admin_instance"
220-
):
221156
count = s.replace(
222157
[
223158
library / "google/cloud/spanner_admin_instance_v1/services/*/transports/grpc*",
@@ -233,14 +168,7 @@ def get_staging_dirs(
233168
)
234169
if count < 1:
235170
raise Exception("Expected replacements for gRPC channel options not made.")
236-
s.move(
237-
library,
238-
excludes=["google/cloud/spanner_admin_instance/**", "*.*", "docs/index.rst", "noxfile.py", "**/gapic_version.py", "testing/constraints-3.7.txt",],
239-
)
240171

241-
for library in get_staging_dirs(
242-
spanner_admin_database_default_version, "spanner_admin_database"
243-
):
244172
count = s.replace(
245173
[
246174
library / "google/cloud/spanner_admin_database_v1/services/*/transports/grpc*",
@@ -258,7 +186,16 @@ def get_staging_dirs(
258186
raise Exception("Expected replacements for gRPC channel options not made.")
259187
s.move(
260188
library,
261-
excludes=["google/cloud/spanner_admin_database/**", "*.*", "docs/index.rst", "noxfile.py", "**/gapic_version.py", "testing/constraints-3.7.txt",],
189+
excludes=[
190+
"google/cloud/spanner/**",
191+
"*.*",
192+
"noxfile.py",
193+
"docs/index.rst",
194+
"google/cloud/spanner_v1/__init__.py",
195+
"testing/constraints-3.7.txt",
196+
"google/cloud/spanner_admin_instance/**",
197+
"google/cloud/spanner_admin_database/**"
198+
],
262199
)
263200

264201
s.remove_staging_dirs()
@@ -279,27 +216,12 @@ def get_staging_dirs(
279216
templated_files,
280217
excludes=[
281218
".coveragerc",
282-
".github/workflows", # exclude gh actions as credentials are needed for tests
219+
".github/**",
220+
".kokoro/**",
283221
"README.rst",
284-
".github/release-please.yml",
285-
".kokoro/test-samples-impl.sh",
286-
".kokoro/presubmit/presubmit.cfg",
287-
".kokoro/samples/python3.7/**",
288-
".kokoro/samples/python3.8/**",
289222
],
290223
)
291224

292-
# Ensure CI runs on a new instance each time
293-
s.replace(
294-
".kokoro/build.sh",
295-
"# Setup project id.",
296-
"""\
297-
# Set up creating a new instance for each system test run
298-
export GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE=true
299-
300-
# Setup project id.""",
301-
)
302-
303225
# Update samples folder in CONTRIBUTING.rst
304226
s.replace("CONTRIBUTING.rst", "samples/snippets", "samples/samples")
305227

@@ -328,4 +250,4 @@ def get_staging_dirs(
328250

329251
# Use a python runtime which is available in the owlbot post processor here
330252
# https://github.com/googleapis/synthtool/blob/master/docker/owlbot/python/Dockerfile
331-
s.shell.run(["nox", "-s", "blacken-3.10"], hide_output=False)
253+
s.shell.run(["nox", "-s", "blacken-3.14"], hide_output=False)

0 commit comments

Comments
 (0)