Skip to content

[Docs] Support rollback in zero-downtime incremental upgrade - #65249

Open
win5923 wants to merge 2 commits into
ray-project:masterfrom
win5923:rollback-doc
Open

[Docs] Support rollback in zero-downtime incremental upgrade#65249
win5923 wants to merge 2 commits into
ray-project:masterfrom
win5923:rollback-doc

Conversation

@win5923

@win5923 win5923 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Description

Starting with KubeRay v1.7, incremental upgrade has reached Beta and supports rollback.

Doc Link: https://anyscale-ray--65249.com.readthedocs.build/en/65249/cluster/kubernetes/user-guides/rayservice-incremental-upgrade.html

Related issues

ray-project/kuberay#4781

Additional information

Optional: Add implementation details, API changes, usage examples, screenshots, etc.

@win5923
win5923 requested review from a team and andrewsykim as code owners August 6, 2026 06:34

@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 updates the RayService incremental upgrade documentation to reflect its promotion from alpha to beta, adding detailed sections on rollback behavior, upgrade/rollback triggers, and new status conditions. The feedback suggests improving the clarity of the rollback documentation by replacing 'reverting' with 'resuming' in Case 2, and aligning the behavior of the RollbackInProgress condition with standard Kubernetes API design by setting it to False instead of removing it.


Pipeline: `A -> B -> A`

**Case 2: `C == B` (reverting to the upgraded spec)**

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.

medium

Using the term 'reverting' for Case 2 is slightly confusing because B is the upgraded (newer) spec, so you are actually resuming or continuing the upgrade to B rather than reverting to it. Consider using 'resuming' or 'returning' instead to improve clarity.

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.

+1 i'd say "cancel rollback" or "resume upgrading"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 12c9a14

| Condition | Description |
| :--- | :--- |
| `UpgradeInProgress` | `True` while both an active and a pending `RayCluster` exist for the `RayService`. KubeRay sets this condition to `False` with reason `NoPendingCluster` after it promotes the pending cluster, or after a rollback finishes and it deletes the pending cluster. |
| `RollbackInProgress` | `True` while KubeRay is rolling an in-progress incremental upgrade back to the original active cluster, with reason `DesiredClusterSpecChanged`. KubeRay removes this condition when the rollback completes, or when you revert the spec back to the pending cluster's spec to cancel the rollback. |

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.

medium

In Kubernetes, status conditions are typically set to False rather than being entirely removed from the status list, which helps preserve transition history. The description for UpgradeInProgress correctly states that KubeRay sets it to False. For consistency and standard Kubernetes API design, please clarify if RollbackInProgress is also set to False instead of being removed.

@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Aug 6, 2026
@win5923

win5923 commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

cc @ryanaoleary to take a look when you have time.

Signed-off-by: win5923 <ken89@kimo.com>

**Case 1: `C == A` (reverting to the original spec)**

The controller cancels the upgrade and gradually shifts traffic back to the original cluster, scaling its `targetCapacity` back to 100% while scaling the pending cluster down to 0%, then deletes the pending cluster.

@ryanaoleary ryanaoleary Aug 7, 2026

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.

nit: specify it's scaling back by stepSizePercent

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 12c9a14

| Condition | Description |
| :--- | :--- |
| `UpgradeInProgress` | `True` while both an active and a pending `RayCluster` exist for the `RayService`. KubeRay sets this condition to `False` with reason `NoPendingCluster` after it promotes the pending cluster, or after a rollback finishes and it deletes the pending cluster. |
| `RollbackInProgress` | `True` while KubeRay is rolling an in-progress incremental upgrade back to the original active cluster, with reason `DesiredClusterSpecChanged`. KubeRay removes this condition when the rollback completes, or when you revert the spec back to the pending cluster's spec to cancel the rollback. |

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.

could specify rollback "completes" when traffic has fully migrated and the old cluster is cleared

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 12c9a14

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

some small nit comments, overall doc update LGTM

Signed-off-by: win5923 <ken89@kimo.com>
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 core Issues that should be addressed in Ray Core docs An issue or change related to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants