Skip to content

Commit

Permalink
delete fetching pod logs
Browse files Browse the repository at this point in the history
Signed-off-by: helenxie-bit <helenxiehz@gmail.com>
  • Loading branch information
helenxie-bit committed Jan 25, 2025
1 parent 865379e commit d1ea629
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 28 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/e2e-test-tune-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,6 @@ jobs:
tune-api: true
training-operator: true

- name: Fetch Pod Description and Logs for Experiment # This step is added to debug the test failure
if: always()
run: |
echo "Fetching all the pods..."
kubectl get pods -n default
POD_NAME_1=$(kubectl get pods -n default --no-headers -o custom-columns=":metadata.name" | grep tune-example-1 | grep master)
echo "Fetching pod description for tune-example-1..."
kubectl describe pod $POD_NAME_1 -n default
echo "Fetching pod logs for tune-example-1..."
kubectl logs $POD_NAME_1 -n default --all-containers
POD_NAME_2=$(kubectl get pods -n default --no-headers -o custom-columns=":metadata.name" | grep tune-example-2 | grep master)
echo "Fetching pod description for tune-example-2..."
kubectl describe pod $POD_NAME_2 -n default
echo "Fetching pod logs for tune-example-2..."
kubectl logs $POD_NAME_2 -n default --all-containers
- name: Delete Experiment for e2e test
if: always()
run: |
kubectl delete experiment tune-example-1 -n default
kubectl delete experiment tune-example-2 -n default
strategy:
fail-fast: false
matrix:
Expand Down
10 changes: 10 additions & 0 deletions test/e2e/v1beta1/scripts/gh-actions/run-e2e-tune-api.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ def run_e2e_experiment_create_by_tune_with_external_model(
logging.info("---------------------------------------------------------------")
logging.info(f"E2E is failed for Experiment created by tune: {exp_namespace}/{exp_name}-1")
raise e
finally:
# Delete the Experiment.
logging.info("---------------------------------------------------------------")
logging.info("---------------------------------------------------------------")
katib_client.delete_experiment(f"{exp_name}-1", exp_namespace)

try:
run_e2e_experiment_create_by_tune_with_external_model(katib_client, f"{exp_name}-2", exp_namespace)
Expand All @@ -175,3 +180,8 @@ def run_e2e_experiment_create_by_tune_with_external_model(
logging.info("---------------------------------------------------------------")
logging.info(f"E2E is failed for Experiment created by tune: {exp_namespace}/{exp_name}-2")
raise e
finally:
# Delete the Experiment.
logging.info("---------------------------------------------------------------")
logging.info("---------------------------------------------------------------")
katib_client.delete_experiment(f"{exp_name}-2", exp_namespace)

0 comments on commit d1ea629

Please sign in to comment.