Skip to content

Add label selector observability to placement group tables and actor and task detail pages - #54292

Merged
edoakes merged 4 commits into
ray-project:masterfrom
alanwguo:add-label-selector-ui-to-more-places
Jul 9, 2025
Merged

edoakes merged 4 commits into
ray-project:masterfrom
alanwguo:add-label-selector-ui-to-more-places

Conversation

@alanwguo

@alanwguo alanwguo commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Follow-up to #53423

Missed a few places in the UI.
Also updates placement group tables to use the same code preview component as the actor and tasks tables.

Placement group table
Screenshot 2025-07-02 at 4 00 53 PM
Screenshot 2025-07-02 at 4 00 56 PM

Actor detail
Screenshot 2025-07-02 at 4 01 05 PM

Task detail
Screenshot 2025-07-02 at 4 01 19 PM

Related issue number

Checks

Copilot AI review requested due to automatic review settings July 2, 2025 23:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds observability for label selectors across several UI components and updates the placement group tables to use a unified code preview component.

  • Extend the Bundle type with an optional label_selector field.
  • Add “Label Selector” sections in Task and Actor detail pages using CodeDialogButtonWithPreview.
  • Introduce a LabelSelector column/component in the Placement Group table.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
python/ray/dashboard/client/src/type/placementGroup.ts Add label_selector to Bundle type.
python/ray/dashboard/client/src/pages/task/TaskPage.tsx Display label selector in task details.
python/ray/dashboard/client/src/pages/actor/ActorDetail.tsx Display required resources and label selector.
python/ray/dashboard/client/src/components/PlacementGroupTable.tsx Add LabelSelector component and table column.

@MengjinYan MengjinYan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank for the quick turn-around! I'm not familiar with the UI code to review the exact change, but the change of dashboard UI looks good!

Alan Guo added 3 commits July 2, 2025 16:21
Signed-off-by: Alan Guo <[email protected]>
Signed-off-by: Alan Guo <[email protected]>
Signed-off-by: Alan Guo <[email protected]>
@alanwguo alanwguo added the go add ONLY when ready to merge, run all tests label Jul 3, 2025
@alanwguo

alanwguo commented Jul 3, 2025

Copy link
Copy Markdown
Contributor Author

@MengjinYan ready to merge!

@MengjinYan

Copy link
Copy Markdown
Contributor

@edoakes Can you help to merge the PR?

@bartcheers bartcheers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks great. Other than the waitFor vs setTimeout there's a small opportunity to DRY up undleResourceRequirements and LabelSelector since they share quite a bit of the logic, but they don't seem exactly the same so might be overdoing it.

await user.type(input, "CREATED");

// Wait for the filter to be applied
await new Promise((resolve) => setTimeout(resolve, 100));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can do something like this with testing-library instead of the timeouts, which should make the test less flaky:

 await waitFor(() => {
      expect(screen.queryByText("pg-987654321")).not.toBeInTheDocument();
      expect(screen.queryByText("pg-555666777")).not.toBeInTheDocument();
    });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There 3 other places in this PR where you could replace setTimeout for waitFor

@edoakes
edoakes merged commit 5fbfc81 into ray-project:master Jul 9, 2025
ccmao1130 pushed a commit to ccmao1130/ray that referenced this pull request Jul 29, 2025
jugalshah291 pushed a commit to jugalshah291/ray_fork that referenced this pull request Sep 11, 2025
dstrodtman pushed a commit to dstrodtman/ray that referenced this pull request Oct 6, 2025
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.

6 participants