Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update owlbot to persist the changes
  • Loading branch information
rahul2393 committed Oct 28, 2025
commit 5cf7e16fd09fcd33dfd41a746318a9c60fb18f4b
47 changes: 47 additions & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from pathlib import Path
import shutil
from typing import List, Optional
import re

import synthtool as s
from synthtool import gcp
Expand Down Expand Up @@ -185,6 +186,22 @@ def get_staging_dirs(
)"""
)

count = s.replace(
[
library / "google/cloud/spanner_v1/services/*/transports/grpc*",
library / "tests/unit/gapic/spanner_v1/*",
],
"options=\\[.*?\\]",
"""options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
("grpc.keepalive_time_ms", 120000),
]""",
flags=re.MULTILINE | re.DOTALL,
)
if count < 1:
raise Exception("Expected replacements for gRPC channel options not made.")

s.move(
library,
excludes=[
Expand All @@ -201,6 +218,21 @@ def get_staging_dirs(
for library in get_staging_dirs(
spanner_admin_instance_default_version, "spanner_admin_instance"
):
count = s.replace(
[
library / "google/cloud/spanner_admin_instance_v1/services/*/transports/grpc*",
library / "tests/unit/gapic/spanner_admin_instance_v1/*",
],
"options=\\[.*?\\]",
"""options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
("grpc.keepalive_time_ms", 120000),
]""",
flags=re.MULTILINE | re.DOTALL,
)
if count < 1:
raise Exception("Expected replacements for gRPC channel options not made.")
s.move(
library,
excludes=["google/cloud/spanner_admin_instance/**", "*.*", "docs/index.rst", "noxfile.py", "**/gapic_version.py", "testing/constraints-3.7.txt",],
Expand All @@ -209,6 +241,21 @@ def get_staging_dirs(
for library in get_staging_dirs(
spanner_admin_database_default_version, "spanner_admin_database"
):
count = s.replace(
[
library / "google/cloud/spanner_admin_database_v1/services/*/transports/grpc*",
library / "tests/unit/gapic/spanner_admin_database_v1/*",
],
"options=\\[.*?\\]",
"""options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
("grpc.keepalive_time_ms", 120000),
]""",
flags=re.MULTILINE | re.DOTALL,
)
if count < 1:
raise Exception("Expected replacements for gRPC channel options not made.")
s.move(
library,
excludes=["google/cloud/spanner_admin_database/**", "*.*", "docs/index.rst", "noxfile.py", "**/gapic_version.py", "testing/constraints-3.7.txt",],
Expand Down