Skip to content
Permalink
Browse files
fix: remove grpc send/recieve limits (#259)
  • Loading branch information
yoshi-automation committed Dec 23, 2020
1 parent 3d6a29d commit fd2840c10f92b03da7f4b40ac69c602220757c0a
@@ -90,7 +90,6 @@
"ModifyPushConfigRequest",
"PublishRequest",
"PublishResponse",
"PublisherClient",
"PubsubMessage",
"PullRequest",
"PullResponse",
@@ -102,10 +101,11 @@
"Snapshot",
"StreamingPullRequest",
"StreamingPullResponse",
"SubscriberClient",
"Subscription",
"Topic",
"UpdateSnapshotRequest",
"UpdateSubscriptionRequest",
"UpdateTopicRequest",
"SubscriberClient",
"PublisherClient",
)
@@ -28,7 +28,6 @@
_transport_registry["grpc"] = PublisherGrpcTransport
_transport_registry["grpc_asyncio"] = PublisherGrpcAsyncIOTransport


__all__ = (
"PublisherTransport",
"PublisherGrpcTransport",
@@ -150,6 +150,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:
@@ -168,6 +172,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]
@@ -194,7 +202,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
@@ -195,6 +195,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:
@@ -213,6 +217,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.
@@ -28,7 +28,6 @@
_transport_registry["grpc"] = SubscriberGrpcTransport
_transport_registry["grpc_asyncio"] = SubscriberGrpcAsyncIOTransport


__all__ = (
"SubscriberTransport",
"SubscriberGrpcTransport",
@@ -152,6 +152,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:
@@ -170,6 +174,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]
@@ -196,7 +204,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
@@ -197,6 +197,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:
@@ -215,6 +219,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.
@@ -61,7 +61,6 @@
SeekResponse,
)


__all__ = (
"MessageStoragePolicy",
"Topic",
@@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/python-pubsub.git",
"sha": "f3f4e5add32128bf238b2fbab3bcf0f5b23269d3"
"sha": "258414727827e56d2678ada28b9bbd88b5c6aa6f"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "53eb2512a55caabcbad1898225080a2a3dfcb6aa",
"internalRef": "346818879"
"sha": "0509f4bc8c86495f50a92f536bddc625797eda63",
"internalRef": "347398860"
}
},
{
@@ -2672,6 +2672,10 @@ def test_publisher_transport_channel_mtls_with_client_cert_source(transport_clas
),
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
@@ -2713,6 +2717,10 @@ def test_publisher_transport_channel_mtls_with_adc(transport_class):
),
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

@@ -3966,6 +3966,10 @@ def test_subscriber_transport_channel_mtls_with_client_cert_source(transport_cla
),
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
@@ -4007,6 +4011,10 @@ def test_subscriber_transport_channel_mtls_with_adc(transport_class):
),
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

0 comments on commit fd2840c

Please sign in to comment.