Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove client recv msg limit #704

Merged
merged 2 commits into from
Dec 10, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ class {{ service.name }}GrpcTransport({{ service.name }}Transport):
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 @@ -138,6 +142,10 @@ class {{ service.name }}GrpcTransport({{ service.name }}Transport):
credentials=credentials,
ssl_credentials=ssl_channel_credentials,
scopes=self.AUTH_SCOPES,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

self._stubs = {} # type: Dict[str, Callable]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,10 @@ def test_{{ service.name|snake_case }}_transport_channel_mtls_with_client_cert_s
),
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 @@ -787,6 +791,10 @@ def test_{{ service.name|snake_case }}_transport_channel_mtls_with_adc(
),
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
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ class {{ service.name }}GrpcTransport({{ service.name }}Transport):
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 @@ -148,6 +152,10 @@ class {{ service.name }}GrpcTransport({{ service.name }}Transport):
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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
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 @@ -192,6 +196,10 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
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
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ class {{ service.name }}RestTransport({{ service.name }}Transport):
self._host,
credentials=self._credentials,
scopes=self.AUTH_SCOPES,
options=[
Copy link
Contributor Author

@busunkim96 busunkim96 Dec 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the options wherever a channel was created, but am not 100% sure if it makes sense here (in the rest transport). @yon-mg could you take a look?

("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,10 @@ def test_{{ service.name|snake_case }}_transport_channel_mtls_with_client_cert_s
),
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 @@ -1276,6 +1280,10 @@ def test_{{ service.name|snake_case }}_transport_channel_mtls_with_adc(
),
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