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

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

Open
krishanbhasin-px opened this issue Sep 9, 2024 · 3 comments
Labels
bug Something is broken dashboard

Comments

@krishanbhasin-px
Copy link

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:

  • Dask & Distributed version: 2024.7.1
  • Python version: 3.10
  • Operating System: Ubuntu
  • Install method (conda, pip, source): pip
@krishanbhasin-px
Copy link
Author

Relevant code snippet:

class Task(RequestHandler):
@log_errors
def get(self, task: str) -> None:
try:
key = _get_actual_scheduler_key(task, self.server)
except KeyError:
self.send_error(404)
return

@jacobtomlinson
Copy link
Member

This might be relevant too

class StateTable(DashboardComponent):

@krishanbhasin-px
Copy link
Author

krishanbhasin-px commented Sep 20, 2024

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

Relevant?

def _get_actual_scheduler_key(key: str, scheduler: Scheduler) -> Key:
key = escape.url_unescape(key, plus=False)
if key in scheduler.tasks:
return key # Basic str key

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

But this appears to be deliberate from the comments in #8363

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

@jacobtomlinson jacobtomlinson added bug Something is broken dashboard and removed needs triage labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken dashboard
Projects
None yet
Development

No branches or pull requests

2 participants