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

[serve] Remove dashboard's dependency on Serve #23389

Merged
merged 13 commits into from
Mar 22, 2022
Prev Previous commit
Next Next commit
Check that standard dashboard features work without serve dependency
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

shrekris-anyscale committed Mar 22, 2022
commit afa2111c8564c03b8aedf96bada76f43e43ff841
13 changes: 12 additions & 1 deletion dashboard/tests/test_dashboard.py
Original file line number Diff line number Diff line change
@@ -715,7 +715,18 @@ def test_dashboard_does_not_depend_on_serve():
with pytest.raises(ImportError):
from ray import serve # noqa: F401

ray.init(include_dashboard=True)
ctx = ray.init(include_dashboard=True)

# Ensure standard dashboard features, like snapshot, still work
response = requests.get(f"http://{ctx.dashboard_url}/api/snapshot/")
assert response.status_code == 200
assert response.json()["result"] is True
assert "snapshot" in response.json()["data"]

# Check that Serve-dependent features fail
response = requests.get(f"http://{ctx.dashboard_url}/api/serve/deployments/")
assert response.status_code == 500
assert "ModuleNotFoundError" in response.text

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ray dashboard doesn't work with minimal install. ray dashboard only works when ray[default] is installed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, I added a script to perform the test with a default installation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you check regular dashboard process works (e.g. /api/snapshot) and serve doesn't?


if __name__ == "__main__":