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

Commit

Permalink
fix: remove recv msg limit, add enums to types (#84)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 347055288
  • Loading branch information
yoshi-automation committed Dec 14, 2020
1 parent af0406e commit 3e2bbef
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 deletions.
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

0 comments on commit 3e2bbef

Please sign in to comment.