-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Add label selector observability to placement group tables and actor and task detail pages #54292
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
Add label selector observability to placement group tables and actor and task detail pages #54292
Conversation
…and task detail pages Signed-off-by: Alan Guo <aguo@anyscale.com>
There was a problem hiding this comment.
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 optionallabel_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. |
There was a problem hiding this comment.
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!
@MengjinYan ready to merge! |
@edoakes Can you help to merge the PR? |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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();
});
There was a problem hiding this comment.
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
…and task detail pages (ray-project#54292) Follow-up to ray-project#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   Actor detail  Task detail  --------- Signed-off-by: Alan Guo <aguo@anyscale.com> Signed-off-by: ChanChan Mao <chanchanmao1130@gmail.com>
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


Actor detail

Task detail

Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.