Skip to content

Commit 87fc137

Browse files
feat(spanner): Add support for Cloud Spanner Scheduled Backups (#501)
* feat(spanner): Add support for Cloud Spanner Scheduled Backups PiperOrigin-RevId: 649277844 Source-Link: googleapis/googleapis@fd7efa2 Source-Link: googleapis/googleapis-gen@50be251 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTBiZTI1MTMyOWQ4ZGI1YjU1NTYyNmViZDQ4ODY3MjFmNTQ3ZDNjYyJ9 * 🦉 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 3a65c0e commit 87fc137

File tree

24 files changed

+70
-186
lines changed

24 files changed

+70
-186
lines changed

google/cloud/pubsublite_v1/services/admin_service/transports/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ def __init__(
8686

8787
# Save the scopes.
8888
self._scopes = scopes
89+
if not hasattr(self, "_ignore_credentials"):
90+
self._ignore_credentials: bool = False
8991

9092
# If no credentials are provided, then determine the appropriate
9193
# defaults.
@@ -98,7 +100,7 @@ def __init__(
98100
credentials, _ = google.auth.load_credentials_from_file(
99101
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
100102
)
101-
elif credentials is None:
103+
elif credentials is None and not self._ignore_credentials:
102104
credentials, _ = google.auth.default(
103105
**scopes_kwargs, quota_project_id=quota_project_id
104106
)

google/cloud/pubsublite_v1/services/admin_service/transports/grpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ def __init__(
129129

130130
if isinstance(channel, grpc.Channel):
131131
# Ignore credentials if a channel was passed.
132-
credentials = False
132+
credentials = None
133+
self._ignore_credentials = True
133134
# If a channel was explicitly provided, set it.
134135
self._grpc_channel = channel
135136
self._ssl_channel_credentials = None

google/cloud/pubsublite_v1/services/admin_service/transports/grpc_asyncio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ def __init__(
176176

177177
if isinstance(channel, aio.Channel):
178178
# Ignore credentials if a channel was passed.
179-
credentials = False
179+
credentials = None
180+
self._ignore_credentials = True
180181
# If a channel was explicitly provided, set it.
181182
self._grpc_channel = channel
182183
self._ssl_channel_credentials = None

google/cloud/pubsublite_v1/services/cursor_service/transports/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def __init__(
8383

8484
# Save the scopes.
8585
self._scopes = scopes
86+
if not hasattr(self, "_ignore_credentials"):
87+
self._ignore_credentials: bool = False
8688

8789
# If no credentials are provided, then determine the appropriate
8890
# defaults.
@@ -95,7 +97,7 @@ def __init__(
9597
credentials, _ = google.auth.load_credentials_from_file(
9698
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
9799
)
98-
elif credentials is None:
100+
elif credentials is None and not self._ignore_credentials:
99101
credentials, _ = google.auth.default(
100102
**scopes_kwargs, quota_project_id=quota_project_id
101103
)

google/cloud/pubsublite_v1/services/cursor_service/transports/grpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ def __init__(
126126

127127
if isinstance(channel, grpc.Channel):
128128
# Ignore credentials if a channel was passed.
129-
credentials = False
129+
credentials = None
130+
self._ignore_credentials = True
130131
# If a channel was explicitly provided, set it.
131132
self._grpc_channel = channel
132133
self._ssl_channel_credentials = None

google/cloud/pubsublite_v1/services/cursor_service/transports/grpc_asyncio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ def __init__(
173173

174174
if isinstance(channel, aio.Channel):
175175
# Ignore credentials if a channel was passed.
176-
credentials = False
176+
credentials = None
177+
self._ignore_credentials = True
177178
# If a channel was explicitly provided, set it.
178179
self._grpc_channel = channel
179180
self._ssl_channel_credentials = None

google/cloud/pubsublite_v1/services/partition_assignment_service/transports/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def __init__(
8383

8484
# Save the scopes.
8585
self._scopes = scopes
86+
if not hasattr(self, "_ignore_credentials"):
87+
self._ignore_credentials: bool = False
8688

8789
# If no credentials are provided, then determine the appropriate
8890
# defaults.
@@ -95,7 +97,7 @@ def __init__(
9597
credentials, _ = google.auth.load_credentials_from_file(
9698
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
9799
)
98-
elif credentials is None:
100+
elif credentials is None and not self._ignore_credentials:
99101
credentials, _ = google.auth.default(
100102
**scopes_kwargs, quota_project_id=quota_project_id
101103
)

google/cloud/pubsublite_v1/services/partition_assignment_service/transports/grpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ def __init__(
124124

125125
if isinstance(channel, grpc.Channel):
126126
# Ignore credentials if a channel was passed.
127-
credentials = False
127+
credentials = None
128+
self._ignore_credentials = True
128129
# If a channel was explicitly provided, set it.
129130
self._grpc_channel = channel
130131
self._ssl_channel_credentials = None

google/cloud/pubsublite_v1/services/partition_assignment_service/transports/grpc_asyncio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ def __init__(
173173

174174
if isinstance(channel, aio.Channel):
175175
# Ignore credentials if a channel was passed.
176-
credentials = False
176+
credentials = None
177+
self._ignore_credentials = True
177178
# If a channel was explicitly provided, set it.
178179
self._grpc_channel = channel
179180
self._ssl_channel_credentials = None

google/cloud/pubsublite_v1/services/publisher_service/transports/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def __init__(
8383

8484
# Save the scopes.
8585
self._scopes = scopes
86+
if not hasattr(self, "_ignore_credentials"):
87+
self._ignore_credentials: bool = False
8688

8789
# If no credentials are provided, then determine the appropriate
8890
# defaults.
@@ -95,7 +97,7 @@ def __init__(
9597
credentials, _ = google.auth.load_credentials_from_file(
9698
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
9799
)
98-
elif credentials is None:
100+
elif credentials is None and not self._ignore_credentials:
99101
credentials, _ = google.auth.default(
100102
**scopes_kwargs, quota_project_id=quota_project_id
101103
)

0 commit comments

Comments
 (0)