mirror of
https://github.com/vale981/ray
synced 2025-03-08 19:41:38 -05:00
[cli] make test failure less verbose + print ssh (#10767)
This commit is contained in:
parent
a43817f34b
commit
660aee6311
4 changed files with 18 additions and 8 deletions
|
@ -728,9 +728,13 @@ def get_or_create_head_node(config,
|
||||||
cf.bold(" ray exec {}{} {}"), config_file, modifiers,
|
cf.bold(" ray exec {}{} {}"), config_file, modifiers,
|
||||||
quote(monitor_str))
|
quote(monitor_str))
|
||||||
|
|
||||||
cli_logger.print("Connect to a terminal on the cluster head")
|
cli_logger.print("Connect to a terminal on the cluster head:")
|
||||||
cli_logger.print(
|
cli_logger.print(
|
||||||
cf.bold(" ray attach {}{}"), config_file, modifiers)
|
cf.bold(" ray attach {}{}"), config_file, modifiers)
|
||||||
|
|
||||||
|
remote_shell_str = updater.cmd_runner.remote_shell_command_str()
|
||||||
|
cli_logger.print("Get a remote shell to the cluster manually:")
|
||||||
|
cli_logger.print(" {}", remote_shell_str.strip())
|
||||||
finally:
|
finally:
|
||||||
provider.cleanup()
|
provider.cleanup()
|
||||||
|
|
||||||
|
|
|
@ -91,21 +91,23 @@ def _debug_check_line_by_line(result, expected_lines):
|
||||||
i = 0
|
i = 0
|
||||||
|
|
||||||
for out in output_lines:
|
for out in output_lines:
|
||||||
print(out)
|
|
||||||
|
|
||||||
if i >= len(expected_lines):
|
if i >= len(expected_lines):
|
||||||
i += 1
|
i += 1
|
||||||
print("!!!!!! Expected fewer lines")
|
print("!!!!!! Expected fewer lines")
|
||||||
print("\n".join(output_lines[i:]))
|
context = [f"CONTEXT: {line}" for line in output_lines[i - 3:i]]
|
||||||
|
print("\n".join(context))
|
||||||
|
extra = [f"-- {line}" for line in output_lines[i:]]
|
||||||
|
print("\n".join(extra))
|
||||||
break
|
break
|
||||||
|
|
||||||
exp = expected_lines[i]
|
exp = expected_lines[i]
|
||||||
matched = re.fullmatch(exp + r" *", out) is not None
|
matched = re.fullmatch(exp + r" *", out) is not None
|
||||||
if not matched:
|
if not matched:
|
||||||
print(f"!!!!!!! Expected (regex): {repr(exp)}")
|
print(f"!!! ERROR: Expected (regex): {repr(exp)}")
|
||||||
|
print(f"Got: {out}")
|
||||||
i += 1
|
i += 1
|
||||||
if i < len(expected_lines):
|
if i < len(expected_lines):
|
||||||
print("!!!!!!! Expected (regex):")
|
print("!!! ERROR: Expected extra lines (regex):")
|
||||||
for line in expected_lines[i:]:
|
for line in expected_lines[i:]:
|
||||||
|
|
||||||
print(repr(line))
|
print(repr(line))
|
||||||
|
|
|
@ -41,5 +41,7 @@ Acquiring an up-to-date head node
|
||||||
Useful commands
|
Useful commands
|
||||||
Monitor autoscaling with
|
Monitor autoscaling with
|
||||||
ray exec .+ 'tail -n 100 -f /tmp/ray/session_latest/logs/monitor\*'
|
ray exec .+ 'tail -n 100 -f /tmp/ray/session_latest/logs/monitor\*'
|
||||||
Connect to a terminal on the cluster head
|
Connect to a terminal on the cluster head:
|
||||||
ray attach .+
|
ray attach .+
|
||||||
|
Get a remote shell to the cluster manually:
|
||||||
|
ssh .+
|
||||||
|
|
|
@ -70,5 +70,7 @@
|
||||||
.+\.py.*Useful commands
|
.+\.py.*Useful commands
|
||||||
.+\.py.*Monitor autoscaling with
|
.+\.py.*Monitor autoscaling with
|
||||||
.+\.py.* ray exec .+ 'tail -n 100 -f .+
|
.+\.py.* ray exec .+ 'tail -n 100 -f .+
|
||||||
.+\.py.*Connect to a terminal on the cluster head
|
.+\.py.*Connect to a terminal on the cluster head:
|
||||||
.+\.py.* ray attach .+
|
.+\.py.* ray attach .+
|
||||||
|
.+\.py.*Get a remote shell to the cluster manually:
|
||||||
|
.+\.py.* ssh.+\.pem.+
|
||||||
|
|
Loading…
Add table
Reference in a new issue