Skip to content

[serve] Surface terminal deployment actor failures outside UPDATING - #66910

Merged
jeffreywang88 merged 6 commits into
ray-project:masterfrom
GNITOAHC:serve/surface-deployment-actor-terminal-failure
Oct 22, 2026
Merged

jeffreywang88 merged 6 commits into
ray-project:masterfrom
GNITOAHC:serve/surface-deployment-actor-terminal-failure

Conversation

@GNITOAHC

Copy link
Copy Markdown
Contributor

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_FAILED with "Retrying" indefinitely, so there was no signal that a redeploy is needed. There are two causes:

  • DeploymentStatusInfo.handle_transition (common.py) only handled DEPLOYMENT_ACTOR_FAILED in UPDATING and DEPLOY_FAILED. In HEALTHY, UPSCALING, DOWNSCALING and UNHEALTHY, 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_healthy and _wait_for_deployment_deleted (_private/client.py). Neither has a caller and both are broken.

Signed-off-by: GNITOAHC <chaotingchen10@gmail.com>
Signed-off-by: GNITOAHC <chaotingchen10@gmail.com>
@GNITOAHC
GNITOAHC requested a review from a team as a code owner October 10, 2026 04:27

@gemini-code-assist gemini-code-assist Bot 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.

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 <chaotingchen10@gmail.com>
@ray-gardener ray-gardener Bot added serve Ray Serve Related Issue community-contribution Contributed by the community labels Oct 10, 2026
@jeffreywang88 jeffreywang88 self-assigned this Oct 14, 2026

@jeffreywang88 jeffreywang88 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.

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):

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.

Thanks for removing this! Confirmed that these helpers have no callers.

Comment on lines +3781 to +3784
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.

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.

Let's not mention what the previous behavior is. Readers can't understand by reading through the code post PR merge.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed by 3374967, thanks!!

)
assert "ctor boom" in ds.curr_status_info.message
assert ds._replicas.count() == num_replicas

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.

Drive the state machine dsm.update until it reaches a healthy state.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed by 855ec07, thanks!!

…cstring

Signed-off-by: GNITOAHC <chaotingchen10@gmail.com>
Signed-off-by: GNITOAHC <chaotingchen10@gmail.com>
@jeffreywang88 jeffreywang88 added the go add ONLY when ready to merge, run all tests label Oct 22, 2026

@jeffreywang88 jeffreywang88 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.

🚢 thanks @GNITOAHC

@jeffreywang88
jeffreywang88 enabled auto-merge (squash) October 22, 2026 07:18
@jeffreywang88
jeffreywang88 merged commit 0a509f3 into ray-project:master Oct 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community go add ONLY when ready to merge, run all tests serve Ray Serve Related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants