fix(build): hermetic netprobe eBPF object build for RBE/publish (#3425) #3511
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!3511
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/netprobe-ebpf-cargo-hermetic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The netprobe native add-on bundle ships
netprobe_ebpf.o, but the eBPF genrule(
//rust/netprobe/ebpf:netprobe_ebpf_object) shelled out to a hostcargo +nightly -Z build-std=core --target bpfel-unknown-none+ hostbpf-linker.With no
local/no-remotetag, under--remote_executor(the publish lane) itdispatched to an RBE worker with no Rust toolchain and died at
cargo is required to build the netprobe eBPF object— blocking thePublish Native Add-onsrun and the netprobe capture e2e.What
Build the eBPF object hermetically from Bazel-declared inputs only:
MODULE.bazel: pinned nightlyrustc/cargo/rust-std/rust-src(2026-05-31)bpf-linkerv0.10.3 (@netprobe_ebpf_*http_archives, sha256-pinned).The default stable
1.93.0rules_rust toolchain is untouched.build-ebpf-object.sh: rewritten — assembles a scratch sysroot from the pinnedcomponents and builds offline against the committed
vendor/tree with-Z build-std=core --target bpfel-unknown-none. No hostPATHtooling, no network.vendor/: committed cargo-vendor of the eBPF crate's deps plus the-Z build-stdstd deps (cargo vendor --sync <rust-src>/library/Cargo.toml).assemble_addon_bundle.py: harden the dependency-free YAML fallback parser tostrip inline
#comments (it was stricter than the authoritative Go validator,which masked-then-surfaced a rejection of
addons/netprobe/addon.yaml).Validation (carverauto RBE — the environment that was failing)
bazel build --config=ci //rust/netprobe/ebpf:netprobe_ebpf_object→ buildsremotely (
1 remote), produces a valid 79952-byte eBPF ELF.bazel build --config=ci //build/native_addons:netprobe_addon_bundle.linux.amd64.tar.gz→ assembles with
netprobe_ebpf.o+serviceradar-netprobe+serviceradar-netprobe.service+ manifests.Notes
openspec/changes/add-hermetic-netprobe-ebpf-build/.--cfg bpf_target_archisx86_64;amd64 (the e2e target) is correct, arm64 is a separate change.
🤖 Generated with Claude Code
lgtm