fix(executor): prevent invalid TaskActions from staying nonterminal - #7967
Merged
popojk merged 1 commit intoSep 4, 2026
Merged
Conversation
Signed-off-by: 1fanwang <1fannnw@gmail.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is small, directly addresses the reported bug, and includes a focused regression test validating both success and failure paths.
Pull request overview
This PR fixes the TaskAction executor’s validation-failure path to propagate status subresource update errors back to controller-runtime, ensuring failed status writes are requeued (rate-limited) instead of being silently “forgotten” as a successful reconcile.
Changes:
- Return the error from
r.Status().Update(...)when validation fails, so controller-runtime requeues on write failure. - Add a regression test that covers both successful and failed status-update outcomes for the validation-failure path.
File summaries
| File | Description |
|---|---|
executor/pkg/controller/taskaction_controller.go |
Returns the status update error on validation failure so reconcile requeues on write failures. |
executor/pkg/controller/taskaction_validation_test.go |
Adds a regression test asserting status update errors are surfaced (and success remains nil-error). |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sovietaced
approved these changes
Sep 3, 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.
Tracking issue
None. This bug was found on current
main.Why are the changes needed?
An invalid TaskAction can stay nonterminal when Kubernetes rejects the status write that should mark it failed. The executor discards the write error and reports a successful reconciliation, so controller-runtime removes the request from its work queue until another event happens to enqueue it.
Before this change, one rejected status write can leave the TaskAction stuck. After this change, controller-runtime retries the reconciliation and can persist the terminal failure.
controller-runtime treats these outcomes differently: a non-nil error adds the request back to the rate-limited queue, while a successful empty result forgets it. See controller-runtime v0.24.1.
What changes were proposed in this pull request?
Return the status update error from the validation failure path. A successful status write still returns an empty result with no error. The regression test covers both outcomes.
How was this patch tested?
Raw logs
Labels
fixedSetup process
Screenshots
Not applicable.
Check all the applicable boxes
Related PRs
None.
Stack
This PR is not stacked.
Docs link
Not applicable.