fix(zen): allow dead_code on generated flow proto types (clippy) (#3425) #3497
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!3497
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/zen-proto-clippy-allow"
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
cargo clippy --manifest-path rust/consumers/zen/Cargo.toml --all-targets -- -D warningsfails onserviceradar-zen:These are generated from
proto/flow/flow.proto(the netprobe flow-attribution path). zen compiles the flow proto but doesn't construct those types yet, so-D dead-codetrips.Fix
Apply the same
#[allow(dead_code)]+#[allow(clippy::large_enum_variant)]type_attributes to the flow-proto generation that the main proto block inbuild.rsalready uses — keeping the two generation blocks consistent.Validation
cargo clippy --manifest-path rust/consumers/zen/Cargo.toml --all-targets -- -D warnings:🤖 Generated with Claude Code
`cargo clippy -- -D warnings` fails on serviceradar-zen: error: struct `FlowAttribution` is never constructed error: struct `AttributedFlowMessage` is never constructed These are generated from proto/flow/flow.proto (the netprobe flow-attribution path); zen compiles the flow proto but does not construct those types yet, so `-D dead-code` (implied by `-D warnings`) trips. Apply the same `#[allow(dead_code)]` + `#[allow(clippy::large_enum_variant)]` type-attributes to the flow-proto generation that the main proto block already uses. Verified: `cargo clippy --manifest-path rust/consumers/zen/Cargo.toml --all-targets -- -D warnings` fails before, passes after. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>