Skip to content

test: add debug code for grpcclient. #168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/spaceone/core/pygrpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down
Loading