Conversation
…tives Temporarily points two dependencies to forks that implement pending upstream PRs, allowing CI to build a testable image before the PRs land. inspektor-gadget → matthyx/inspektor-gadget @ fd383d3 - Release collectionSpec after eBPF load (~14 MiB heap) #5461 - Release oras target after load (~27 MiB RssFile) #5462 - Release program bytes after load (~6 MiB heap) #5466 - Reduce trace_capabilities current_syscall map 1M→10K (~43 MiB kernel) #5468 Upstream: inspektor-gadget/inspektor-gadget cilium/ebpf → matthyx/ebpf @ 8a32d06 - Weak-pointer kernel BTF global cache (~17 MiB heap auto-freed) - Invalidate module cache on kernel spec reload (fixes kmod BTF errors) Upstream PR: cilium/ebpf#1988 These replace directives should be removed once the upstream PRs are merged and released. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughUpdated Go module dependencies and Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
🧹 Nitpick comments (1)
go.mod (1)
468-470: Add explicit removal guardrails for temporaryreplacedirectives.Since these replaces are temporary, add inline TODOs with upstream PR links and the exact removal condition to reduce the chance they remain past validation.
Proposed edit
-replace github.com/inspektor-gadget/inspektor-gadget => github.com/matthyx/inspektor-gadget v0.0.0-20260421100818-fd383d3d7db4 +// TODO(NAUT-1252): temporary for memory validation; remove after upstream PRs `#5461/`#5462/#5466/#5468 are merged and released. +replace github.com/inspektor-gadget/inspektor-gadget => github.com/matthyx/inspektor-gadget v0.0.0-20260421100818-fd383d3d7db4 -replace github.com/cilium/ebpf => github.com/matthyx/ebpf v0.0.0-20260421101317-8a32d06def6c +// TODO(NAUT-1252): temporary for memory validation; remove after upstream PR `#1988` is merged and released. +replace github.com/cilium/ebpf => github.com/matthyx/ebpf v0.0.0-20260421101317-8a32d06def6c🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@go.mod` around lines 468 - 470, Add explicit inline TODO comments next to the two temporary go.mod replace directives (the replace for github.com/inspektor-gadget/inspektor-gadget and the replace for github.com/cilium/ebpf) that include the upstream PR links and an exact removal condition (e.g., "remove when upstream PR `#1234` is merged and version vX.Y.Z is released" or "remove once tag v0.0.0-20260421+fd383d3 is available"), so the replaces are self-documented and guarded; update the replace lines to include those TODO notes so reviewers and CI can easily verify when to remove them.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@go.mod`:
- Around line 468-470: Add explicit inline TODO comments next to the two
temporary go.mod replace directives (the replace for
github.com/inspektor-gadget/inspektor-gadget and the replace for
github.com/cilium/ebpf) that include the upstream PR links and an exact removal
condition (e.g., "remove when upstream PR `#1234` is merged and version vX.Y.Z is
released" or "remove once tag v0.0.0-20260421+fd383d3 is available"), so the
replaces are self-documented and guarded; update the replace lines to include
those TODO notes so reviewers and CI can easily verify when to remove them.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b90f2a78-7c55-4ecd-bb03-9224a1c6befc
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (1)
go.mod
Performance Benchmark ResultsNode-Agent Resource Usage
Dedup Effectiveness (AFTER only)
Event Counters
|
Brings in 9 upstream commits: rule-manager hot-path perf (kubescape#794), CEL constant folding + set membership optimizers (kubescape#789), iouring CO-RE relocation fix for kernel 6.8+ (kubescape#741), go-ntlmssp v0.1.1 bump (kubescape#790), and matthyx fork validation (kubescape#786). Conflict resolution: - go.mod replaces: kept our k8sstormcenter/{inspektor-gadget,storage} pin (the three-forks alignment from #28); dropped upstream's experimental matthyx/inspektor-gadget and matthyx/ebpf replaces (those are temporary upstream test forks for NAUT-1252 memory work, not relevant to our fork stack). - go.sum: regenerated via go mod tidy. Build clean. Unit suite: 92 packages pass; only TestRandomxFields fails (stale tracers.tar — explicitly ignored per prior decision). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Temporary
go.modreplace directives to validate memory savings from 5 upstream PRs before they are merged and released. This lets CI build a testable image.Pending upstream PRs included
inspektor-gadget/inspektor-gadget (fork:
matthyx/inspektor-gadget @ fd383d3):ebpf: release CollectionSpec after programs are attached— ~14 MiB heapoci: release oras target after image operators finish loading— ~27 MiB RssFileebpf: release ELF/BPF object bytes after spec is loaded— ~6 MiB heapgadgets/trace_capabilities: reduce current_syscall map 1M→10K— ~43 MiB kernel memorycilium/ebpf (fork:
matthyx/ebpf @ 8a32d06):btf: use weak pointers for the kernel BTF global cache— ~17 MiB heap auto-freedExpected total savings
~64 MiB VmRSS + ~43 MiB kernel memory per node-agent instance.
Cleanup
These replace directives must be removed once the upstream PRs are merged and released into a new IG/cilium-ebpf version.
Test plan
bpftool map showconfirmscurrent_syscallmax_entries = 10240Summary by CodeRabbit