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

fix: remove recv msg limit, add enums to types #84

Merged
merged 1 commit into from Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -30,7 +30,6 @@
_transport_registry["grpc"] = DataTransferServiceGrpcTransport
_transport_registry["grpc_asyncio"] = DataTransferServiceGrpcAsyncIOTransport


__all__ = (
"DataTransferServiceTransport",
"DataTransferServiceGrpcTransport",
Expand Down
Expand Up @@ -151,6 +151,10 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -169,6 +173,10 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

self._stubs = {} # type: Dict[str, Callable]
Expand All @@ -195,7 +203,7 @@ def create_channel(
) -> grpc.Channel:
"""Create and return a gRPC channel object.
Args:
address (Optionsl[str]): The host for the channel to use.
address (Optional[str]): The host for the channel to use.
credentials (Optional[~.Credentials]): The
authorization credentials to attach to requests. These
credentials identify this application to the service. If
Expand Down
Expand Up @@ -196,6 +196,10 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -214,6 +218,10 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

# Run the base constructor.
Expand Down
5 changes: 4 additions & 1 deletion google/cloud/bigquery_datatransfer_v1/types/__init__.py
Expand Up @@ -21,6 +21,8 @@
TransferConfig,
TransferRun,
TransferMessage,
TransferType,
TransferState,
)
from .datatransfer import (
DataSourceParameter,
Expand Down Expand Up @@ -48,13 +50,14 @@
StartManualTransferRunsResponse,
)


__all__ = (
"EmailPreferences",
"ScheduleOptions",
"TransferConfig",
"TransferRun",
"TransferMessage",
"TransferType",
"TransferState",
"DataSourceParameter",
"DataSource",
"GetDataSourceRequest",
Expand Down
6 changes: 3 additions & 3 deletions synth.metadata
Expand Up @@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/python-bigquery-datatransfer.git",
"sha": "3fb982cc0d4df052495b267f2a7bd3e1c3ea1683"
"sha": "af0406eedac1dc8c663b5c8f67f56255caeea2fa"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "3f87da2ed1ddc3566ef0810c4fc06a2682cc9f5f",
"internalRef": "343022252"
"sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907",
"internalRef": "347055288"
}
},
{
Expand Down
Expand Up @@ -4588,6 +4588,10 @@ def test_data_transfer_service_transport_channel_mtls_with_client_cert_source(
scopes=("https://www.googleapis.com/auth/cloud-platform",),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel
assert transport._ssl_channel_credentials == mock_ssl_cred
Expand Down Expand Up @@ -4629,6 +4633,10 @@ def test_data_transfer_service_transport_channel_mtls_with_adc(transport_class):
scopes=("https://www.googleapis.com/auth/cloud-platform",),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel

Expand Down