-
Notifications
You must be signed in to change notification settings - Fork 6.2k
[core][refactor] Always use SetTaskStatus
for task status transitions
#52637
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
Conversation
Signed-off-by: Kai-Hsun Chen <[email protected]>
Signed-off-by: Kai-Hsun Chen <[email protected]>
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 refactors task status transitions to always use the SetTaskStatus function rather than directly setting the task status.
- Updates the SetTaskStatus signature in the header to accept a state update, task info inclusion flag, and attempt number.
- Revises all call sites in task_manager.cc to pass the appropriate parameters, replacing any direct status updates.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/ray/core_worker/task_manager.h | Updated SetTaskStatus function signature and corresponding documentation comments. |
src/ray/core_worker/task_manager.cc | Adjusted all invocations of SetTaskStatus to match the new signature and behavior. |
rpc::TaskStatus::PENDING_ARGS_AVAIL, | ||
/* state_update */ std::nullopt, | ||
/* include_task_info */ true, | ||
task_entry.spec.AttemptNumber() + 1); |
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.
In a follow-up PR: let's move the logic to retry_task_callback
so that we don't need to manually +1 to the AttemptNumber().
Signed-off-by: Kai-Hsun Chen <[email protected]>
Signed-off-by: Kai-Hsun Chen <[email protected]>
…ns (ray-project#52637) Signed-off-by: Kai-Hsun Chen <[email protected]>
Why are these changes needed?
I am looking into #52530. I found that there are multiple places where the task status transitions. This PR unifies all task status transitions to use
SetTaskStatus
and adds a log, making it easier to track the status transitions withgrep
.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.