Implement operator Phase 3: reconciler skeleton with condition state machine#8
Merged
nissessenap merged 3 commits intomainfrom Jan 27, 2026
Merged
Implement operator Phase 3: reconciler skeleton with condition state machine#8nissessenap merged 3 commits intomainfrom
nissessenap merged 3 commits intomainfrom
Conversation
…machine Implement the reconcile loop for AgentTask resources: - Fetch AgentTask, skip terminal states (Succeeded/Failed) - Initialize Pending condition on first reconcile - Use events.EventRecorder (new API via mgr.GetEventRecorder) instead of deprecated record.EventRecorder - Use RequeueAfter instead of deprecated Requeue field Add unit tests (testify) for isTerminal, hasCondition, setCondition helpers and envtest integration tests for the full reconcile flow. Update plan phases 4-5 to use events.Eventf and RequeueAfter. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add debug log for terminal task skip to aid operational tracing - Add comment explaining RequeueAfter usage (Requeue deprecated in controller-runtime v0.23+, PR #3107) - Use suite-level ctx consistently in tests, remove unused context import Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
AgentTaskresources and manages status conditions through the full lifecycle (Pending → Running → Succeeded/Failed)isTerminal,hasCondition,setCondition) usingk8s.io/apimachinery/pkg/api/metaevents.EventRecorderAPI (k8s.io/client-go/tools/events) viamgr.GetEventRecorder()instead of the deprecatedrecord.EventRecorderRequeueAfterinstead of deprecatedRequeue: true(controller-runtime v0.23+, PR #3107)Test plan
make testpasses — 91.7% controller coveragego vet ./...cleanisTerminal,hasCondition,setConditionwith all condition states🤖 Generated with Claude Code