Make it so pydantic is required before we launch dashboard api server (#27345)

* Make it so pydantic is required before we launch dashboard api server

Signed-off-by: Alan Guo <aguo@anyscale.com>
This commit is contained in:
Alan Guo 2022-08-03 14:24:51 -07:00 committed by GitHub
parent fd381927c1
commit 2cf9ecf48e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
# These imports determine whether or not a user has the required dependencies
# to launch the optional dashboard API server.
# If any of these imports fail, the dashboard API server will not be launched.
# Please add important dashboard-api dependencies to this list.
# These checks have to come first because aiohttp looks # These checks have to come first because aiohttp looks
# for opencensus, too, and raises a different error otherwise. # for opencensus, too, and raises a different error otherwise.
import opencensus # noqa: F401 import opencensus # noqa: F401
@ -10,3 +15,4 @@ import aiohttp_cors # noqa: F401
from aiohttp import hdrs # noqa: F401 from aiohttp import hdrs # noqa: F401
from aiohttp.typedefs import PathLike # noqa: F401 from aiohttp.typedefs import PathLike # noqa: F401
from aiohttp.web import RouteDef # noqa: F401 from aiohttp.web import RouteDef # noqa: F401
import pydantic # noqa: F401

View file

@ -211,6 +211,8 @@ if setup_spec.type == SetupType.RAY:
"fsspec", "fsspec",
], ],
"default": [ "default": [
# If adding dependencies necessary to launch the dashboard api server,
# please add it to dashboard/optional_deps.py as well.
"aiohttp >= 3.7", "aiohttp >= 3.7",
"aiohttp_cors", "aiohttp_cors",
"colorful", "colorful",