Repository navigation
[serve] Expose replica versions and applied config id in the details API - #67458
Merged
akyang-anyscale merged 6 commits intoOct 30, 2026
Merged
akyang-anyscale merged 6 commits into
akyang-anyscale merged 6 commits into
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…lied config id A rolling update is complete once every live replica runs the deployment's target version, which the controller already tracks per replica. Expose that through the details API so callers can tell a finished rollout from autoscaling churn: the deployment status alone flips to UPSCALING/AUTOSCALING mid-rollout. An optional ServeDeploySchema.config_id is persisted with the config checkpoint and reported back as applied_config_id. Signed-off-by: qishengxhe <[email protected]>
…egacy checkpoints A replica's reported version is the one being applied while UPDATING and the deployment's target while RECOVERING, so a version match alone does not mean the replica is current. Say so in the API descriptions, cover the mixed recovery state in a unit test, and test reading checkpoints written before config_id existed and clearing the echo for a config without one. Signed-off-by: qishengxhe <[email protected]>
Signed-off-by: qishengxhe <[email protected]>
qishengxhe
force-pushed
the
qisheng/serve-rollout-version-details
branch
from
October 27, 2026 02:14
c7ed8df to
3b8cdde
Compare
A replica-count change keeps the version and the replicas; user_config reconfigures the same replicas under a new version; actor options and an application runtime_env change restart replicas under a new version. Signed-off-by: qishengxhe <[email protected]>
qishengxhe
marked this pull request as ready for review
October 27, 2026 02:53
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Signed-off-by: qishengxhe <[email protected]>
akyang-anyscale
left a comment
Contributor
There was a problem hiding this comment.
can we add an integration test that
- records target_version and the replica process IDs before killing the controller
- after the restart, wait until every replica is RUNNING, then assert that both are unchanged.
…ontroller restart Signed-off-by: qishengxhe <[email protected]>
Contributor
Author
good idea, updated the test case to cover these |
akyang-anyscale
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
Problem. The Serve controller knows which version each replica runs and which version a deployment is converging to, but the REST details API does not expose either. External controllers that drive in-place updates can only watch deployment status, and that status flips to
UPSCALING/DOWNSCALINGwith triggerAUTOSCALINGas soon as the autoscaler acts mid-rollout, hiding an unfinished rolling update behind an application that reportsRUNNING.Solution. Expose what the controller already tracks: an optional
versionper replica andtarget_versionper deployment, so a caller can tell a finished rollout from autoscaling churn. An optionalconfig_idonServeDeploySchemais stored with the config checkpoint and reported back asapplied_config_id, so callers can attribute what they read to the config they submitted. All fields are optional; older checkpoints, older clients and configs without an id behave as before. No Serve decision path changes.Testing
tests/unit/test_deployment_state.py,test_schema.py,test_controller.py(539 passed). New tests cover replica versions through a rolling update under autoscaling, a mid-reconfigure replica, a controller restart mid-rollout with a recovering replica, legacy four-field checkpoints, and the config id echo.test_deploy_app_2.py::test_instance_details_echo_config_id_and_versions: the echo and replica versions survive a controller restart and clear for a config without an id.anyscale/ray:nightly-py312ran the Anyscale in-place-update suite on a premerge environment; the details API reportedtarget_version, replicaversionand the echoed config id, and the control plane used them to hold an update open under continuous autoscaling.Related issue number
N/A