From 9207193fbaae7c6d91d87ffb9db57223f02544d6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 28 Dec 2020 11:55:27 -0800 Subject: [PATCH] fix: remove client recv msg limit fix: add enums to `types/__init__.py` (#60) PiperOrigin-RevId: 347055288 Source-Author: Google APIs Source-Date: Fri Dec 11 12:44:37 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: dd372aa22ded7a8ba6f0e03a80e06358a3fa0907 Source-Link: https://github.com/googleapis/googleapis/commit/dd372aa22ded7a8ba6f0e03a80e06358a3fa0907 Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> --- .../services/cluster_manager/transports/__init__.py | 1 - .../services/cluster_manager/transports/grpc.py | 10 +++++++++- .../cluster_manager/transports/grpc_asyncio.py | 8 ++++++++ google/cloud/container_v1/types/__init__.py | 1 - .../services/cluster_manager/transports/__init__.py | 1 - .../services/cluster_manager/transports/grpc.py | 10 +++++++++- .../cluster_manager/transports/grpc_asyncio.py | 8 ++++++++ google/cloud/container_v1beta1/types/__init__.py | 5 ++++- synth.metadata | 4 ++-- tests/unit/gapic/container_v1/test_cluster_manager.py | 8 ++++++++ .../gapic/container_v1beta1/test_cluster_manager.py | 8 ++++++++ 11 files changed, 56 insertions(+), 8 deletions(-) diff --git a/google/cloud/container_v1/services/cluster_manager/transports/__init__.py b/google/cloud/container_v1/services/cluster_manager/transports/__init__.py index 71d01ec8..554ca670 100644 --- a/google/cloud/container_v1/services/cluster_manager/transports/__init__.py +++ b/google/cloud/container_v1/services/cluster_manager/transports/__init__.py @@ -28,7 +28,6 @@ _transport_registry["grpc"] = ClusterManagerGrpcTransport _transport_registry["grpc_asyncio"] = ClusterManagerGrpcAsyncIOTransport - __all__ = ( "ClusterManagerTransport", "ClusterManagerGrpcTransport", diff --git a/google/cloud/container_v1/services/cluster_manager/transports/grpc.py b/google/cloud/container_v1/services/cluster_manager/transports/grpc.py index 984a9db3..bf669fd8 100644 --- a/google/cloud/container_v1/services/cluster_manager/transports/grpc.py +++ b/google/cloud/container_v1/services/cluster_manager/transports/grpc.py @@ -147,6 +147,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: @@ -165,6 +169,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] @@ -191,7 +199,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If diff --git a/google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py b/google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py index 6a66a1ba..8f38cdd2 100644 --- a/google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py +++ b/google/cloud/container_v1/services/cluster_manager/transports/grpc_asyncio.py @@ -192,6 +192,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: @@ -210,6 +214,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. diff --git a/google/cloud/container_v1/types/__init__.py b/google/cloud/container_v1/types/__init__.py index d35b9168..2f25cd40 100644 --- a/google/cloud/container_v1/types/__init__.py +++ b/google/cloud/container_v1/types/__init__.py @@ -113,7 +113,6 @@ ShieldedNodes, ) - __all__ = ( "NodeConfig", "ShieldedInstanceConfig", diff --git a/google/cloud/container_v1beta1/services/cluster_manager/transports/__init__.py b/google/cloud/container_v1beta1/services/cluster_manager/transports/__init__.py index 71d01ec8..554ca670 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/transports/__init__.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/transports/__init__.py @@ -28,7 +28,6 @@ _transport_registry["grpc"] = ClusterManagerGrpcTransport _transport_registry["grpc_asyncio"] = ClusterManagerGrpcAsyncIOTransport - __all__ = ( "ClusterManagerTransport", "ClusterManagerGrpcTransport", diff --git a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py index 3ebce39c..4c538ffb 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc.py @@ -147,6 +147,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: @@ -165,6 +169,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] @@ -191,7 +199,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If diff --git a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py index 9a9a39a4..368aa383 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/transports/grpc_asyncio.py @@ -192,6 +192,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: @@ -210,6 +214,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. diff --git a/google/cloud/container_v1beta1/types/__init__.py b/google/cloud/container_v1beta1/types/__init__.py index fe493d78..204352e3 100644 --- a/google/cloud/container_v1beta1/types/__init__.py +++ b/google/cloud/container_v1beta1/types/__init__.py @@ -127,9 +127,10 @@ NotificationConfig, ConfidentialNodes, UpgradeEvent, + DatapathProvider, + UpgradeResourceType, ) - __all__ = ( "LinuxNodeConfig", "NodeKubeletConfig", @@ -242,4 +243,6 @@ "NotificationConfig", "ConfidentialNodes", "UpgradeEvent", + "DatapathProvider", + "UpgradeResourceType", ) diff --git a/synth.metadata b/synth.metadata index 394a1a4c..d84cc6a4 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "df4fd38d040c5c8a0869936205bca13fb64b2cff", - "internalRef": "344443035" + "sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907", + "internalRef": "347055288" } }, { diff --git a/tests/unit/gapic/container_v1/test_cluster_manager.py b/tests/unit/gapic/container_v1/test_cluster_manager.py index 04ced1bd..2df46f62 100644 --- a/tests/unit/gapic/container_v1/test_cluster_manager.py +++ b/tests/unit/gapic/container_v1/test_cluster_manager.py @@ -9181,6 +9181,10 @@ def test_cluster_manager_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 @@ -9222,6 +9226,10 @@ def test_cluster_manager_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 diff --git a/tests/unit/gapic/container_v1beta1/test_cluster_manager.py b/tests/unit/gapic/container_v1beta1/test_cluster_manager.py index a46e18f7..ba526cb9 100644 --- a/tests/unit/gapic/container_v1beta1/test_cluster_manager.py +++ b/tests/unit/gapic/container_v1beta1/test_cluster_manager.py @@ -9501,6 +9501,10 @@ def test_cluster_manager_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 @@ -9542,6 +9546,10 @@ def test_cluster_manager_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