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

Commit 62cd894

Browse files
fix: remove grpc send/recv limit (#62)
1 parent 409385c commit 62cd894

File tree

11 files changed

+53
-9
lines changed

11 files changed

+53
-9
lines changed

google/cloud/billing/budgets_v1/services/budget_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"] = BudgetServiceGrpcTransport
2929
_transport_registry["grpc_asyncio"] = BudgetServiceGrpcAsyncIOTransport
3030

31-
3231
__all__ = (
3332
"BudgetServiceTransport",
3433
"BudgetServiceGrpcTransport",

google/cloud/billing/budgets_v1/services/budget_service/transports/grpc.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ def __init__(
150150
ssl_credentials=ssl_credentials,
151151
scopes=scopes or self.AUTH_SCOPES,
152152
quota_project_id=quota_project_id,
153+
options=[
154+
("grpc.max_send_message_length", -1),
155+
("grpc.max_receive_message_length", -1),
156+
],
153157
)
154158
self._ssl_channel_credentials = ssl_credentials
155159
else:
@@ -168,6 +172,10 @@ def __init__(
168172
ssl_credentials=ssl_channel_credentials,
169173
scopes=scopes or self.AUTH_SCOPES,
170174
quota_project_id=quota_project_id,
175+
options=[
176+
("grpc.max_send_message_length", -1),
177+
("grpc.max_receive_message_length", -1),
178+
],
171179
)
172180

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

google/cloud/billing/budgets_v1/services/budget_service/transports/grpc_asyncio.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ def __init__(
195195
ssl_credentials=ssl_credentials,
196196
scopes=scopes or self.AUTH_SCOPES,
197197
quota_project_id=quota_project_id,
198+
options=[
199+
("grpc.max_send_message_length", -1),
200+
("grpc.max_receive_message_length", -1),
201+
],
198202
)
199203
self._ssl_channel_credentials = ssl_credentials
200204
else:
@@ -213,6 +217,10 @@ def __init__(
213217
ssl_credentials=ssl_channel_credentials,
214218
scopes=scopes or self.AUTH_SCOPES,
215219
quota_project_id=quota_project_id,
220+
options=[
221+
("grpc.max_send_message_length", -1),
222+
("grpc.max_receive_message_length", -1),
223+
],
216224
)
217225

218226
# Run the base constructor.

google/cloud/billing/budgets_v1/types/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
DeleteBudgetRequest,
3333
)
3434

35-
3635
__all__ = (
3736
"Budget",
3837
"BudgetAmount",

google/cloud/billing/budgets_v1beta1/services/budget_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"] = BudgetServiceGrpcTransport
2929
_transport_registry["grpc_asyncio"] = BudgetServiceGrpcAsyncIOTransport
3030

31-
3231
__all__ = (
3332
"BudgetServiceTransport",
3433
"BudgetServiceGrpcTransport",

google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ def __init__(
150150
ssl_credentials=ssl_credentials,
151151
scopes=scopes or self.AUTH_SCOPES,
152152
quota_project_id=quota_project_id,
153+
options=[
154+
("grpc.max_send_message_length", -1),
155+
("grpc.max_receive_message_length", -1),
156+
],
153157
)
154158
self._ssl_channel_credentials = ssl_credentials
155159
else:
@@ -168,6 +172,10 @@ def __init__(
168172
ssl_credentials=ssl_channel_credentials,
169173
scopes=scopes or self.AUTH_SCOPES,
170174
quota_project_id=quota_project_id,
175+
options=[
176+
("grpc.max_send_message_length", -1),
177+
("grpc.max_receive_message_length", -1),
178+
],
171179
)
172180

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

google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc_asyncio.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ def __init__(
195195
ssl_credentials=ssl_credentials,
196196
scopes=scopes or self.AUTH_SCOPES,
197197
quota_project_id=quota_project_id,
198+
options=[
199+
("grpc.max_send_message_length", -1),
200+
("grpc.max_receive_message_length", -1),
201+
],
198202
)
199203
self._ssl_channel_credentials = ssl_credentials
200204
else:
@@ -213,6 +217,10 @@ def __init__(
213217
ssl_credentials=ssl_channel_credentials,
214218
scopes=scopes or self.AUTH_SCOPES,
215219
quota_project_id=quota_project_id,
220+
options=[
221+
("grpc.max_send_message_length", -1),
222+
("grpc.max_receive_message_length", -1),
223+
],
216224
)
217225

218226
# Run the base constructor.

google/cloud/billing/budgets_v1beta1/types/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
DeleteBudgetRequest,
3333
)
3434

35-
3635
__all__ = (
3736
"Budget",
3837
"BudgetAmount",

synth.metadata

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/python-billingbudgets.git",
7-
"sha": "4c62f9c89128f70f84ef886345feeb7cb45b4888"
7+
"sha": "409385ccda7bbdfc5185d19297b057ecde7185c1"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "6c0f55f33f882cf97fd3135e93b144ad9c94ebab",
15-
"internalRef": "341478628"
14+
"sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907",
15+
"internalRef": "347055288"
1616
}
1717
},
1818
{

tests/unit/gapic/budgets_v1/test_budget_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,6 +1837,10 @@ def test_budget_service_transport_channel_mtls_with_client_cert_source(transport
18371837
),
18381838
ssl_credentials=mock_ssl_cred,
18391839
quota_project_id=None,
1840+
options=[
1841+
("grpc.max_send_message_length", -1),
1842+
("grpc.max_receive_message_length", -1),
1843+
],
18401844
)
18411845
assert transport.grpc_channel == mock_grpc_channel
18421846
assert transport._ssl_channel_credentials == mock_ssl_cred
@@ -1881,6 +1885,10 @@ def test_budget_service_transport_channel_mtls_with_adc(transport_class):
18811885
),
18821886
ssl_credentials=mock_ssl_cred,
18831887
quota_project_id=None,
1888+
options=[
1889+
("grpc.max_send_message_length", -1),
1890+
("grpc.max_receive_message_length", -1),
1891+
],
18841892
)
18851893
assert transport.grpc_channel == mock_grpc_channel
18861894

tests/unit/gapic/budgets_v1beta1/test_budget_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,6 +1486,10 @@ def test_budget_service_transport_channel_mtls_with_client_cert_source(transport
14861486
),
14871487
ssl_credentials=mock_ssl_cred,
14881488
quota_project_id=None,
1489+
options=[
1490+
("grpc.max_send_message_length", -1),
1491+
("grpc.max_receive_message_length", -1),
1492+
],
14891493
)
14901494
assert transport.grpc_channel == mock_grpc_channel
14911495
assert transport._ssl_channel_credentials == mock_ssl_cred
@@ -1530,6 +1534,10 @@ def test_budget_service_transport_channel_mtls_with_adc(transport_class):
15301534
),
15311535
ssl_credentials=mock_ssl_cred,
15321536
quota_project_id=None,
1537+
options=[
1538+
("grpc.max_send_message_length", -1),
1539+
("grpc.max_receive_message_length", -1),
1540+
],
15331541
)
15341542
assert transport.grpc_channel == mock_grpc_channel
15351543

0 commit comments

Comments
 (0)