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

Commit 628ada4

Browse files
fix: remove client side receive limits (#29)
1 parent b84dce0 commit 628ada4

File tree

4 files changed

+119
-2
lines changed

4 files changed

+119
-2
lines changed

google/cloud/osconfig_v1/services/os_config_service/transports/grpc.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ def __init__(
151151
ssl_credentials=ssl_credentials,
152152
scopes=scopes or self.AUTH_SCOPES,
153153
quota_project_id=quota_project_id,
154+
options=[
155+
("grpc.max_send_message_length", -1),
156+
("grpc.max_receive_message_length", -1),
157+
],
154158
)
155159
self._ssl_channel_credentials = ssl_credentials
156160
else:
@@ -169,6 +173,10 @@ def __init__(
169173
ssl_credentials=ssl_channel_credentials,
170174
scopes=scopes or self.AUTH_SCOPES,
171175
quota_project_id=quota_project_id,
176+
options=[
177+
("grpc.max_send_message_length", -1),
178+
("grpc.max_receive_message_length", -1),
179+
],
172180
)
173181

174182
self._stubs = {} # type: Dict[str, Callable]

google/cloud/osconfig_v1/services/os_config_service/transports/grpc_asyncio.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ def __init__(
196196
ssl_credentials=ssl_credentials,
197197
scopes=scopes or self.AUTH_SCOPES,
198198
quota_project_id=quota_project_id,
199+
options=[
200+
("grpc.max_send_message_length", -1),
201+
("grpc.max_receive_message_length", -1),
202+
],
199203
)
200204
self._ssl_channel_credentials = ssl_credentials
201205
else:
@@ -214,6 +218,10 @@ def __init__(
214218
ssl_credentials=ssl_channel_credentials,
215219
scopes=scopes or self.AUTH_SCOPES,
216220
quota_project_id=quota_project_id,
221+
options=[
222+
("grpc.max_send_message_length", -1),
223+
("grpc.max_receive_message_length", -1),
224+
],
217225
)
218226

219227
# Run the base constructor.

synth.metadata

Lines changed: 95 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
{
44
"git": {
55
"name": ".",
6-
"remote": "git@github.com:googleapis/python-os-config",
7-
"sha": "164c39adc34e029c814142c3a8dc43c22654a0b0"
6+
"remote": "https://github.com/googleapis/python-os-config.git",
7+
"sha": "b84dce022c84d79e8193c6881338fb3f79345740"
88
}
99
},
1010
{
@@ -40,5 +40,98 @@
4040
"generator": "gapic-generator-python"
4141
}
4242
}
43+
],
44+
"generatedFiles": [
45+
".coveragerc",
46+
".flake8",
47+
".github/CONTRIBUTING.md",
48+
".github/ISSUE_TEMPLATE/bug_report.md",
49+
".github/ISSUE_TEMPLATE/feature_request.md",
50+
".github/ISSUE_TEMPLATE/support_request.md",
51+
".github/PULL_REQUEST_TEMPLATE.md",
52+
".github/release-please.yml",
53+
".github/snippet-bot.yml",
54+
".gitignore",
55+
".kokoro/build.sh",
56+
".kokoro/continuous/common.cfg",
57+
".kokoro/continuous/continuous.cfg",
58+
".kokoro/docker/docs/Dockerfile",
59+
".kokoro/docker/docs/fetch_gpg_keys.sh",
60+
".kokoro/docs/common.cfg",
61+
".kokoro/docs/docs-presubmit.cfg",
62+
".kokoro/docs/docs.cfg",
63+
".kokoro/populate-secrets.sh",
64+
".kokoro/presubmit/common.cfg",
65+
".kokoro/presubmit/presubmit.cfg",
66+
".kokoro/publish-docs.sh",
67+
".kokoro/release.sh",
68+
".kokoro/release/common.cfg",
69+
".kokoro/release/release.cfg",
70+
".kokoro/samples/lint/common.cfg",
71+
".kokoro/samples/lint/continuous.cfg",
72+
".kokoro/samples/lint/periodic.cfg",
73+
".kokoro/samples/lint/presubmit.cfg",
74+
".kokoro/samples/python3.6/common.cfg",
75+
".kokoro/samples/python3.6/continuous.cfg",
76+
".kokoro/samples/python3.6/periodic.cfg",
77+
".kokoro/samples/python3.6/presubmit.cfg",
78+
".kokoro/samples/python3.7/common.cfg",
79+
".kokoro/samples/python3.7/continuous.cfg",
80+
".kokoro/samples/python3.7/periodic.cfg",
81+
".kokoro/samples/python3.7/presubmit.cfg",
82+
".kokoro/samples/python3.8/common.cfg",
83+
".kokoro/samples/python3.8/continuous.cfg",
84+
".kokoro/samples/python3.8/periodic.cfg",
85+
".kokoro/samples/python3.8/presubmit.cfg",
86+
".kokoro/test-samples.sh",
87+
".kokoro/trampoline.sh",
88+
".kokoro/trampoline_v2.sh",
89+
".trampolinerc",
90+
"CODE_OF_CONDUCT.md",
91+
"CONTRIBUTING.rst",
92+
"LICENSE",
93+
"MANIFEST.in",
94+
"docs/_static/custom.css",
95+
"docs/_templates/layout.html",
96+
"docs/conf.py",
97+
"docs/multiprocessing.rst",
98+
"docs/osconfig_v1/services.rst",
99+
"docs/osconfig_v1/types.rst",
100+
"google/cloud/osconfig/__init__.py",
101+
"google/cloud/osconfig/py.typed",
102+
"google/cloud/osconfig_v1/__init__.py",
103+
"google/cloud/osconfig_v1/py.typed",
104+
"google/cloud/osconfig_v1/services/__init__.py",
105+
"google/cloud/osconfig_v1/services/os_config_service/__init__.py",
106+
"google/cloud/osconfig_v1/services/os_config_service/async_client.py",
107+
"google/cloud/osconfig_v1/services/os_config_service/client.py",
108+
"google/cloud/osconfig_v1/services/os_config_service/pagers.py",
109+
"google/cloud/osconfig_v1/services/os_config_service/transports/__init__.py",
110+
"google/cloud/osconfig_v1/services/os_config_service/transports/base.py",
111+
"google/cloud/osconfig_v1/services/os_config_service/transports/grpc.py",
112+
"google/cloud/osconfig_v1/services/os_config_service/transports/grpc_asyncio.py",
113+
"google/cloud/osconfig_v1/types/__init__.py",
114+
"google/cloud/osconfig_v1/types/inventory.py",
115+
"google/cloud/osconfig_v1/types/osconfig_common.py",
116+
"google/cloud/osconfig_v1/types/osconfig_service.py",
117+
"google/cloud/osconfig_v1/types/patch_deployments.py",
118+
"google/cloud/osconfig_v1/types/patch_jobs.py",
119+
"mypy.ini",
120+
"noxfile.py",
121+
"renovate.json",
122+
"samples/AUTHORING_GUIDE.md",
123+
"samples/CONTRIBUTING.md",
124+
"scripts/decrypt-secrets.sh",
125+
"scripts/fixup_osconfig_v1_keywords.py",
126+
"scripts/readme-gen/readme_gen.py",
127+
"scripts/readme-gen/templates/README.tmpl.rst",
128+
"scripts/readme-gen/templates/auth.tmpl.rst",
129+
"scripts/readme-gen/templates/auth_api_key.tmpl.rst",
130+
"scripts/readme-gen/templates/install_deps.tmpl.rst",
131+
"scripts/readme-gen/templates/install_portaudio.tmpl.rst",
132+
"setup.cfg",
133+
"testing/.gitignore",
134+
"tests/unit/gapic/osconfig_v1/__init__.py",
135+
"tests/unit/gapic/osconfig_v1/test_os_config_service.py"
43136
]
44137
}

tests/unit/gapic/osconfig_v1/test_os_config_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3027,6 +3027,10 @@ def test_os_config_service_transport_channel_mtls_with_client_cert_source(
30273027
scopes=("https://www.googleapis.com/auth/cloud-platform",),
30283028
ssl_credentials=mock_ssl_cred,
30293029
quota_project_id=None,
3030+
options=[
3031+
("grpc.max_send_message_length", -1),
3032+
("grpc.max_receive_message_length", -1),
3033+
],
30303034
)
30313035
assert transport.grpc_channel == mock_grpc_channel
30323036
assert transport._ssl_channel_credentials == mock_ssl_cred
@@ -3068,6 +3072,10 @@ def test_os_config_service_transport_channel_mtls_with_adc(transport_class):
30683072
scopes=("https://www.googleapis.com/auth/cloud-platform",),
30693073
ssl_credentials=mock_ssl_cred,
30703074
quota_project_id=None,
3075+
options=[
3076+
("grpc.max_send_message_length", -1),
3077+
("grpc.max_receive_message_length", -1),
3078+
],
30713079
)
30723080
assert transport.grpc_channel == mock_grpc_channel
30733081

0 commit comments

Comments
 (0)