ray
ray copied to clipboard
[Serve] New Dashboard can't render serve log
What happened + What you expected to happen
This is not a regression because old dashboard doesn't support log browsing. Serve creates log file in the /tmp/ray/session_latest/logs/serve directory. While you can find those log entry in the logs page, the content rendering failed with
react-dom.production.min.js:209 TypeError: r.filter is not a function
at t.default (Logs.tsx:180:18)
at Xi (react-dom.production.min.js:153:146)
at Go (react-dom.production.min.js:175:309)
at ys (react-dom.production.min.js:263:406)
at El (react-dom.production.min.js:246:265)
at fl (react-dom.production.min.js:246:194)
at sl (react-dom.production.min.js:239:172)
at react-dom.production.min.js:123:115
at t.unstable_runWithPriority (scheduler.production.min.js:19:467)
at qa (react-dom.production.min.js:122:325)
Because the error
{"result": false, "msg": "Traceback (most recent call last):\n File \"/Users/xmo/miniforge3/lib/python3.8/site-packages/yarl/_url.py\", line 170, in __new__\n port = val.port\n File \"/Users/xmo/miniforge3/lib/python3.8/urllib/parse.py\", line 177, in port\n raise ValueError(message) from None\nValueError: Port could not be cast to integer value as '52365http:'\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/Users/xmo/miniforge3/lib/python3.8/site-packages/aiohttp/client.py\", line 404, in _request\n url = URL(str_or_url)\n File \"/Users/xmo/miniforge3/lib/python3.8/site-packages/yarl/_url.py\", line 172, in __new__\n raise ValueError(\nValueError: Invalid URL: port can't be converted to integer\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/Users/xmo/Desktop/ray/ray/python/ray/dashboard/optional_utils.py\", line 95, in _handler_route\n return await handler(bind_info.instance, req)\n File \"/Users/xmo/Desktop/ray/ray/python/ray/dashboard/modules/log/log_head.py\", line 62, in get_log_from_proxy\n async with self._proxy_session.request(\n File \"/Users/xmo/miniforge3/lib/python3.8/site-packages/aiohttp/client.py\", line 1117, in __aenter__\n self._resp = await self._coro\n File \"/Users/xmo/miniforge3/lib/python3.8/site-packages/aiohttp/client.py\", line 406, in _request\n raise InvalidURL(str_or_url) from e\naiohttp.client_exceptions.InvalidURL: http://127.0.0.1:52365http://127.0.0.1:8265/logs/serve/http_proxy_127.0.0.1.log\n", "data": {}}
Another page simply returned "404: Not Found" because there's a # in the name.
Versions / Dependencies
master
Reproduction script
from ray import serve
@serve.deployment
def f(): print("HI")
dag = f.bind()
save this to app.py, and run serve run app:dag
Go to dashboard's log browser, try open up the three log file (controller, deployment, http proxy). The first one should work, the second one 404, the last one went blank page due to js error.
Issue Severity
Medium: It is a significant difficulty but I can work around it.
@alanwguo