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

Commit

Permalink
fix: remove client side receive limits (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Dec 22, 2020
1 parent b84dce0 commit 628ada4
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 2 deletions.
Expand Up @@ -151,6 +151,10 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -169,6 +173,10 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

self._stubs = {} # type: Dict[str, Callable]
Expand Down
Expand Up @@ -196,6 +196,10 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -214,6 +218,10 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

# Run the base constructor.
Expand Down
97 changes: 95 additions & 2 deletions synth.metadata
Expand Up @@ -3,8 +3,8 @@
{
"git": {
"name": ".",
"remote": "git@github.com:googleapis/python-os-config",
"sha": "164c39adc34e029c814142c3a8dc43c22654a0b0"
"remote": "https://github.com/googleapis/python-os-config.git",
"sha": "b84dce022c84d79e8193c6881338fb3f79345740"
}
},
{
Expand Down Expand Up @@ -40,5 +40,98 @@
"generator": "gapic-generator-python"
}
}
],
"generatedFiles": [
".coveragerc",
".flake8",
".github/CONTRIBUTING.md",
".github/ISSUE_TEMPLATE/bug_report.md",
".github/ISSUE_TEMPLATE/feature_request.md",
".github/ISSUE_TEMPLATE/support_request.md",
".github/PULL_REQUEST_TEMPLATE.md",
".github/release-please.yml",
".github/snippet-bot.yml",
".gitignore",
".kokoro/build.sh",
".kokoro/continuous/common.cfg",
".kokoro/continuous/continuous.cfg",
".kokoro/docker/docs/Dockerfile",
".kokoro/docker/docs/fetch_gpg_keys.sh",
".kokoro/docs/common.cfg",
".kokoro/docs/docs-presubmit.cfg",
".kokoro/docs/docs.cfg",
".kokoro/populate-secrets.sh",
".kokoro/presubmit/common.cfg",
".kokoro/presubmit/presubmit.cfg",
".kokoro/publish-docs.sh",
".kokoro/release.sh",
".kokoro/release/common.cfg",
".kokoro/release/release.cfg",
".kokoro/samples/lint/common.cfg",
".kokoro/samples/lint/continuous.cfg",
".kokoro/samples/lint/periodic.cfg",
".kokoro/samples/lint/presubmit.cfg",
".kokoro/samples/python3.6/common.cfg",
".kokoro/samples/python3.6/continuous.cfg",
".kokoro/samples/python3.6/periodic.cfg",
".kokoro/samples/python3.6/presubmit.cfg",
".kokoro/samples/python3.7/common.cfg",
".kokoro/samples/python3.7/continuous.cfg",
".kokoro/samples/python3.7/periodic.cfg",
".kokoro/samples/python3.7/presubmit.cfg",
".kokoro/samples/python3.8/common.cfg",
".kokoro/samples/python3.8/continuous.cfg",
".kokoro/samples/python3.8/periodic.cfg",
".kokoro/samples/python3.8/presubmit.cfg",
".kokoro/test-samples.sh",
".kokoro/trampoline.sh",
".kokoro/trampoline_v2.sh",
".trampolinerc",
"CODE_OF_CONDUCT.md",
"CONTRIBUTING.rst",
"LICENSE",
"MANIFEST.in",
"docs/_static/custom.css",
"docs/_templates/layout.html",
"docs/conf.py",
"docs/multiprocessing.rst",
"docs/osconfig_v1/services.rst",
"docs/osconfig_v1/types.rst",
"google/cloud/osconfig/__init__.py",
"google/cloud/osconfig/py.typed",
"google/cloud/osconfig_v1/__init__.py",
"google/cloud/osconfig_v1/py.typed",
"google/cloud/osconfig_v1/services/__init__.py",
"google/cloud/osconfig_v1/services/os_config_service/__init__.py",
"google/cloud/osconfig_v1/services/os_config_service/async_client.py",
"google/cloud/osconfig_v1/services/os_config_service/client.py",
"google/cloud/osconfig_v1/services/os_config_service/pagers.py",
"google/cloud/osconfig_v1/services/os_config_service/transports/__init__.py",
"google/cloud/osconfig_v1/services/os_config_service/transports/base.py",
"google/cloud/osconfig_v1/services/os_config_service/transports/grpc.py",
"google/cloud/osconfig_v1/services/os_config_service/transports/grpc_asyncio.py",
"google/cloud/osconfig_v1/types/__init__.py",
"google/cloud/osconfig_v1/types/inventory.py",
"google/cloud/osconfig_v1/types/osconfig_common.py",
"google/cloud/osconfig_v1/types/osconfig_service.py",
"google/cloud/osconfig_v1/types/patch_deployments.py",
"google/cloud/osconfig_v1/types/patch_jobs.py",
"mypy.ini",
"noxfile.py",
"renovate.json",
"samples/AUTHORING_GUIDE.md",
"samples/CONTRIBUTING.md",
"scripts/decrypt-secrets.sh",
"scripts/fixup_osconfig_v1_keywords.py",
"scripts/readme-gen/readme_gen.py",
"scripts/readme-gen/templates/README.tmpl.rst",
"scripts/readme-gen/templates/auth.tmpl.rst",
"scripts/readme-gen/templates/auth_api_key.tmpl.rst",
"scripts/readme-gen/templates/install_deps.tmpl.rst",
"scripts/readme-gen/templates/install_portaudio.tmpl.rst",
"setup.cfg",
"testing/.gitignore",
"tests/unit/gapic/osconfig_v1/__init__.py",
"tests/unit/gapic/osconfig_v1/test_os_config_service.py"
]
}
8 changes: 8 additions & 0 deletions tests/unit/gapic/osconfig_v1/test_os_config_service.py
Expand Up @@ -3027,6 +3027,10 @@ def test_os_config_service_transport_channel_mtls_with_client_cert_source(
scopes=("https://www.googleapis.com/auth/cloud-platform",),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel
assert transport._ssl_channel_credentials == mock_ssl_cred
Expand Down Expand Up @@ -3068,6 +3072,10 @@ def test_os_config_service_transport_channel_mtls_with_adc(transport_class):
scopes=("https://www.googleapis.com/auth/cloud-platform",),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel

Expand Down

0 comments on commit 628ada4

Please sign in to comment.