mirror of
https://github.com/vale981/ray
synced 2025-03-08 11:31:40 -05:00
[flaky test] Fix test_cli by disabling config cache for dashboard test (#14755)
This commit is contained in:
parent
351540e17e
commit
ef249c98b1
3 changed files with 12 additions and 5 deletions
|
@ -130,7 +130,13 @@ def cli(logging_level, logging_format):
|
||||||
type=int,
|
type=int,
|
||||||
default=ray_constants.DEFAULT_DASHBOARD_PORT,
|
default=ray_constants.DEFAULT_DASHBOARD_PORT,
|
||||||
help="The remote port your dashboard runs on")
|
help="The remote port your dashboard runs on")
|
||||||
def dashboard(cluster_config_file, cluster_name, port, remote_port):
|
@click.option(
|
||||||
|
"--no-config-cache",
|
||||||
|
is_flag=True,
|
||||||
|
default=False,
|
||||||
|
help="Disable the local cluster config cache.")
|
||||||
|
def dashboard(cluster_config_file, cluster_name, port, remote_port,
|
||||||
|
no_config_cache):
|
||||||
"""Port-forward a Ray cluster's dashboard to the local machine."""
|
"""Port-forward a Ray cluster's dashboard to the local machine."""
|
||||||
# Sleeping in a loop is preferable to `sleep infinity` because the latter
|
# Sleeping in a loop is preferable to `sleep infinity` because the latter
|
||||||
# only works on linux.
|
# only works on linux.
|
||||||
|
@ -147,7 +153,8 @@ def dashboard(cluster_config_file, cluster_name, port, remote_port):
|
||||||
exec_cluster(
|
exec_cluster(
|
||||||
cluster_config_file,
|
cluster_config_file,
|
||||||
override_cluster_name=cluster_name,
|
override_cluster_name=cluster_name,
|
||||||
port_forward=port_forward)
|
port_forward=port_forward,
|
||||||
|
no_config_cache=no_config_cache)
|
||||||
click.echo("Successfully established connection.")
|
click.echo("Successfully established connection.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise click.ClickException(
|
raise click.ClickException(
|
||||||
|
|
|
@ -352,7 +352,8 @@ def test_ray_dashboard(configure_lang, configure_aws, _unlink_test_ssh_key):
|
||||||
])
|
])
|
||||||
_die_on_error(result)
|
_die_on_error(result)
|
||||||
|
|
||||||
result = runner.invoke(scripts.dashboard, [DEFAULT_TEST_CONFIG_PATH])
|
result = runner.invoke(scripts.dashboard,
|
||||||
|
[DEFAULT_TEST_CONFIG_PATH, "--no-config-cache"])
|
||||||
_check_output_via_pattern("test_ray_dashboard.txt", result)
|
_check_output_via_pattern("test_ray_dashboard.txt", result)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
Attempting to establish dashboard locally at localhost:8265 connected to remote port 8265
|
Attempting to establish dashboard locally at localhost:8265 connected to remote port 8265
|
||||||
Loaded cached provider configuration
|
Checking AWS environment settings
|
||||||
If you experience issues with the cloud provider, try re-running the command with --no-config-cache.
|
|
||||||
Fetched IP: .+
|
Fetched IP: .+
|
||||||
Forwarding ports
|
Forwarding ports
|
||||||
ubuntu@ip-.+:~\$ exit
|
ubuntu@ip-.+:~\$ exit
|
||||||
|
|
Loading…
Add table
Reference in a new issue