Repository navigation
test(controller): seed the DataVolume informer for controller-runtime 0.25 - #4729
Conversation
… 0.25 controller-runtime 0.25 made FakeInformer's sync state a private channel, so the DataVolume watch tests no longer compile: they toggled the exported Synced field and its lock. FakeInformers also builds every informer it creates already synced, so an unsynced informer has to be seeded into InformersByGVK and marked synced with Synced() later. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: cozystack/cozystack/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe workload monitor tests now use a helper to create fake DataVolume informers and configure their sync state. Three watch tests use this helper instead of setting informer sync fields directly. ChangesInformer test setup
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~4 minutes Change: Other Merge Risk: ⚪ Minimal · up to The test fixture changes preserve the intended watch scenarios, so no actionable merge risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What this PR does
maindoes not buildinternal/controllertests, soUnit & controller testsis red on every open PR. #4380 added DataVolume watch tests that setFakeInformer.Syncedand lockSyncedLock. #4473 then moved to controller-runtime v0.25.1, whereFakeInformerkeeps its sync state in a private channel and exposes onlySynced()andHasSynced(). Each PR was green on its own base.The tests now seed the DataVolume informer into
FakeInformers.InformersByGVKand callSynced()when they want it synced. Seeding is needed becauseFakeInformersbuilds every informer it creates itself already synced, so there is no way to get an unsynced one from it otherwise. The unsynced cases still assert that no reader is installed, so they would fail if the informer came up synced.go vet ./...is clean andgo test ./internal/controller/passes.Screenshots
Not a UI change.
Downstream repositories
Release note
Summary by CodeRabbit