feat: logical deletion system #397
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#397
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from GitHub.
Original GitHub issue: #1207
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/1207
Original created: 2025-07-08T04:17:23Z
Need to implement a logical deletion system using the retraction event pattern.
Sync service
The
syncservice will publish a special "retraction event" (a specific kind of tombstone) for any device that is no longer detected by an integration (the integration being considered the source of truth, Netbox or Armis).The SRQL query engine needs to be updated to filter out these retracted devices automatically.
For each removed device, the sync service must publish a final event to the sweep_results stream with the following structure:
{"_deleted": "true"}
The sync service can make a call into the SRQL Query API using
show devices where discovery_sources = "armis" and discovery_sources = "sweep", if it findsa device in the list that is not in the list of devices from the latest Armis API call, we create the tombstone event.
SRQL
pkg/srql/parser/translator.gobuildProtonWhere function updates:
When the translator builds a query for the devices entity, it will automatically append a condition to filter out deleted records.
A query of:
show devices where discovery_sources = "armis"Will be translated to the following Proton SQL:
Imported GitHub comment.
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/1207#issuecomment-3047521022
Original created: 2025-07-08T06:20:59Z
closing as completed