Repository navigation
[serve] Surface terminal deployment actor failures outside UPDATING - #66910
jeffreywang88 merged 6 commits into
Conversation
Signed-off-by: GNITOAHC <[email protected]>
Signed-off-by: GNITOAHC <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request ensures that deployment-scoped actor terminal failures are properly surfaced and transition the deployment status to unhealthy, even when there are running replicas or when the failure occurs outside of an update. This is achieved by reordering status checks in check_curr_status and handling the DEPLOYMENT_ACTOR_FAILED trigger across various deployment statuses. Additionally, unused helper methods in the client were cleaned up, and comprehensive unit tests were added to verify these transitions and failure reporting. There are no review comments to address.
Signed-off-by: GNITOAHC <[email protected]>
jeffreywang88
left a comment
There was a problem hiding this comment.
Repro'd the issue locally by starting a healthy deployment, killing the deployment actor, and forcing every recreation constructor to fail. Prior to this PR, the failure reason is HEALTH_CHECK_FAILED and is now DEPLOYMENT_ACTOR_FAILED. The bug is essentially the stale reason and misleading retry message.
| ) | ||
| self._shutdown = True | ||
|
|
||
| def _wait_for_deployment_healthy(self, name: str, timeout_s: int = -1): |
There was a problem hiding this comment.
Thanks for removing this! Confirmed that these helpers have no callers.
| Previously the DEPLOYMENT_ACTOR_FAILED trigger was dropped outside of | ||
| UPDATING (0 replicas) or never raised (replicas running), so the status | ||
| stayed UNHEALTHY/HEALTH_CHECK_FAILED with a stale "Retrying" message | ||
| even though the controller had stopped recreating the actor. |
There was a problem hiding this comment.
Let's not mention what the previous behavior is. Readers can't understand by reading through the code post PR merge.
| ) | ||
| assert "ctor boom" in ds.curr_status_info.message | ||
| assert ds._replicas.count() == num_replicas | ||
|
|
There was a problem hiding this comment.
Drive the state machine dsm.update until it reaches a healthy state.
…cstring Signed-off-by: GNITOAHC <[email protected]>
Signed-off-by: GNITOAHC <[email protected]>
jeffreywang88
left a comment
There was a problem hiding this comment.
🚢 thanks @GNITOAHC
|
⚡️ |
fellowship: 提名 GNITOAHC (ray, 2026-11) 建議等級 2 萬 - [x] 關係人宣告:提名人與被提名者無親屬、僱傭、財務、業務合作或其他可能影響公正判斷之利害關係 - 在兩個月內自己從 Ray Serve 原始碼找到 9 個 bug 並開了 PR,其中 6 個 PR 被 Merged ([Merged PRs](https://github.com/ray-project/ray/pulls?q=is%3Apr+author%3AGNITOAHC+is%3Amerged+merged%3A%3C%3D2026-11-24)) - 開了 Gang Scheduling + Autoscaling 的 Issue 並附上 Repro Script,社群後續依此開 PR 修復,提名人則變成該 PR 的 Reviewer ([#67494](ray-project/ray#67494)) - PR Description 簡潔清楚,讓 Reviewer 清楚理解 PR 解決了什麼問題 ([#66358](ray-project/ray#66358), [#66438](ray-project/ray#66438), [#66616](ray-project/ray#66616), [#66910](ray-project/ray#66910)) - 對於 Maintainer 的 Review 會清楚了解之後回覆 ([#67923 comment](ray-project/ray#67923 (comment)), [#67210 comment](ray-project/ray#67210 (comment)), [#66438 comment](ray-project/ray#66438 (comment)))
Description
When a deployment actor fails its health check and every recreation attempt fails, the controller stops retrying. The deployment status still showed
UNHEALTHY/HEALTH_CHECK_FAILEDwith "Retrying" indefinitely, so there was no signal that a redeploy is needed. There are two causes:DeploymentStatusInfo.handle_transition(common.py) only handledDEPLOYMENT_ACTOR_FAILEDinUPDATINGandDEPLOY_FAILED. InHEALTHY,UPSCALING,DOWNSCALINGandUNHEALTHY, the trigger was silently dropped.DeploymentState.check_curr_status(deployment_state.py) only checked for terminal actor failure when no replica was running at the target version. With any replica running, the trigger was never raised.Related issues
No existing issue.
Additional information
Also includes a small cleanup commit, removing
ServeControllerClient._wait_for_deployment_healthyand_wait_for_deployment_deleted(_private/client.py). Neither has a caller and both are broken.