From ee511ed3e79ba5a2a17bb0cb2d8a6ae9ebf3f5a2 Mon Sep 17 00:00:00 2001 From: mz-ko Date: Mon, 7 Apr 2025 15:13:19 +0900 Subject: [PATCH 1/2] test: add debug code for grpcclient. Signed-off-by: MZC01-HYUPKO --- src/spaceone/core/pygrpc/client.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/spaceone/core/pygrpc/client.py b/src/spaceone/core/pygrpc/client.py index 7fe083b..1082c8b 100644 --- a/src/spaceone/core/pygrpc/client.py +++ b/src/spaceone/core/pygrpc/client.py @@ -111,9 +111,11 @@ def _retry_call( while True: try: + _LOGGER.debug(f"client._retry_call.start!!!") response_or_iterator = continuation( client_call_details, request_or_iterator ) + _LOGGER.debug(f"client._retry_call.response_or_iterator Success!!!") if is_stream: response_or_iterator = self._generate_response(response_or_iterator) @@ -123,7 +125,11 @@ def _retry_call( return response_or_iterator except Exception as e: + _LOGGER.debug(f"client._retry_call.Exception: {e}") if e.error_code == "ERROR_GRPC_CONNECTION": + _LOGGER.debug( + f"client._retry_call.retry_call: {retries} || _MAX_RETRIES: {_MAX_RETRIES}" + ) if retries >= _MAX_RETRIES: channel = e.meta.get("channel") if channel in _GRPC_CHANNEL: @@ -160,7 +166,9 @@ def _intercept_call( is_response_stream, ) - def intercept_unary_unary(self, continuation, client_call_details, request): + def intercept_unary_unary( + self, continuation: object, client_call_details: object, request: object + ) -> object: return self._intercept_call( continuation, client_call_details, request, False, False ) From 01a9872ee008f9bf4a77d071ffbeef3a5478de62 Mon Sep 17 00:00:00 2001 From: mz-ko Date: Mon, 7 Apr 2025 15:15:03 +0900 Subject: [PATCH 2/2] test: rollback function. Signed-off-by: MZC01-HYUPKO --- src/spaceone/core/pygrpc/client.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/spaceone/core/pygrpc/client.py b/src/spaceone/core/pygrpc/client.py index 1082c8b..08bb8d9 100644 --- a/src/spaceone/core/pygrpc/client.py +++ b/src/spaceone/core/pygrpc/client.py @@ -166,9 +166,7 @@ def _intercept_call( is_response_stream, ) - def intercept_unary_unary( - self, continuation: object, client_call_details: object, request: object - ) -> object: + def intercept_unary_unary(self, continuation, client_call_details, request): return self._intercept_call( continuation, client_call_details, request, False, False )