Skip to content

Commit 42db0db

Browse files
yoshi-automationtseaver
authored andcommitted
Remove send/recv msg size limit, update docstrings (via synth). (#8968)
1 parent 4113758 commit 42db0db

File tree

7 files changed

+95
-74
lines changed

7 files changed

+95
-74
lines changed

spanner/google/cloud/spanner_admin_database_v1/gapic/database_admin_client.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ def list_databases(
259259
streaming is performed per-page, this determines the maximum number
260260
of resources in a page.
261261
retry (Optional[google.api_core.retry.Retry]): A retry object used
262-
to retry requests. If ``None`` is specified, requests will not
263-
be retried.
262+
to retry requests. If ``None`` is specified, requests will
263+
be retried using a default configuration.
264264
timeout (Optional[float]): The amount of time, in seconds, to wait
265265
for the request to complete. Note that if ``retry`` is
266266
specified, the timeout applies to each individual attempt.
@@ -373,8 +373,8 @@ def create_database(
373373
statements execute atomically with the creation of the database:
374374
if there is an error in any statement, the database is not created.
375375
retry (Optional[google.api_core.retry.Retry]): A retry object used
376-
to retry requests. If ``None`` is specified, requests will not
377-
be retried.
376+
to retry requests. If ``None`` is specified, requests will
377+
be retried using a default configuration.
378378
timeout (Optional[float]): The amount of time, in seconds, to wait
379379
for the request to complete. Note that if ``retry`` is
380380
specified, the timeout applies to each individual attempt.
@@ -453,8 +453,8 @@ def get_database(
453453
name (str): Required. The name of the requested database. Values are of the form
454454
``projects/<project>/instances/<instance>/databases/<database>``.
455455
retry (Optional[google.api_core.retry.Retry]): A retry object used
456-
to retry requests. If ``None`` is specified, requests will not
457-
be retried.
456+
to retry requests. If ``None`` is specified, requests will
457+
be retried using a default configuration.
458458
timeout (Optional[float]): The amount of time, in seconds, to wait
459459
for the request to complete. Note that if ``retry`` is
460460
specified, the timeout applies to each individual attempt.
@@ -557,8 +557,8 @@ def update_database_ddl(
557557
operation IDs always begin with an underscore. If the named operation
558558
already exists, ``UpdateDatabaseDdl`` returns ``ALREADY_EXISTS``.
559559
retry (Optional[google.api_core.retry.Retry]): A retry object used
560-
to retry requests. If ``None`` is specified, requests will not
561-
be retried.
560+
to retry requests. If ``None`` is specified, requests will
561+
be retried using a default configuration.
562562
timeout (Optional[float]): The amount of time, in seconds, to wait
563563
for the request to complete. Note that if ``retry`` is
564564
specified, the timeout applies to each individual attempt.
@@ -634,8 +634,8 @@ def drop_database(
634634
Args:
635635
database (str): Required. The database to be dropped.
636636
retry (Optional[google.api_core.retry.Retry]): A retry object used
637-
to retry requests. If ``None`` is specified, requests will not
638-
be retried.
637+
to retry requests. If ``None`` is specified, requests will
638+
be retried using a default configuration.
639639
timeout (Optional[float]): The amount of time, in seconds, to wait
640640
for the request to complete. Note that if ``retry`` is
641641
specified, the timeout applies to each individual attempt.
@@ -702,8 +702,8 @@ def get_database_ddl(
702702
Args:
703703
database (str): Required. The database whose schema we wish to get.
704704
retry (Optional[google.api_core.retry.Retry]): A retry object used
705-
to retry requests. If ``None`` is specified, requests will not
706-
be retried.
705+
to retry requests. If ``None`` is specified, requests will
706+
be retried using a default configuration.
707707
timeout (Optional[float]): The amount of time, in seconds, to wait
708708
for the request to complete. Note that if ``retry`` is
709709
specified, the timeout applies to each individual attempt.
@@ -787,8 +787,8 @@ def set_iam_policy(
787787
If a dict is provided, it must be of the same form as the protobuf
788788
message :class:`~google.cloud.spanner_admin_database_v1.types.Policy`
789789
retry (Optional[google.api_core.retry.Retry]): A retry object used
790-
to retry requests. If ``None`` is specified, requests will not
791-
be retried.
790+
to retry requests. If ``None`` is specified, requests will
791+
be retried using a default configuration.
792792
timeout (Optional[float]): The amount of time, in seconds, to wait
793793
for the request to complete. Note that if ``retry`` is
794794
specified, the timeout applies to each individual attempt.
@@ -867,8 +867,8 @@ def get_iam_policy(
867867
If a dict is provided, it must be of the same form as the protobuf
868868
message :class:`~google.cloud.spanner_admin_database_v1.types.GetPolicyOptions`
869869
retry (Optional[google.api_core.retry.Retry]): A retry object used
870-
to retry requests. If ``None`` is specified, requests will not
871-
be retried.
870+
to retry requests. If ``None`` is specified, requests will
871+
be retried using a default configuration.
872872
timeout (Optional[float]): The amount of time, in seconds, to wait
873873
for the request to complete. Note that if ``retry`` is
874874
specified, the timeout applies to each individual attempt.
@@ -953,8 +953,8 @@ def test_iam_permissions(
953953
information see `IAM
954954
Overview <https://cloud.google.com/iam/docs/overview#permissions>`__.
955955
retry (Optional[google.api_core.retry.Retry]): A retry object used
956-
to retry requests. If ``None`` is specified, requests will not
957-
be retried.
956+
to retry requests. If ``None`` is specified, requests will
957+
be retried using a default configuration.
958958
timeout (Optional[float]): The amount of time, in seconds, to wait
959959
for the request to complete. Note that if ``retry`` is
960960
specified, the timeout applies to each individual attempt.

spanner/google/cloud/spanner_admin_database_v1/gapic/transports/database_admin_grpc_transport.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,14 @@ def __init__(
6262

6363
# Create the channel.
6464
if channel is None:
65-
channel = self.create_channel(address=address, credentials=credentials)
65+
channel = self.create_channel(
66+
address=address,
67+
credentials=credentials,
68+
options={
69+
"grpc.max_send_message_length": -1,
70+
"grpc.max_receive_message_length": -1,
71+
}.items(),
72+
)
6673

6774
self._channel = channel
6875

spanner/google/cloud/spanner_admin_instance_v1/gapic/instance_admin_client.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ def list_instance_configs(
283283
streaming is performed per-page, this determines the maximum number
284284
of resources in a page.
285285
retry (Optional[google.api_core.retry.Retry]): A retry object used
286-
to retry requests. If ``None`` is specified, requests will not
287-
be retried.
286+
to retry requests. If ``None`` is specified, requests will
287+
be retried using a default configuration.
288288
timeout (Optional[float]): The amount of time, in seconds, to wait
289289
for the request to complete. Note that if ``retry`` is
290290
specified, the timeout applies to each individual attempt.
@@ -369,8 +369,8 @@ def get_instance_config(
369369
name (str): Required. The name of the requested instance configuration. Values are
370370
of the form ``projects/<project>/instanceConfigs/<config>``.
371371
retry (Optional[google.api_core.retry.Retry]): A retry object used
372-
to retry requests. If ``None`` is specified, requests will not
373-
be retried.
372+
to retry requests. If ``None`` is specified, requests will
373+
be retried using a default configuration.
374374
timeout (Optional[float]): The amount of time, in seconds, to wait
375375
for the request to complete. Note that if ``retry`` is
376376
specified, the timeout applies to each individual attempt.
@@ -476,8 +476,8 @@ def list_instances(
476476
- ``name:howl labels.env:dev`` --> The instance's name contains "howl"
477477
and it has the label "env" with its value containing "dev".
478478
retry (Optional[google.api_core.retry.Retry]): A retry object used
479-
to retry requests. If ``None`` is specified, requests will not
480-
be retried.
479+
to retry requests. If ``None`` is specified, requests will
480+
be retried using a default configuration.
481481
timeout (Optional[float]): The amount of time, in seconds, to wait
482482
for the request to complete. Note that if ``retry`` is
483483
specified, the timeout applies to each individual attempt.
@@ -562,8 +562,8 @@ def get_instance(
562562
name (str): Required. The name of the requested instance. Values are of the form
563563
``projects/<project>/instances/<instance>``.
564564
retry (Optional[google.api_core.retry.Retry]): A retry object used
565-
to retry requests. If ``None`` is specified, requests will not
566-
be retried.
565+
to retry requests. If ``None`` is specified, requests will
566+
be retried using a default configuration.
567567
timeout (Optional[float]): The amount of time, in seconds, to wait
568568
for the request to complete. Note that if ``retry`` is
569569
specified, the timeout applies to each individual attempt.
@@ -687,8 +687,8 @@ def create_instance(
687687
If a dict is provided, it must be of the same form as the protobuf
688688
message :class:`~google.cloud.spanner_admin_instance_v1.types.Instance`
689689
retry (Optional[google.api_core.retry.Retry]): A retry object used
690-
to retry requests. If ``None`` is specified, requests will not
691-
be retried.
690+
to retry requests. If ``None`` is specified, requests will
691+
be retried using a default configuration.
692692
timeout (Optional[float]): The amount of time, in seconds, to wait
693693
for the request to complete. Note that if ``retry`` is
694694
specified, the timeout applies to each individual attempt.
@@ -828,8 +828,8 @@ def update_instance(
828828
If a dict is provided, it must be of the same form as the protobuf
829829
message :class:`~google.cloud.spanner_admin_instance_v1.types.FieldMask`
830830
retry (Optional[google.api_core.retry.Retry]): A retry object used
831-
to retry requests. If ``None`` is specified, requests will not
832-
be retried.
831+
to retry requests. If ``None`` is specified, requests will
832+
be retried using a default configuration.
833833
timeout (Optional[float]): The amount of time, in seconds, to wait
834834
for the request to complete. Note that if ``retry`` is
835835
specified, the timeout applies to each individual attempt.
@@ -916,8 +916,8 @@ def delete_instance(
916916
name (str): Required. The name of the instance to be deleted. Values are of the form
917917
``projects/<project>/instances/<instance>``
918918
retry (Optional[google.api_core.retry.Retry]): A retry object used
919-
to retry requests. If ``None`` is specified, requests will not
920-
be retried.
919+
to retry requests. If ``None`` is specified, requests will
920+
be retried using a default configuration.
921921
timeout (Optional[float]): The amount of time, in seconds, to wait
922922
for the request to complete. Note that if ``retry`` is
923923
specified, the timeout applies to each individual attempt.
@@ -998,8 +998,8 @@ def set_iam_policy(
998998
If a dict is provided, it must be of the same form as the protobuf
999999
message :class:`~google.cloud.spanner_admin_instance_v1.types.Policy`
10001000
retry (Optional[google.api_core.retry.Retry]): A retry object used
1001-
to retry requests. If ``None`` is specified, requests will not
1002-
be retried.
1001+
to retry requests. If ``None`` is specified, requests will
1002+
be retried using a default configuration.
10031003
timeout (Optional[float]): The amount of time, in seconds, to wait
10041004
for the request to complete. Note that if ``retry`` is
10051005
specified, the timeout applies to each individual attempt.
@@ -1078,8 +1078,8 @@ def get_iam_policy(
10781078
If a dict is provided, it must be of the same form as the protobuf
10791079
message :class:`~google.cloud.spanner_admin_instance_v1.types.GetPolicyOptions`
10801080
retry (Optional[google.api_core.retry.Retry]): A retry object used
1081-
to retry requests. If ``None`` is specified, requests will not
1082-
be retried.
1081+
to retry requests. If ``None`` is specified, requests will
1082+
be retried using a default configuration.
10831083
timeout (Optional[float]): The amount of time, in seconds, to wait
10841084
for the request to complete. Note that if ``retry`` is
10851085
specified, the timeout applies to each individual attempt.
@@ -1164,8 +1164,8 @@ def test_iam_permissions(
11641164
information see `IAM
11651165
Overview <https://cloud.google.com/iam/docs/overview#permissions>`__.
11661166
retry (Optional[google.api_core.retry.Retry]): A retry object used
1167-
to retry requests. If ``None`` is specified, requests will not
1168-
be retried.
1167+
to retry requests. If ``None`` is specified, requests will
1168+
be retried using a default configuration.
11691169
timeout (Optional[float]): The amount of time, in seconds, to wait
11701170
for the request to complete. Note that if ``retry`` is
11711171
specified, the timeout applies to each individual attempt.

spanner/google/cloud/spanner_admin_instance_v1/gapic/transports/instance_admin_grpc_transport.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,14 @@ def __init__(
6262

6363
# Create the channel.
6464
if channel is None:
65-
channel = self.create_channel(address=address, credentials=credentials)
65+
channel = self.create_channel(
66+
address=address,
67+
credentials=credentials,
68+
options={
69+
"grpc.max_send_message_length": -1,
70+
"grpc.max_receive_message_length": -1,
71+
}.items(),
72+
)
6673

6774
self._channel = channel
6875

0 commit comments

Comments
 (0)