1769 bugui device search is broken #2322
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!2322
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2322/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: #1771
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1771
Original created: 2025-10-15T05:00:21Z
Original updated: 2025-10-15T05:36:01Z
Original head: carverauto/serviceradar:1769-bugui-device-search-is-broken
Original base: main
Original merged: 2025-10-15T05:35:58Z by @mfreeman451
PR Type
Bug fix, Tests
Description
Fixed web UI device search to use unified
searchfilter instead of hostname-only matchingEnhanced SRQL query planner with smart IP/MAC address search across multiple device fields
Optimized test timeouts and added proper cleanup handlers to prevent flakiness
Added case-insensitive LIKE operations (ILIKE) for improved search matching
Diagram Walkthrough
File Walkthrough
1 files
Replace hostname filter with unified search parameter3 files
Add smart device search with IP detection and multi-field matchingSwitch to case-insensitive LIKE and improve array field detectionAdd ipaddress and macaddress field aliases for devices8 files
Add comprehensive tests for device search and IP filteringReduce test timeouts and add proper cleanup handlersMake KV watch backoff parameters overridable for testingReduce memory test sleep durations for faster executionFix formatting and add cleanup handler for storeReplace retry loops with Eventually assertion for reliabilityExtract timeout constants and reduce test durationsReduce operation delays and wait timeouts in testsImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1771#issuecomment-3404529093
Original created: 2025-10-15T05:01:00Z
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.🎫 #1769
Codebase context is not defined
Follow the guide to enable codebase context checks.
No custom compliance provided
Follow the guide to enable custom compliance check.
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/1771#issuecomment-3404530823
Original created: 2025-10-15T05:02:06Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Fix data race in test
In the
TestKVWatchAutoReconnecttest, reorder the shutdown signals by callingcancel()beforeclose(sweeper.done)to ensure a more deterministic andpredictable shutdown sequence for the goroutine.
pkg/sweeper/sweeper_test.go [997-1001]
Suggestion importance[1-10]: 5
__
Why: The suggestion correctly identifies that using two shutdown signals (
cancel()andclose(sweeper.done)) can lead to non-deterministic behavior in the test, and proposes reordering them to make the shutdown sequence more predictable.Improve test assertion logic
Refactor the
TestCircuitBreaker_BasicFunctionalitytest by moving the assertionson
finalErrandfinalStateinside therequire.Eventuallyblock to make the testlogic clearer and more robust.
pkg/sync/circuit_breaker_test.go [70-83]
Suggestion importance[1-10]: 4
__
Why: The suggestion correctly points out that the assertions should be inside the
require.Eventuallyblock for better readability and robustness, which is a valid code improvement, although the current code is functionally correct.