cleanup #2687
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!2687
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2687/head"
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 pull request.
Original GitHub pull request: #2328
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2328
Original created: 2026-01-18T03:01:29Z
Original updated: 2026-01-18T03:22:20Z
Original head: carverauto/serviceradar:chore/golang_cleanup_and_removal
Original base: staging
Original merged: 2026-01-18T03:22:19Z by @mfreeman451
User description
IMPORTANT: Please sign the Developer Certificate of Origin
Thank you for your contribution to ServiceRadar. Please note, when contributing, the developer must include
a DCO sign-off statement indicating the DCO acceptance in one commit message. Here
is an example DCO Signed-off-by line in a commit message:
Describe your changes
Issue ticket number and link
Code checklist before requesting a review
PR Type
Enhancement, Other
Description
Remove standalone SNMP checker service and deployment artifacts
Eliminate unused Go packages (registry, identitymap, http, sync, db)
Refactor RegistryPublisher to use database service directly
Update build, Docker, Helm, and documentation references
Diagram Walkthrough
File Walkthrough
1 files
Remove registry dependency, use database service1 files
Update tests to remove registry mocks8 files
Remove SNMP checker certificate generationRemove SNMP checker from build groupsRemove SNMP checker from deployment validationRemove SNMP checker from service restart listDisable SNMP checker config, remove service accountSimplify SNMP config, remove checker configurationRemove SNMP checker config file copy commandDisable SNMP checker, remove service configuration8 files
Update documentation for embedded SNMP collectorUpdate SNMP component description to embedded agentAdd deprecation note for legacy SNMP checkerAdd migration guidance for standalone SNMP checkerAdd design document for cleanup initiativeAdd proposal for legacy package removalAdd implementation tasks checklistAdd requirements for embedded SNMP only101 files
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2328#issuecomment-3764823958
Original created: 2026-01-18T03:02:10Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
No security concerns identified
No security vulnerabilities detected by AI analysis. Human verification advised for critical code.🎫 No ticket provided
Codebase context is not defined
Follow the guide to enable codebase context checks.
Generic: Comprehensive Audit Trails
Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.
Status: Passed
Generic: Meaningful Naming and Self-Documenting Code
Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting
Status: Passed
Generic: Secure Error Handling
Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.
Status: Passed
Generic: Secure Logging Practices
Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.
Status: Passed
Generic: Security-First Input Validation and Data Handling
Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities
Status: Passed
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation
Status:
Nil config handling:
NewRegistryPublisheracceptsconfig *StreamConfigwithout validating non-nil, which mayallow a nil dereference later if downstream code assumes
p.configis always set.Referred Code
Compliance status legend
🟢 - Fully Compliant🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2328#issuecomment-3764826785
Original created: 2026-01-18T03:03:08Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Clarify the shift to disabled-by-default SNMP
The PR introduces a breaking change by disabling SNMP collection by default
across all deployment configurations. This should be explicitly mentioned in the
PR description to prevent unexpected loss of monitoring for users.
Examples:
helm/serviceradar/files/serviceradar-config.yaml [628-633]
k8s/demo/base/configmap.yaml [569-574]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 9
__
Why: The suggestion correctly identifies a significant, undocumented breaking change where SNMP is now disabled by default, which could cause users to silently lose monitoring upon upgrade.
Fix wrong test variable usage
In
TestPublishBatchDevices, replace the undefined variableregistryPublisherwith the correctly initialized
publishervariable to fix a compilation error.pkg/mapper/publisher_test.go [361]
[To ensure code accuracy, apply this suggestion manually]Suggestion importance[1-10]: 9
__
Why: The suggestion fixes a clear bug where an undefined variable
registryPublisheris used instead ofpublisher, which would cause a compilation error in the test.Check for nil config
In
NewRegistryPublisher, add anilcheck for theconfigparameter and return anerror if it is
nilto prevent potential panics.pkg/mapper/publisher.go [36-45]
[To ensure code accuracy, apply this suggestion manually]Suggestion importance[1-10]: 6
__
Why: The suggestion adds a
nilcheck for theconfigparameter, which improves robustness by preventing potential nil pointer dereferences later.