Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions src/ansys/fluent/core/launcher/fluent_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,10 @@ def configure_container_dict(
auto_remove=True,
)

if fluent_image.split(":")[1] == "v24.1.0":
container_dict_default.update(tty=True)

for k, v in container_dict_default.items():
if k not in container_dict:
container_dict[k] = v

logger.debug(f"container_dict after processing: {container_dict}")

host_server_info_file = Path(host_mount_path) / container_server_info_file.name

return (
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/fluent/core/services/datamodel_tui.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ def execute(self, *args, **kwargs) -> Any:
if self._path.startswith("/query/"):
return self._execute_query(request)
else:
logger.debug(f"TUI Command: {request}")
request_str = " ".join(str(request).split())
logger.debug(f"TUI Command: {request_str}")
return self._execute_command(request)

def get_doc_string(self, include_unavailable: bool = False) -> str:
Expand Down
15 changes: 12 additions & 3 deletions src/ansys/fluent/core/services/interceptors.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Interceptor classes to use with gRPC services."""

import logging
import os
from typing import Any

from google.protobuf.json_format import MessageToDict
Expand All @@ -9,6 +10,7 @@
from ansys.fluent.core.services.batch_ops import BatchOps

network_logger = logging.getLogger("pyfluent.networking")
log_bytes_limit = int(os.getenv("PYFLUENT_GRPC_LOG_BYTES_LIMIT", 1000))


class TracingInterceptor(grpc.UnaryUnaryClientInterceptor):
Expand All @@ -29,9 +31,16 @@ def _intercept_call(
)
response = continuation(client_call_details, request)
if not response.exception():
network_logger.debug(
f"GRPC_TRACE: response = {MessageToDict(response.result())}"
)
response_bytes = response.result().ByteSize()
if not log_bytes_limit or response_bytes < log_bytes_limit:
network_logger.debug(
f"GRPC_TRACE: response = {MessageToDict(response.result())}"
)
else:
network_logger.debug(
f"GRPC_TRACE: response hidden, {response_bytes} bytes > "
f"{log_bytes_limit} bytes limit. To see the response, set PYFLUENT_GRPC_LOG_BYTES_LIMIT to 0."
)
return response

def intercept_unary_unary(
Expand Down