dask / distributed

A distributed task scheduler for Dask
https://distributed.dask.org
BSD 3-Clause "New" or "Revised" License
1.57k stars 717 forks source link

Attempting to view details of a key held by a worker results in a 404 #8866

Open krishanbhasin-px opened 2 weeks ago

krishanbhasin-px commented 2 weeks ago

Describe the issue: When I'm running my scheduler, I navigate to the info tab, click on a worker and attempt to view information about one of the keys its holding. Instead of viewing details about the key, I get a 404.

Note that the URL I'm being sent to is wrong; it has a spurious + in it.

http://localhost:8787/info/task/%28%27getitem-fused-assign-c649044b30796c30cb7b26ffb459d668%27%2C+0%29.html (what the worker's page sends me to)

fails, but

http://localhost:8787/info/task/%28%27getitem-fused-assign-c649044b30796c30cb7b26ffb459d668%27%2C0%29.html

is correct (I removed the + at the very end)

Minimal Complete Verifiable Example:

Anything else we need to know?: Happy to contribute a PR but I'm having a bit of fun finding the relevant code

Environment:

krishanbhasin-px commented 6 days ago

Relevant code snippet:

https://github.com/dask/distributed/blob/80b3af58a2e9c279221a570651c252221a8fc78c/distributed/http/scheduler/info.py#L130-L137

jacobtomlinson commented 5 days ago

This might be relevant too

https://github.com/dask/distributed/blob/80b3af58a2e9c279221a570651c252221a8fc78c/distributed/dashboard/components/worker.py#L69

krishanbhasin-px commented 5 days ago

EDIT: wait this is url un-escape, which is the wrong way around

Relevant? https://github.com/dask/distributed/blob/80b3af58a2e9c279221a570651c252221a8fc78c/distributed/http/scheduler/info.py#L100-L104

plus=False means it doesn't convert plus's back to spaces?

But this appears to be deliberate from the comments in https://github.com/dask/distributed/pull/8363

Fix edge cases of task keys containing the '+' sign.