Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 43 minutes and 11 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR modifies container event handling in the network neighborhood cache. Instead of skipping host-container add events early, the code now forces their namespace to "host" and allows them to proceed through the ignore-filter and subsequent processing logic. Remove events receive the same namespace override treatment. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pkg/objectcache/networkneighborhoodcache/networkneighborhoodcache.go`:
- Around line 336-347: Notification handling sets host containers' namespace to
"host" then still calls nnc.cfg.IgnoreContainer, causing host events to be
dropped; fix by treating host containers as always allowed: after detecting a
host container via utils.IsHostContainer(notif.Container), set
notif.Container.K8s.Namespace = "host" and skip the subsequent
nnc.cfg.IgnoreContainer check (i.e., do not call IgnoreContainer for host
containers) in both the add (where addContainerWithTimeout is launched) and
remove (containercollection.EventTypeRemoveContainer) branches so host events
are never filtered out by namespace include/exclude rules.
- Around line 336-346: You're mutating the shared notif.Container.K8s.Namespace
in place which causes data races when callbacks run concurrently; instead, read
utils.IsHostContainer(notif.Container) and store the namespace in a local
variable for filtering with nnc.cfg.IgnoreContainer(namespace, ...) and only
create a deep copy of notif.Container (or at least copy K8s metadata) before
passing it to async calls like go nnc.addContainerWithTimeout(...) so the
goroutine operates on an owned copy; apply the same pattern in
applicationprofilecache where notif.Container is mutated.
🪄 Autofix (Beta)
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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8cf9049e-1c33-4e39-a64a-fba524e4700a
📒 Files selected for processing (1)
pkg/objectcache/networkneighborhoodcache/networkneighborhoodcache.go
Performance Benchmark ResultsNode-Agent Resource Usage
Dedup Effectiveness (AFTER only)
Event Counters
|
Mirror the APC ContainerCallback behavior: remap host containers to the "host" namespace instead of returning early, so the NNC can track network neighborhoods for host-mode workloads. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
Performance Benchmark ResultsNode-Agent Resource Usage
Dedup Effectiveness (AFTER only)
Event Counters
|
Summary by CodeRabbit