From 07908c009307485955886fc042c1c2b18b43adbd Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 23 Dec 2020 13:39:06 -0800 Subject: [PATCH] fix: remove gRPC send/recv limits (#39) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * feat: add a Type field to Product.proto. This field is currently output only. docs: Keep the API doc up-to-date PiperOrigin-RevId: 346583028 Source-Author: Google APIs Source-Date: Wed Dec 9 10:31:15 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 98476faded3ae01f2e0277f98086fc861d250325 Source-Link: https://github.com/googleapis/googleapis/commit/98476faded3ae01f2e0277f98086fc861d250325 * fix: remove client recv msg limit fix: add enums to `types/__init__.py` 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 * feat: Add ComputeHeadCursor RPC for Pub/Sub Lite. PiperOrigin-RevId: 347681363 Source-Author: Google APIs Source-Date: Tue Dec 15 13:31:04 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: f967ea0c0437a269515665ff9dbb69fcf134ddd9 Source-Link: https://github.com/googleapis/googleapis/commit/f967ea0c0437a269515665ff9dbb69fcf134ddd9 --- .../services/lookup_service/transports/__init__.py | 1 - .../services/lookup_service/transports/grpc.py | 10 +++++++++- .../services/lookup_service/transports/grpc_asyncio.py | 8 ++++++++ .../registration_service/transports/__init__.py | 1 - .../services/registration_service/transports/grpc.py | 10 +++++++++- .../registration_service/transports/grpc_asyncio.py | 8 ++++++++ google/cloud/servicedirectory_v1/types/__init__.py | 1 - google/cloud/servicedirectory_v1beta1/__init__.py | 4 ++-- .../services/lookup_service/transports/__init__.py | 1 - .../services/lookup_service/transports/grpc.py | 10 +++++++++- .../services/lookup_service/transports/grpc_asyncio.py | 8 ++++++++ .../registration_service/transports/__init__.py | 1 - .../services/registration_service/transports/grpc.py | 10 +++++++++- .../registration_service/transports/grpc_asyncio.py | 8 ++++++++ .../cloud/servicedirectory_v1beta1/types/__init__.py | 1 - synth.metadata | 6 +++--- .../gapic/servicedirectory_v1/test_lookup_service.py | 8 ++++++++ .../servicedirectory_v1/test_registration_service.py | 8 ++++++++ .../servicedirectory_v1beta1/test_lookup_service.py | 8 ++++++++ .../test_registration_service.py | 8 ++++++++ 20 files changed, 105 insertions(+), 15 deletions(-) diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/transports/__init__.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/__init__.py index 73a8094b..7f438daf 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/__init__.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/__init__.py @@ -28,7 +28,6 @@ _transport_registry["grpc"] = LookupServiceGrpcTransport _transport_registry["grpc_asyncio"] = LookupServiceGrpcAsyncIOTransport - __all__ = ( "LookupServiceTransport", "LookupServiceGrpcTransport", diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py index b6e133a2..ffe1b95a 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py @@ -146,6 +146,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: @@ -164,6 +168,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] @@ -190,7 +198,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/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py index 804a54bf..62f7acd6 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py @@ -191,6 +191,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: @@ -209,6 +213,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/servicedirectory_v1/services/registration_service/transports/__init__.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/__init__.py index 1d3a2a28..f98d90f9 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/__init__.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/__init__.py @@ -30,7 +30,6 @@ _transport_registry["grpc"] = RegistrationServiceGrpcTransport _transport_registry["grpc_asyncio"] = RegistrationServiceGrpcAsyncIOTransport - __all__ = ( "RegistrationServiceTransport", "RegistrationServiceGrpcTransport", diff --git a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py index a4f88015..fb2ade79 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py @@ -169,6 +169,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: @@ -187,6 +191,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] @@ -213,7 +221,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/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py index 4d00a2b1..ed330707 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py @@ -214,6 +214,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: @@ -232,6 +236,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/servicedirectory_v1/types/__init__.py b/google/cloud/servicedirectory_v1/types/__init__.py index b2e952d8..505b0c76 100644 --- a/google/cloud/servicedirectory_v1/types/__init__.py +++ b/google/cloud/servicedirectory_v1/types/__init__.py @@ -43,7 +43,6 @@ DeleteEndpointRequest, ) - __all__ = ( "Endpoint", "Service", diff --git a/google/cloud/servicedirectory_v1beta1/__init__.py b/google/cloud/servicedirectory_v1beta1/__init__.py index e20c9ec4..746d6a10 100644 --- a/google/cloud/servicedirectory_v1beta1/__init__.py +++ b/google/cloud/servicedirectory_v1beta1/__init__.py @@ -59,13 +59,13 @@ "ListNamespacesResponse", "ListServicesRequest", "ListServicesResponse", - "LookupServiceClient", "Namespace", + "RegistrationServiceClient", "ResolveServiceRequest", "ResolveServiceResponse", "Service", "UpdateEndpointRequest", "UpdateNamespaceRequest", "UpdateServiceRequest", - "RegistrationServiceClient", + "LookupServiceClient", ) diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/__init__.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/__init__.py index 73a8094b..7f438daf 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/__init__.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/__init__.py @@ -28,7 +28,6 @@ _transport_registry["grpc"] = LookupServiceGrpcTransport _transport_registry["grpc_asyncio"] = LookupServiceGrpcAsyncIOTransport - __all__ = ( "LookupServiceTransport", "LookupServiceGrpcTransport", diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py index 5332a1b0..6cbb7fbb 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py @@ -146,6 +146,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: @@ -164,6 +168,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] @@ -190,7 +198,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/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py index 2d5cee07..ff8ce54a 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py @@ -191,6 +191,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: @@ -209,6 +213,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/servicedirectory_v1beta1/services/registration_service/transports/__init__.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/__init__.py index 1d3a2a28..f98d90f9 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/__init__.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/__init__.py @@ -30,7 +30,6 @@ _transport_registry["grpc"] = RegistrationServiceGrpcTransport _transport_registry["grpc_asyncio"] = RegistrationServiceGrpcAsyncIOTransport - __all__ = ( "RegistrationServiceTransport", "RegistrationServiceGrpcTransport", diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py index 486af782..6f0b0e23 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py @@ -170,6 +170,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: @@ -188,6 +192,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] @@ -214,7 +222,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/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py index 882e3f3a..fa04dc14 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py @@ -215,6 +215,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: @@ -233,6 +237,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/servicedirectory_v1beta1/types/__init__.py b/google/cloud/servicedirectory_v1beta1/types/__init__.py index b2e952d8..505b0c76 100644 --- a/google/cloud/servicedirectory_v1beta1/types/__init__.py +++ b/google/cloud/servicedirectory_v1beta1/types/__init__.py @@ -43,7 +43,6 @@ DeleteEndpointRequest, ) - __all__ = ( "Endpoint", "Service", diff --git a/synth.metadata b/synth.metadata index dd42963b..3bad1b52 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-service-directory.git", - "sha": "1258a54cfd6cd82a73787b0d2c9ff5df076f71e7" + "sha": "e689791bf2024af664b36d1101c1af4b7b6b7582" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2d22118d88946059ab0c3a05588f577a6e82a0c4", - "internalRef": "345621354" + "sha": "f967ea0c0437a269515665ff9dbb69fcf134ddd9", + "internalRef": "347681363" } }, { diff --git a/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py b/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py index e130e3af..b910a744 100644 --- a/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py +++ b/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py @@ -801,6 +801,10 @@ def test_lookup_service_transport_channel_mtls_with_client_cert_source(transport 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 @@ -842,6 +846,10 @@ def test_lookup_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 diff --git a/tests/unit/gapic/servicedirectory_v1/test_registration_service.py b/tests/unit/gapic/servicedirectory_v1/test_registration_service.py index 819f41b8..2d4b9a81 100644 --- a/tests/unit/gapic/servicedirectory_v1/test_registration_service.py +++ b/tests/unit/gapic/servicedirectory_v1/test_registration_service.py @@ -4692,6 +4692,10 @@ def test_registration_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 @@ -4733,6 +4737,10 @@ def test_registration_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 diff --git a/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py b/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py index 7b916795..28985b07 100644 --- a/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py +++ b/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py @@ -803,6 +803,10 @@ def test_lookup_service_transport_channel_mtls_with_client_cert_source(transport 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 @@ -844,6 +848,10 @@ def test_lookup_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 diff --git a/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py b/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py index 27b66c38..7da36c65 100644 --- a/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py +++ b/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py @@ -4694,6 +4694,10 @@ def test_registration_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 @@ -4735,6 +4739,10 @@ def test_registration_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