test(agent): cover netprobe add-on activation rollback paths (#3425) #3498
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!3498
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/netprobe-rollback-tests"
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
migrate-netprobe-to-native-addon§2.4 — test the activation rollback paths so a failed netprobe add-on activation never leaves a half-installed/enabled unit or a running-but-incapable process.The rollback behavior already existed, but the post-stage orchestration in
applySystemdAddonwas untestable (hardcoded artifact root + a root-owned-updater shell-out).reconcileStagedSystemdUnitswith an injectable installer (installUnitsFn) + a threaded runtime root.applySystemdAddonstill passesruntimeRoot=""+ the real updater installer — production path unchanged.push_loop_addon_rollback_test.go):currentrolled back to the prior version, no remembered units;The capability-application failure path already rolls back inside
stageAndCapability(covered there); this PR closes the unit discovery/selection/install paths.Validation
go test ./go/pkg/agent/ -run TestReconcileStagedSystemdUnits— 3/3 pass;go vetclean.bazel build //go/pkg/agent:agent_test— green (new test registered in thego_testsrcs).🤖 Generated with Claude Code
lgtm
Pull request closed