Skip to content

Commit fd8839a

Browse files
committed
fix: handle validate properly on CI/CD
1 parent 041f693 commit fd8839a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/ansys/geometry/core/connection/client.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@
2323

2424
import atexit
2525
import logging
26+
import os
2627
from pathlib import Path
2728
import time
2829
from typing import Optional
30+
import warnings
2931

3032
from beartype import beartype as check_input_types
3133
import grpc
@@ -166,6 +168,13 @@ def wait_until_healthy(
166168
t_max = time.time() + timeout
167169
t_out = 0.1
168170

171+
# If transport mode is not specified, default to insecure when running in CI
172+
if transport_mode is None and os.getenv("IS_WORKFLOW_RUNNING") is not None:
173+
warnings.warn(
174+
"Transport mode forced to 'insecure' when running in CI workflows.",
175+
)
176+
transport_mode = "insecure"
177+
169178
# If the channel is a string, create a channel using the default insecure channel
170179
channel_creation_required = True if isinstance(channel, str) else False
171180
tmp_channel = None

0 commit comments

Comments
 (0)