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

[Core] Fix broken dashboard cluster page when there are dead nodes #47701

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

jjyao
Copy link
Collaborator

@jjyao jjyao commented Sep 17, 2024

Why are these changes needed?

After #47367, nodes are updated through pub-sub and for dead node there is no state_snapshot set anymore. The datacenter.py tries to access it even for dead node which leads to KeyError:

File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-8ac7e00d-2d10-430a-b39d-ad4447d3a5ed/lib/python3.11/site-packages/ray/dashboard/datacenter.py", line 150, in get_node_info
    node_info["status"] = node["stateSnapshot"]["state"]
                          ~~~~^^^^^^^^^^^^^^^^^
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-8ac7e00d-2d10-430a-b39d-ad4447d3a5ed/lib/python3.11/site-packages/ray/dashboard/utils.py", line 435, in __getitem__
    proxy = self._proxy[item] = make_immutable(self._dict[item])
                                               ~~~~~~~~~~^^^^^^
KeyError: 'stateSnapshot'

It turns out the problematic line of code is dead code so this PR just removes it.

Related issue number

Closes #47668

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Jiajun Yao <[email protected]>
@jjyao jjyao added the go add ONLY when ready to merge, run all tests label Sep 17, 2024
Copy link
Contributor

@WeichenXu123 WeichenXu123 left a comment

Choose a reason for hiding this comment

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

LGTM.

@jjyao jjyao enabled auto-merge (squash) September 17, 2024 17:03
@jjyao jjyao merged commit c5939fe into ray-project:master Sep 17, 2024
6 checks passed
@jjyao jjyao deleted the jjyao/hoooot branch September 17, 2024 17:04
jjyao added a commit that referenced this pull request Sep 17, 2024
@jjyao jjyao mentioned this pull request Sep 17, 2024
8 tasks
aslonnie pushed a commit that referenced this pull request Sep 17, 2024
jjyao added a commit that referenced this pull request Sep 18, 2024
aslonnie pushed a commit that referenced this pull request Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UI] When a Ray worker node dies, it makes Ray dashboard "cluster" page and "logs" page broken
3 participants