fix(build): make the native_addons package load (dedup all_binaries + rcgen dep) (#3425) #3473
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!3473
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/native-addon-build-fixes"
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?
What
Two latent duplicate-label errors left the
//build/native_addonspackage unbuildable — a duplicate label in afilegroup/depsis a hard package-load error, so every target in the package (and its rust dep) fails at analysis. This is why CI never actually built the add-on bundles and the gap went unnoticed; it's the prerequisite for the native-addon signing/publish lane (and for building any bundle at all).Discovered while starting the build-signing work —
bazel build //build/native_addons:sample_addon_bundlefailed at load.Fixes
build/native_addons/defs.bzl— alanguage: "rust"bundle reuses a single binary label across every declared platform (rules_rust has nogo_cross_binaryanalogue), but the platform loop appended that label tobinary_outputsonce per platform. Theall_binariesfilegroup then had a duplicatesrcsentry. Dedup before aggregating (mirrors the existingsrcsdedup). Affectedrust_sample_addon_bundleandnetprobe_addon_bundle(both 2-platform rust bundles).rust/addon-sdk/BUILD.bazel—addon_sdk_handshake_mtls_testre-addedrcgenviacrate_deps([...])even though it is already inADDON_SDK_DEPS, duplicating the dep label and putting the whole package in error (which in turn broke the rust-sample/netprobe bundles that depend on it). Dropped the duplicate; the test-only crates (tempfile,tower,hyper-util) remain.Verification
bazel query //build/native_addons:all→ERROR: Label '//rust/netprobe:netprobe' is duplicated in the 'srcs' attribute of rule 'all_binaries'(+ thercgendup).bazel query //build/native_addons:alland//rust/addon-sdk:allboth load clean, and all bundle targets (sample_addon_bundle,rust_sample_addon_bundle,netprobe_addon_bundle, …) enumerate.buildifierclean.🤖 Generated with Claude Code