[flaky test] Fix test_cli by disabling config cache for dashboard test (#14755)

This commit is contained in:
Eric Liang 2021-03-18 12:02:25 -07:00 committed by GitHub
parent 351540e17e
commit ef249c98b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 5 deletions

View file

@ -130,7 +130,13 @@ def cli(logging_level, logging_format):
type=int,
default=ray_constants.DEFAULT_DASHBOARD_PORT,
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."""
# Sleeping in a loop is preferable to `sleep infinity` because the latter
# only works on linux.
@ -147,7 +153,8 @@ def dashboard(cluster_config_file, cluster_name, port, remote_port):
exec_cluster(
cluster_config_file,
override_cluster_name=cluster_name,
port_forward=port_forward)
port_forward=port_forward,
no_config_cache=no_config_cache)
click.echo("Successfully established connection.")
except Exception as e:
raise click.ClickException(

View file

@ -352,7 +352,8 @@ def test_ray_dashboard(configure_lang, configure_aws, _unlink_test_ssh_key):
])
_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)

View file

@ -1,6 +1,5 @@
Attempting to establish dashboard locally at localhost:8265 connected to remote port 8265
Loaded cached provider configuration
If you experience issues with the cloud provider, try re-running the command with --no-config-cache.
Checking AWS environment settings
Fetched IP: .+
Forwarding ports
ubuntu@ip-.+:~\$ exit