fix: restart all marked workloads - #624
Merged
Merged
Conversation
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 SummaryThis PR extends workload restart behavior to operate on the confirmed set of marked Deployments, StatefulSets, or DaemonSets, while retaining the current-row fallback.
Confidence Score: 5/5The 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
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]
Reviews (2): Last reviewed commit: "fix: retain all bulk patch errors" | Re-trigger Greptile |
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.
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.
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