Skip to content

Commit

Permalink
test(sdk): add pod error msg output.
Browse files Browse the repository at this point in the history
Signed-off-by: Electronic-Waste <[email protected]>
  • Loading branch information
Electronic-Waste committed Jul 31, 2024
1 parent d8b0120 commit 5b67142
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sdk/python/v1beta1/kubeflow/katib/api/katib_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,10 +827,14 @@ def wait_for_experiment_condition(
logger.debug(
f"Pods in kubeflow namespace:\n{result.stdout}"
)
result = subprocess.run(['kubectl', 'get', 'pod', '-n', 'default'])
logger.debug(
f"Pods in default namespace:\n{result.stdout}"
)
for line in result.stdout.splitlines():
if "Error" in line:
pod_name = line.split()[0]
errmsg = subprocess.run(['kubectl', 'describe', 'pod', pod_name, '-n', 'kubeflow'])
logger.debug(
f"Pod {pod_name} in error state:\n{errmsg.stdout}"
)

logger.debug(
f"Waiting for Experiment: {namespace}/{name} to reach {expected_condition} condition\n\n\n"
)
Expand Down

0 comments on commit 5b67142

Please sign in to comment.