fix: replace 30s polling with RunnerConfig watch for gate 0 (session/3)#3
Merged
Conversation
CONDUCTOR-BL-CAPABILITY-WATCH: PackExecutionReconciler now watches
RunnerConfig (runner.ontai.dev/v1alpha1) in ont-system and enqueues
PackExecutions in seam-tenant-{cluster} immediately when capabilities
are published, eliminating the 30s gateRequeueInterval delay for gate 0.
Add unit test verifying gate 0 blocks when RunnerConfig has no
capabilities and clears immediately after capabilities are published.
e27b8c6 to
8beb896
Compare
Use seamcorev1alpha1.InfrastructurePackExecution and conditions.FindCondition instead of undefined infrav1alpha1 references. Fix record.NewFakeRecorder to clientevents.NewFakeRecorder to match PackExecutionReconciler.Recorder type.
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
Changes
packexecution_reconciler.go -- add Watches on RunnerConfig (runner.ontai.dev/v1alpha1) in SetupWithManager. The mapRunnerConfigToPackExecutions mapper: skips objects outside ont-system; lists PackExecutions in seam-tenant-{clusterRef}; enqueues those whose TargetClusterRef matches. When Conductor publishes its capability manifest to RunnerConfig status, all pending PackExecutions for that cluster are immediately re-enqueued instead of waiting up to 30s.
packexecution_reconciler_test.go -- add TestPackExecutionReconciler_Gate0_RunnerConfigCapabilitiesAppear: verifies gate 0 blocks with Waiting=True when RunnerConfig has no capabilities, then clears immediately after capabilities are published.
Test plan
go test ./test/unit/...-- all passgo test ./test/unit/controller/...-- all pass