fix(health): ensure reconciliation of reachability and nmx-c collectors - #4866
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Summary by CodeRabbit
WalkthroughThe discovery iteration now attempts all ordinary collectors, reconciles reachability collectors after spawn attempts, and returns aggregate spawn errors before reachability errors. Tests verify later endpoint spawning, logging, and cleanup. ChangesReachability reconciliation
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: ⚪ Minimal · up to This is a localized fix that reconciles reachability and nmx-c collectors after a collector spawn failure; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant DiscoveryIteration
participant CollectorRegistry
participant ReachabilityCollectors
DiscoveryIteration->>CollectorRegistry: attempt all endpoint collector spawns
DiscoveryIteration->>ReachabilityCollectors: reconcile reachability collectors
DiscoveryIteration-->>DiscoveryIteration: return CollectorSpawnErrors before reachability errors
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/health/src/discovery/iteration.rs`:
- Around line 121-123: Update the iteration around spawn_collectors_for_endpoint
to invoke it for every sharded_endpoints entry instead of short-circuiting on
the first error, while preserving and returning the first spawn error after all
attempts complete. Add a regression test covering a conflicting first endpoint
and confirming that a non-conflicting second endpoint is still spawned.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: da3b9b63-559e-4f8d-a3b7-9bfa9cfec564
📒 Files selected for processing (1)
crates/health/src/discovery/iteration.rs
a707e4b to
cff80ab
Compare
|
Worth moving nmx-c reconciler above as well, it seems it has similar issue? |
Signed-off-by: Jay Zhu <jayzhu@nvidia.com>
Signed-off-by: Jay Zhu <jayzhu@nvidia.com>
1da8adc to
15f2ff7
Compare
|
🌿 Preview your docs: https://nvidia-preview-pull-request-4866.docs.buildwithfern.com/infra-controller |
Yep, good catch! |
A collector spawn failure can end a discovery iteration before reachability and nmx-c collector reconciliation run, leaving the collectors out of sync until a successful iteration happens later.
This change reconciles reachability and nmx-c collectors before returning the ordinary collector spawn error.
Related issues
Fixes #4865
Type of Change
Breaking Changes
Testing