Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: wait_for_task_state shows logs on failure #10029

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion e2e_tests/tests/cluster/test_agent_disable.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def test_disable_agent_experiment_resume() -> None:
assert len(slots) == 1
agent_id = slots[0]["agent_id"]

# Make the experiment preemptible.
exp_ref = noop.create_experiment(sess, [noop.Sleep(100)], config={"max_restarts": 0})
exp.wait_for_experiment_state(
sess,
Expand Down
6 changes: 4 additions & 2 deletions e2e_tests/tests/cluster/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import copy
import datetime
import http.server
import subprocess
import sys
import threading
import time
from typing import Any, Dict, List, Optional, Tuple, Type
Expand Down Expand Up @@ -179,7 +179,9 @@ def wait_for_task_state(
return
time.sleep(1)

print(subprocess.check_output(["det", "-m", conf.make_master_url(), "task", "logs", task_id]))
print("== begin task logs ==", file=sys.stderr)
print(detproc.check_output(sess, ["det", "task", "logs", task_id]), file=sys.stderr)
print("== end task logs ==", file=sys.stderr)
pytest.fail(f"{task_type} expected {state} state got {gotten_state} instead after {ticks} secs")


Expand Down
Loading