Add batch failover/relocate modal with progress tracking - #2982
Conversation
…ress tracking Wire the Failover/Relocate toolbar button to open a batch action selection modal. Users pick Failover or Relocate via selectable cards, then Initiate patches all selected DRPCs concurrently with a live progress bar. Partial failures surface as a dismissible warning alert with a Retry option. Signed-off-by: vbadrina <vbadrina@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vbnrh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@vbnrh: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
| value: action === DRActionType.FAILOVER ? targetCluster : primaryCluster, | ||
| }, | ||
| { | ||
| op: 'replace' as const, |
There was a problem hiding this comment.
| op: 'replace' as const, | |
| op: 'replace', |
| const { t } = useCustomTranslation(); | ||
|
|
||
| const [selectedAction, setSelectedAction] = | ||
| React.useState<DRActionType | null>(null); |
There was a problem hiding this comment.
| React.useState<DRActionType | null>(null); | |
| React.useState<DRActionType>(null); |
Isn't null compatible with all types?
| } | ||
|
|
||
| onComplete(); | ||
| closeModal(); |
There was a problem hiding this comment.
Should we close the modal after failures as well?
|
We previously discussed adding a cap on the maximum number of user selections (e.g: 30 or 50 apps, based on the throttling tests). What happened to that ?? |
| selectedDRPCs.map((drpc) => | ||
| k8sPatch({ | ||
| model: DRPlacementControlModel, | ||
| resource: { | ||
| metadata: { | ||
| name: getName(drpc), | ||
| namespace: getNamespace(drpc), | ||
| }, | ||
| }, | ||
| data: buildDRPCPatch(drpc, selectedAction), |
There was a problem hiding this comment.
instead of "N" API calls in parallel (which could be very large value, even with the capping), make calls in batch of 6, once completed, start with next batch.
There was a problem hiding this comment.

Description
Implements batch failover/relocate for protected applications (RHSTOR-6407 + RHSTOR-6408), part of the RHSTOR-5643 epic.
Action selection modal (RHSTOR-6407):
Wires the Failover/Relocate toolbar button to open a modal when apps are selected
Two selectable card tiles (Failover / Relocate) with radio-like single-select behavior
Initiate button disabled until an action is chosen; Cancel closes without side effects
Batch execution with progress (RHSTOR-6408):
On Initiate, modal transitions to a progress view with a live progress bar
Patches all selected DRPCs concurrently, progress bar fills as each patch settles
On success: clears selection, closes modal, DR Status column auto-updates via k8s watch
On partial failure: closes modal, shows a dismissible warning alert ("X of Y applications were unable to begin relocating/failing over") with a Retry button that re-launches the modal for only the failed DRPCs
Change Type
Please select all applicable options:
Component / Area Impacted
Please select all applicable options:
Screenshots / Recordings
Screenshots
Screen.Recording.2026-07-21.at.11.45.42.AM.mov
Testing
Please select the type of tests included: