Skip to content

fix: restart all marked workloads - #624

Merged
nklmilojevic merged 2 commits into
mainfrom
fix/623-bulk-restart
Sep 16, 2026
Merged

nklmilojevic merged 2 commits into
mainfrom
fix/623-bulk-restart

Conversation

@nklmilojevic

Copy link
Copy Markdown
Owner

Restart currently ignores marked workloads and acts only on the highlighted row. This change restarts the marked Deployments, StatefulSets, or DaemonSets after confirmation. With no marks, it uses the current row.

The confirmation captures the target set. Guardrails check the full set, and typed confirmation uses the target count for bulk actions. A failed request does not stop the remaining requests. Error messages include the workload name and namespace. Help and key documentation describe the selection behavior.

Validation: Rust formatting check, Clippy with warnings denied, and the full test suite. New keyboard-driven tests cover all three workload types, cross-namespace targets, single-row fallback, confirmation, cancellation, read-only mode, guardrails, stale marks, and partial failures through a mock Kubernetes API. No live cluster was used.

Closes #623

Restart used only the highlighted row and ignored marked workloads. Capture the full target set before confirmation, apply guardrails to every target, and continue after individual request failures.

Closes #623
@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR extends workload restart behavior to operate on the confirmed set of marked Deployments, StatefulSets, or DaemonSets, while retaining the current-row fallback.

  • Snapshots targets before confirmation and applies guardrails to the complete set.
  • Continues processing after individual Kubernetes API failures and aggregates all failed targets into the final report.
  • Clears marks only after confirmation and documents the updated selection behavior.
  • Adds keyboard-driven coverage for workload types, namespaces, guardrails, cancellation, stale marks, and partial failures.

Confidence Score: 5/5

The PR appears safe to merge; the previously reported loss of earlier bulk failures is fixed by retaining every target-specific error in the final result.

No blocking or non-blocking actionable issue remains. The prior bulk-error finding was fixed by collecting all request failures and publishing them together, and its review thread is resolved.

Important Files Changed
Filename Overview
src/app/actions.rs Adds captured bulk restart targets and aggregates all patch failures into one target-specific final report.
src/app/overlays.rs Executes the captured restart target set after confirmation and clears marks.
src/app/mod.rs Updates the restart confirmation action to carry an immutable list of workload targets.
src/app/tests/restart.rs Covers bulk and single restart behavior, confirmation, guardrails, stale marks, and multiple failures.
src/ui.rs Updates help text to describe marked-workload restart selection.
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User presses r] --> B{Marked workloads?}
    B -->|Yes| C[Snapshot marked targets]
    B -->|No| D[Use current workload]
    C --> E[Apply guardrails to target set]
    D --> E
    E -->|Denied| F[Keep marks and report denial]
    E -->|Allowed| G[Request confirmation]
    G -->|Cancelled or mismatch| H[Keep marks]
    G -->|Confirmed| I[Patch each captured target]
    I --> J{Request failed?}
    J -->|Yes| K[Retain target-specific error]
    J -->|No| L[Continue]
    K --> L
    L --> M{Targets remain?}
    M -->|Yes| I
    M -->|No| N[Send one success or aggregated-error result]
Loading

Reviews (2): Last reviewed commit: "fix: retain all bulk patch errors" | Re-trigger Greptile

Comment thread src/app/actions.rs
Separate failure messages replaced each other in the status and diagnostics fields. Collect errors and send one final report after all targets have been processed. Verify that multiple restart failures remain available after message handling.
@nklmilojevic
nklmilojevic merged commit 875ed0f into main Sep 16, 2026
4 checks passed
@nklmilojevic
nklmilojevic deleted the fix/623-bulk-restart branch September 16, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: cant restart multiple selected deployments

1 participant