Skip to content

Commit e21506f

Browse files
fix: remove client recv msg limit and add enums to types/__init__.py (#68)
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 2df04be commit e21506f

File tree

6 files changed

+28
-6
lines changed

6 files changed

+28
-6
lines changed

packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/services/container_analysis/transports/__init__.py

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

31-
3231
__all__ = (
3332
"ContainerAnalysisTransport",
3433
"ContainerAnalysisGrpcTransport",

packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/services/container_analysis/transports/grpc.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ def __init__(
162162
ssl_credentials=ssl_credentials,
163163
scopes=scopes or self.AUTH_SCOPES,
164164
quota_project_id=quota_project_id,
165+
options=[
166+
("grpc.max_send_message_length", -1),
167+
("grpc.max_receive_message_length", -1),
168+
],
165169
)
166170
self._ssl_channel_credentials = ssl_credentials
167171
else:
@@ -180,6 +184,10 @@ def __init__(
180184
ssl_credentials=ssl_channel_credentials,
181185
scopes=scopes or self.AUTH_SCOPES,
182186
quota_project_id=quota_project_id,
187+
options=[
188+
("grpc.max_send_message_length", -1),
189+
("grpc.max_receive_message_length", -1),
190+
],
183191
)
184192

185193
self._stubs = {} # type: Dict[str, Callable]
@@ -206,7 +214,7 @@ def create_channel(
206214
) -> grpc.Channel:
207215
"""Create and return a gRPC channel object.
208216
Args:
209-
address (Optionsl[str]): The host for the channel to use.
217+
address (Optional[str]): The host for the channel to use.
210218
credentials (Optional[~.Credentials]): The
211219
authorization credentials to attach to requests. These
212220
credentials identify this application to the service. If

packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/services/container_analysis/transports/grpc_asyncio.py

+8
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ def __init__(
207207
ssl_credentials=ssl_credentials,
208208
scopes=scopes or self.AUTH_SCOPES,
209209
quota_project_id=quota_project_id,
210+
options=[
211+
("grpc.max_send_message_length", -1),
212+
("grpc.max_receive_message_length", -1),
213+
],
210214
)
211215
self._ssl_channel_credentials = ssl_credentials
212216
else:
@@ -225,6 +229,10 @@ def __init__(
225229
ssl_credentials=ssl_channel_credentials,
226230
scopes=scopes or self.AUTH_SCOPES,
227231
quota_project_id=quota_project_id,
232+
options=[
233+
("grpc.max_send_message_length", -1),
234+
("grpc.max_receive_message_length", -1),
235+
],
228236
)
229237

230238
# Run the base constructor.

packages/google-cloud-containeranalysis/google/cloud/devtools/containeranalysis_v1/types/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
VulnerabilityOccurrencesSummary,
2121
)
2222

23-
2423
__all__ = (
2524
"GetVulnerabilityOccurrencesSummaryRequest",
2625
"VulnerabilityOccurrencesSummary",

packages/google-cloud-containeranalysis/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-containeranalysis.git",
7-
"sha": "48c62ed2739ecee8acc4b9244e56be293c08e481"
7+
"sha": "be81fcf7e212059dc4b518882c9113703102b86f"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "07d41a7e5cade45aba6f0d277c89722b48f2c956",
15-
"internalRef": "339292950"
14+
"sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907",
15+
"internalRef": "347055288"
1616
}
1717
},
1818
{

packages/google-cloud-containeranalysis/tests/unit/gapic/containeranalysis_v1/test_container_analysis.py

+8
Original file line numberDiff line numberDiff line change
@@ -1592,6 +1592,10 @@ def test_container_analysis_transport_channel_mtls_with_client_cert_source(
15921592
scopes=("https://www.googleapis.com/auth/cloud-platform",),
15931593
ssl_credentials=mock_ssl_cred,
15941594
quota_project_id=None,
1595+
options=[
1596+
("grpc.max_send_message_length", -1),
1597+
("grpc.max_receive_message_length", -1),
1598+
],
15951599
)
15961600
assert transport.grpc_channel == mock_grpc_channel
15971601
assert transport._ssl_channel_credentials == mock_ssl_cred
@@ -1633,6 +1637,10 @@ def test_container_analysis_transport_channel_mtls_with_adc(transport_class):
16331637
scopes=("https://www.googleapis.com/auth/cloud-platform",),
16341638
ssl_credentials=mock_ssl_cred,
16351639
quota_project_id=None,
1640+
options=[
1641+
("grpc.max_send_message_length", -1),
1642+
("grpc.max_receive_message_length", -1),
1643+
],
16361644
)
16371645
assert transport.grpc_channel == mock_grpc_channel
16381646

0 commit comments

Comments
 (0)