Skip to content

Commit

Permalink
test(sdk): add error 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 Aug 1, 2024
1 parent e61bc6d commit 71d3aac
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions sdk/python/v1beta1/kubeflow/katib/api/katib_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,21 @@ def wait_for_experiment_condition(

# Otherwise, print the current Experiment results and sleep for the pooling interval.
utils.print_experiment_status(experiment)
import subprocess
result = subprocess.run(['kubectl', 'get', 'pod'],capture_output=True, text=True)
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]
pod_info = subprocess.run(
['kubectl', 'describe', 'pod', pod_name],
capture_output=True, text=True
)
logger.debug(
f"pod {pod_name} in error state:\n{pod_info.stdout}"
)
logger.debug(
f"Waiting for Experiment: {namespace}/{name} to reach {expected_condition} condition\n\n\n"
)
Expand Down

0 comments on commit 71d3aac

Please sign in to comment.