Skip to content

Commit 866d050

Browse files
committed
Feedback: Ruth
1 parent d1bdcf4 commit 866d050

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/model_serving/model_server/inference_graph/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def dog_breed_inference_graph(
4242
nodes=nodes,
4343
) as inference_graph:
4444
inference_graph.wait_for_condition(condition=inference_graph.Condition.READY, status="True")
45-
time.sleep(5) # This wait helps OpenShift to fully enable the Route, if the InferenceGraph is exposed
4645
yield inference_graph
4746

4847

utilities/inference_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def run_inference_flow(
404404
except JSONDecodeError:
405405
return {"output": out}
406406

407-
@retry(wait_timeout=Timeout.TIMEOUT_30SEC, sleep=5)
407+
@retry(wait_timeout=Timeout.TIMEOUT_30SEC, sleep=5, exceptions_dict={AssertionError:[]})
408408
def run_inference(self, cmd: str) -> str:
409409
"""
410410
Run inference command
@@ -439,6 +439,9 @@ def run_inference(self, cmd: str) -> str:
439439

440440
else:
441441
res, out, err = run_command(command=shlex.split(cmd), verify_stderr=False, check=False)
442+
if res and "http/1.0 503 service unavailable" in out.lower():
443+
LOGGER.info(f"The Route for {self.get_inference_url()} is not ready yet (503 error)")
444+
raise AssertionError("The Route is not ready yet")
442445

443446
if not res:
444447
raise ValueError(f"Inference failed with error: {err}\nOutput: {out}\nCommand: {cmd}")

0 commit comments

Comments
 (0)