Skip to content
This repository was archived by the owner on Dec 10, 2023. It is now read-only.

Commit 76e0439

Browse files
fix: remove gRPC send/recv limits; add enums to types/__init__.py (#89)
1 parent bb995c7 commit 76e0439

File tree

7 files changed

+46
-412
lines changed

7 files changed

+46
-412
lines changed

google/cloud/dlp_v2/services/dlp_service/transports/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
_transport_registry["grpc"] = DlpServiceGrpcTransport
2929
_transport_registry["grpc_asyncio"] = DlpServiceGrpcAsyncIOTransport
3030

31-
3231
__all__ = (
3332
"DlpServiceTransport",
3433
"DlpServiceGrpcTransport",

google/cloud/dlp_v2/services/dlp_service/transports/grpc.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ def __init__(
155155
ssl_credentials=ssl_credentials,
156156
scopes=scopes or self.AUTH_SCOPES,
157157
quota_project_id=quota_project_id,
158+
options=[
159+
("grpc.max_send_message_length", -1),
160+
("grpc.max_receive_message_length", -1),
161+
],
158162
)
159163
self._ssl_channel_credentials = ssl_credentials
160164
else:
@@ -173,6 +177,10 @@ def __init__(
173177
ssl_credentials=ssl_channel_credentials,
174178
scopes=scopes or self.AUTH_SCOPES,
175179
quota_project_id=quota_project_id,
180+
options=[
181+
("grpc.max_send_message_length", -1),
182+
("grpc.max_receive_message_length", -1),
183+
],
176184
)
177185

178186
self._stubs = {} # type: Dict[str, Callable]
@@ -199,7 +207,7 @@ def create_channel(
199207
) -> grpc.Channel:
200208
"""Create and return a gRPC channel object.
201209
Args:
202-
address (Optionsl[str]): The host for the channel to use.
210+
address (Optional[str]): The host for the channel to use.
203211
credentials (Optional[~.Credentials]): The
204212
authorization credentials to attach to requests. These
205213
credentials identify this application to the service. If

google/cloud/dlp_v2/services/dlp_service/transports/grpc_asyncio.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ def __init__(
200200
ssl_credentials=ssl_credentials,
201201
scopes=scopes or self.AUTH_SCOPES,
202202
quota_project_id=quota_project_id,
203+
options=[
204+
("grpc.max_send_message_length", -1),
205+
("grpc.max_receive_message_length", -1),
206+
],
203207
)
204208
self._ssl_channel_credentials = ssl_credentials
205209
else:
@@ -218,6 +222,10 @@ def __init__(
218222
ssl_credentials=ssl_channel_credentials,
219223
scopes=scopes or self.AUTH_SCOPES,
220224
quota_project_id=quota_project_id,
225+
options=[
226+
("grpc.max_send_message_length", -1),
227+
("grpc.max_receive_message_length", -1),
228+
],
221229
)
222230

223231
# Run the base constructor.

google/cloud/dlp_v2/types/__init__.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
BigQueryField,
3939
EntityId,
4040
TableOptions,
41+
Likelihood,
42+
FileType,
4143
)
4244
from .dlp import (
4345
ExcludeInfoTypes,
@@ -164,9 +166,15 @@
164166
HybridContentItem,
165167
HybridFindingDetails,
166168
HybridInspectResponse,
169+
RelationalOperator,
170+
MatchingType,
171+
ContentOption,
172+
MetadataType,
173+
InfoTypeSupportedBy,
174+
DlpJobType,
175+
StoredInfoTypeState,
167176
)
168177

169-
170178
__all__ = (
171179
"InfoType",
172180
"StoredType",
@@ -190,6 +198,8 @@
190198
"BigQueryField",
191199
"EntityId",
192200
"TableOptions",
201+
"Likelihood",
202+
"FileType",
193203
"ExcludeInfoTypes",
194204
"ExclusionRule",
195205
"InspectionRule",
@@ -314,4 +324,11 @@
314324
"HybridContentItem",
315325
"HybridFindingDetails",
316326
"HybridInspectResponse",
327+
"RelationalOperator",
328+
"MatchingType",
329+
"ContentOption",
330+
"MetadataType",
331+
"InfoTypeSupportedBy",
332+
"DlpJobType",
333+
"StoredInfoTypeState",
317334
)

0 commit comments

Comments
 (0)