-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
[State API] Improve task api #31847
[State API] Improve task api #31847
Conversation
Signed-off-by: SangBin Cho <rkooo567@gmail.com>
Signed-off-by: SangBin Cho <rkooo567@gmail.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.
Looks great to me! Only question is on the gcs worker manager refactoring.
for (auto &listener : worker_dead_listeners_) { | ||
listener(worker_failure_data); | ||
} | ||
GetWorkerInfo( |
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.
Are these changes mainly on the refactoring of the GetWorkerInfo funcion?
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.
yes. But also there's a new change that we get WorkerData before we update the failureData. Previously, we overwrote the whole data. Now we merge them.
@@ -416,6 +418,12 @@ class NodeState(StateSchema): | |||
node_name: str = state_column(filterable=True) | |||
#: The total resources of the node. | |||
resources_total: dict = state_column(filterable=False) | |||
#: The time when the node (raylet) starts. |
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.
When we print out to users on CLI, do you think if we should convert all the timestamps to human readable values?
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.
we should. I think it is same for task events.
I think we need a way to distinguish API return value / display values. Maybe you can consider adding a task to fix this?
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.
Right, I guess we could do the formatting upon printing? If I use list_tasks
programmatically, I might still have the value as ms
, but I think we should make it readable for display.
Tracked here: #31876
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.
yeah. I think we can either process that from the CLI, or we can have something like view_callback for each field (which is invoked when it is printed)
cc @iycheng for the worker manager Previously, we overwrote the whole WorkerTableData with the failure data which has some data loss. I changed it to merge from the original worker data instead when the failure is reported |
Signed-off-by: SangBin Cho <rkooo567@gmail.com>
Signed-off-by: SangBin Cho <rkooo567@gmail.com>
also @scv119 for proto changes |
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.
LGTM!
Why are these changes needed?
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.