Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 3e2bbef

Browse files
fix: remove recv msg limit, add enums to types (#84)
PiperOrigin-RevId: 347055288
1 parent af0406e commit 3e2bbef

6 files changed

Lines changed: 32 additions & 6 deletions

File tree

google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/transports/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
_transport_registry["grpc"] = DataTransferServiceGrpcTransport
3131
_transport_registry["grpc_asyncio"] = DataTransferServiceGrpcAsyncIOTransport
3232

33-
3433
__all__ = (
3534
"DataTransferServiceTransport",
3635
"DataTransferServiceGrpcTransport",

google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/transports/grpc.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ def __init__(
151151
ssl_credentials=ssl_credentials,
152152
scopes=scopes or self.AUTH_SCOPES,
153153
quota_project_id=quota_project_id,
154+
options=[
155+
("grpc.max_send_message_length", -1),
156+
("grpc.max_receive_message_length", -1),
157+
],
154158
)
155159
self._ssl_channel_credentials = ssl_credentials
156160
else:
@@ -169,6 +173,10 @@ def __init__(
169173
ssl_credentials=ssl_channel_credentials,
170174
scopes=scopes or self.AUTH_SCOPES,
171175
quota_project_id=quota_project_id,
176+
options=[
177+
("grpc.max_send_message_length", -1),
178+
("grpc.max_receive_message_length", -1),
179+
],
172180
)
173181

174182
self._stubs = {} # type: Dict[str, Callable]
@@ -195,7 +203,7 @@ def create_channel(
195203
) -> grpc.Channel:
196204
"""Create and return a gRPC channel object.
197205
Args:
198-
address (Optionsl[str]): The host for the channel to use.
206+
address (Optional[str]): The host for the channel to use.
199207
credentials (Optional[~.Credentials]): The
200208
authorization credentials to attach to requests. These
201209
credentials identify this application to the service. If

google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/transports/grpc_asyncio.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ def __init__(
196196
ssl_credentials=ssl_credentials,
197197
scopes=scopes or self.AUTH_SCOPES,
198198
quota_project_id=quota_project_id,
199+
options=[
200+
("grpc.max_send_message_length", -1),
201+
("grpc.max_receive_message_length", -1),
202+
],
199203
)
200204
self._ssl_channel_credentials = ssl_credentials
201205
else:
@@ -214,6 +218,10 @@ def __init__(
214218
ssl_credentials=ssl_channel_credentials,
215219
scopes=scopes or self.AUTH_SCOPES,
216220
quota_project_id=quota_project_id,
221+
options=[
222+
("grpc.max_send_message_length", -1),
223+
("grpc.max_receive_message_length", -1),
224+
],
217225
)
218226

219227
# Run the base constructor.

google/cloud/bigquery_datatransfer_v1/types/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
TransferConfig,
2222
TransferRun,
2323
TransferMessage,
24+
TransferType,
25+
TransferState,
2426
)
2527
from .datatransfer import (
2628
DataSourceParameter,
@@ -48,13 +50,14 @@
4850
StartManualTransferRunsResponse,
4951
)
5052

51-
5253
__all__ = (
5354
"EmailPreferences",
5455
"ScheduleOptions",
5556
"TransferConfig",
5657
"TransferRun",
5758
"TransferMessage",
59+
"TransferType",
60+
"TransferState",
5861
"DataSourceParameter",
5962
"DataSource",
6063
"GetDataSourceRequest",

synth.metadata

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/python-bigquery-datatransfer.git",
7-
"sha": "3fb982cc0d4df052495b267f2a7bd3e1c3ea1683"
7+
"sha": "af0406eedac1dc8c663b5c8f67f56255caeea2fa"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "3f87da2ed1ddc3566ef0810c4fc06a2682cc9f5f",
15-
"internalRef": "343022252"
14+
"sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907",
15+
"internalRef": "347055288"
1616
}
1717
},
1818
{

tests/unit/gapic/bigquery_datatransfer_v1/test_data_transfer_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4588,6 +4588,10 @@ def test_data_transfer_service_transport_channel_mtls_with_client_cert_source(
45884588
scopes=("https://www.googleapis.com/auth/cloud-platform",),
45894589
ssl_credentials=mock_ssl_cred,
45904590
quota_project_id=None,
4591+
options=[
4592+
("grpc.max_send_message_length", -1),
4593+
("grpc.max_receive_message_length", -1),
4594+
],
45914595
)
45924596
assert transport.grpc_channel == mock_grpc_channel
45934597
assert transport._ssl_channel_credentials == mock_ssl_cred
@@ -4629,6 +4633,10 @@ def test_data_transfer_service_transport_channel_mtls_with_adc(transport_class):
46294633
scopes=("https://www.googleapis.com/auth/cloud-platform",),
46304634
ssl_credentials=mock_ssl_cred,
46314635
quota_project_id=None,
4636+
options=[
4637+
("grpc.max_send_message_length", -1),
4638+
("grpc.max_receive_message_length", -1),
4639+
],
46324640
)
46334641
assert transport.grpc_channel == mock_grpc_channel
46344642

0 commit comments

Comments
 (0)