Skip to content

Commit 6349b89

Browse files
fix: remove client recv msg limit fix: add enums to types/__init__.py (#131)
PiperOrigin-RevId: 347055288 Source-Author: Google APIs <[email protected]> Source-Date: Fri Dec 11 12:44:37 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: dd372aa22ded7a8ba6f0e03a80e06358a3fa0907 Source-Link: googleapis/googleapis@dd372aa
1 parent 3a25c8c commit 6349b89

File tree

14 files changed

+80
-10
lines changed

14 files changed

+80
-10
lines changed

google/cloud/logging_v2/services/config_service_v2/transports/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
_transport_registry["grpc"] = ConfigServiceV2GrpcTransport
2929
_transport_registry["grpc_asyncio"] = ConfigServiceV2GrpcAsyncIOTransport
3030

31-
3231
__all__ = (
3332
"ConfigServiceV2Transport",
3433
"ConfigServiceV2GrpcTransport",

google/cloud/logging_v2/services/config_service_v2/transports/grpc.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ def __init__(
147147
ssl_credentials=ssl_credentials,
148148
scopes=scopes or self.AUTH_SCOPES,
149149
quota_project_id=quota_project_id,
150+
options=[
151+
("grpc.max_send_message_length", -1),
152+
("grpc.max_receive_message_length", -1),
153+
],
150154
)
151155
self._ssl_channel_credentials = ssl_credentials
152156
else:
@@ -165,6 +169,10 @@ def __init__(
165169
ssl_credentials=ssl_channel_credentials,
166170
scopes=scopes or self.AUTH_SCOPES,
167171
quota_project_id=quota_project_id,
172+
options=[
173+
("grpc.max_send_message_length", -1),
174+
("grpc.max_receive_message_length", -1),
175+
],
168176
)
169177

170178
self._stubs = {} # type: Dict[str, Callable]
@@ -191,7 +199,7 @@ def create_channel(
191199
) -> grpc.Channel:
192200
"""Create and return a gRPC channel object.
193201
Args:
194-
address (Optionsl[str]): The host for the channel to use.
202+
address (Optional[str]): The host for the channel to use.
195203
credentials (Optional[~.Credentials]): The
196204
authorization credentials to attach to requests. These
197205
credentials identify this application to the service. If

google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py

+8
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ def __init__(
192192
ssl_credentials=ssl_credentials,
193193
scopes=scopes or self.AUTH_SCOPES,
194194
quota_project_id=quota_project_id,
195+
options=[
196+
("grpc.max_send_message_length", -1),
197+
("grpc.max_receive_message_length", -1),
198+
],
195199
)
196200
self._ssl_channel_credentials = ssl_credentials
197201
else:
@@ -210,6 +214,10 @@ def __init__(
210214
ssl_credentials=ssl_channel_credentials,
211215
scopes=scopes or self.AUTH_SCOPES,
212216
quota_project_id=quota_project_id,
217+
options=[
218+
("grpc.max_send_message_length", -1),
219+
("grpc.max_receive_message_length", -1),
220+
],
213221
)
214222

215223
# Run the base constructor.

google/cloud/logging_v2/services/logging_service_v2/transports/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
_transport_registry["grpc"] = LoggingServiceV2GrpcTransport
2929
_transport_registry["grpc_asyncio"] = LoggingServiceV2GrpcAsyncIOTransport
3030

31-
3231
__all__ = (
3332
"LoggingServiceV2Transport",
3433
"LoggingServiceV2GrpcTransport",

google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ def __init__(
147147
ssl_credentials=ssl_credentials,
148148
scopes=scopes or self.AUTH_SCOPES,
149149
quota_project_id=quota_project_id,
150+
options=[
151+
("grpc.max_send_message_length", -1),
152+
("grpc.max_receive_message_length", -1),
153+
],
150154
)
151155
self._ssl_channel_credentials = ssl_credentials
152156
else:
@@ -165,6 +169,10 @@ def __init__(
165169
ssl_credentials=ssl_channel_credentials,
166170
scopes=scopes or self.AUTH_SCOPES,
167171
quota_project_id=quota_project_id,
172+
options=[
173+
("grpc.max_send_message_length", -1),
174+
("grpc.max_receive_message_length", -1),
175+
],
168176
)
169177

170178
self._stubs = {} # type: Dict[str, Callable]
@@ -191,7 +199,7 @@ def create_channel(
191199
) -> grpc.Channel:
192200
"""Create and return a gRPC channel object.
193201
Args:
194-
address (Optionsl[str]): The host for the channel to use.
202+
address (Optional[str]): The host for the channel to use.
195203
credentials (Optional[~.Credentials]): The
196204
authorization credentials to attach to requests. These
197205
credentials identify this application to the service. If

google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py

+8
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ def __init__(
192192
ssl_credentials=ssl_credentials,
193193
scopes=scopes or self.AUTH_SCOPES,
194194
quota_project_id=quota_project_id,
195+
options=[
196+
("grpc.max_send_message_length", -1),
197+
("grpc.max_receive_message_length", -1),
198+
],
195199
)
196200
self._ssl_channel_credentials = ssl_credentials
197201
else:
@@ -210,6 +214,10 @@ def __init__(
210214
ssl_credentials=ssl_channel_credentials,
211215
scopes=scopes or self.AUTH_SCOPES,
212216
quota_project_id=quota_project_id,
217+
options=[
218+
("grpc.max_send_message_length", -1),
219+
("grpc.max_receive_message_length", -1),
220+
],
213221
)
214222

215223
# Run the base constructor.

google/cloud/logging_v2/services/metrics_service_v2/transports/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
_transport_registry["grpc"] = MetricsServiceV2GrpcTransport
2929
_transport_registry["grpc_asyncio"] = MetricsServiceV2GrpcAsyncIOTransport
3030

31-
3231
__all__ = (
3332
"MetricsServiceV2Transport",
3433
"MetricsServiceV2GrpcTransport",

google/cloud/logging_v2/services/metrics_service_v2/transports/grpc.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ def __init__(
147147
ssl_credentials=ssl_credentials,
148148
scopes=scopes or self.AUTH_SCOPES,
149149
quota_project_id=quota_project_id,
150+
options=[
151+
("grpc.max_send_message_length", -1),
152+
("grpc.max_receive_message_length", -1),
153+
],
150154
)
151155
self._ssl_channel_credentials = ssl_credentials
152156
else:
@@ -165,6 +169,10 @@ def __init__(
165169
ssl_credentials=ssl_channel_credentials,
166170
scopes=scopes or self.AUTH_SCOPES,
167171
quota_project_id=quota_project_id,
172+
options=[
173+
("grpc.max_send_message_length", -1),
174+
("grpc.max_receive_message_length", -1),
175+
],
168176
)
169177

170178
self._stubs = {} # type: Dict[str, Callable]
@@ -191,7 +199,7 @@ def create_channel(
191199
) -> grpc.Channel:
192200
"""Create and return a gRPC channel object.
193201
Args:
194-
address (Optionsl[str]): The host for the channel to use.
202+
address (Optional[str]): The host for the channel to use.
195203
credentials (Optional[~.Credentials]): The
196204
authorization credentials to attach to requests. These
197205
credentials identify this application to the service. If

google/cloud/logging_v2/services/metrics_service_v2/transports/grpc_asyncio.py

+8
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ def __init__(
192192
ssl_credentials=ssl_credentials,
193193
scopes=scopes or self.AUTH_SCOPES,
194194
quota_project_id=quota_project_id,
195+
options=[
196+
("grpc.max_send_message_length", -1),
197+
("grpc.max_receive_message_length", -1),
198+
],
195199
)
196200
self._ssl_channel_credentials = ssl_credentials
197201
else:
@@ -210,6 +214,10 @@ def __init__(
210214
ssl_credentials=ssl_channel_credentials,
211215
scopes=scopes or self.AUTH_SCOPES,
212216
quota_project_id=quota_project_id,
217+
options=[
218+
("grpc.max_send_message_length", -1),
219+
("grpc.max_receive_message_length", -1),
220+
],
213221
)
214222

215223
# Run the base constructor.

google/cloud/logging_v2/types/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
GetCmekSettingsRequest,
5555
UpdateCmekSettingsRequest,
5656
CmekSettings,
57+
LifecycleState,
5758
)
5859
from .logging import (
5960
DeleteLogRequest,
@@ -79,7 +80,6 @@
7980
DeleteLogMetricRequest,
8081
)
8182

82-
8383
__all__ = (
8484
"LogEntry",
8585
"LogEntryOperation",
@@ -117,6 +117,7 @@
117117
"GetCmekSettingsRequest",
118118
"UpdateCmekSettingsRequest",
119119
"CmekSettings",
120+
"LifecycleState",
120121
"DeleteLogRequest",
121122
"WriteLogEntriesRequest",
122123
"WriteLogEntriesResponse",

synth.metadata

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/python-logging.git",
7-
"sha": "7eaa5853f3a45e3db015a09841b98aeab461e6f3"
7+
"sha": "3a25c8cd9bd06e5a8f488945c9bc94380e2bf0d1"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "e8857c4c36948e7e0500377cd7fcecbf2459afc8",
15-
"internalRef": "344435830"
14+
"sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907",
15+
"internalRef": "347055288"
1616
}
1717
},
1818
{

tests/unit/gapic/logging_v2/test_config_service_v2.py

+8
Original file line numberDiff line numberDiff line change
@@ -5382,6 +5382,10 @@ def test_config_service_v2_transport_channel_mtls_with_client_cert_source(
53825382
),
53835383
ssl_credentials=mock_ssl_cred,
53845384
quota_project_id=None,
5385+
options=[
5386+
("grpc.max_send_message_length", -1),
5387+
("grpc.max_receive_message_length", -1),
5388+
],
53855389
)
53865390
assert transport.grpc_channel == mock_grpc_channel
53875391
assert transport._ssl_channel_credentials == mock_ssl_cred
@@ -5428,6 +5432,10 @@ def test_config_service_v2_transport_channel_mtls_with_adc(transport_class):
54285432
),
54295433
ssl_credentials=mock_ssl_cred,
54305434
quota_project_id=None,
5435+
options=[
5436+
("grpc.max_send_message_length", -1),
5437+
("grpc.max_receive_message_length", -1),
5438+
],
54315439
)
54325440
assert transport.grpc_channel == mock_grpc_channel
54335441

tests/unit/gapic/logging_v2/test_logging_service_v2.py

+8
Original file line numberDiff line numberDiff line change
@@ -2048,6 +2048,10 @@ def test_logging_service_v2_transport_channel_mtls_with_client_cert_source(
20482048
),
20492049
ssl_credentials=mock_ssl_cred,
20502050
quota_project_id=None,
2051+
options=[
2052+
("grpc.max_send_message_length", -1),
2053+
("grpc.max_receive_message_length", -1),
2054+
],
20512055
)
20522056
assert transport.grpc_channel == mock_grpc_channel
20532057
assert transport._ssl_channel_credentials == mock_ssl_cred
@@ -2095,6 +2099,10 @@ def test_logging_service_v2_transport_channel_mtls_with_adc(transport_class):
20952099
),
20962100
ssl_credentials=mock_ssl_cred,
20972101
quota_project_id=None,
2102+
options=[
2103+
("grpc.max_send_message_length", -1),
2104+
("grpc.max_receive_message_length", -1),
2105+
],
20982106
)
20992107
assert transport.grpc_channel == mock_grpc_channel
21002108

tests/unit/gapic/logging_v2/test_metrics_service_v2.py

+8
Original file line numberDiff line numberDiff line change
@@ -1993,6 +1993,10 @@ def test_metrics_service_v2_transport_channel_mtls_with_client_cert_source(
19931993
),
19941994
ssl_credentials=mock_ssl_cred,
19951995
quota_project_id=None,
1996+
options=[
1997+
("grpc.max_send_message_length", -1),
1998+
("grpc.max_receive_message_length", -1),
1999+
],
19962000
)
19972001
assert transport.grpc_channel == mock_grpc_channel
19982002
assert transport._ssl_channel_credentials == mock_ssl_cred
@@ -2040,6 +2044,10 @@ def test_metrics_service_v2_transport_channel_mtls_with_adc(transport_class):
20402044
),
20412045
ssl_credentials=mock_ssl_cred,
20422046
quota_project_id=None,
2047+
options=[
2048+
("grpc.max_send_message_length", -1),
2049+
("grpc.max_receive_message_length", -1),
2050+
],
20432051
)
20442052
assert transport.grpc_channel == mock_grpc_channel
20452053

0 commit comments

Comments
 (0)