2612 bugcore elx interface graph upsert failed #2848
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!2848
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2848/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: #2697
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2697
Original created: 2026-02-04T19:39:35Z
Original updated: 2026-02-04T19:42:36Z
Original head: carverauto/serviceradar:2612-bugcore-elx-interface-graph-upsert-failed
Original base: staging
Original merged: 2026-02-04T19:41:34Z 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
Bug fix, Enhancement
Description
Standardize AGE graph name to
platform_graphacross core-elx and SRQLAdd configurable graph name with environment variable support
Grant USAGE/CREATE/ALL privileges on graph schema to application role
Transfer ownership of graph schema and label tables to application role
Create migration to ensure canonical graph exists at startup
Diagram Walkthrough
File Walkthrough
3 files
Add age_graph_name configuration defaultLoad age_graph_name from environment variablesLoad age_graph_name from environment variables3 files
Grant privileges and transfer ownership of graph schemaUse configurable graph name instead of hardcoded valuePass graph_name parameter to SQL builder1 files
Create migration to ensure platform_graph exists4 files
Update test to use configurable graph nameUpdate test graph name to platform_graphUpdate test config to use platform_graphUpdate fixture to create platform_graph instead of serviceradar2 files
Add age_graph_name field to AppConfig structPass age_graph_name to graph_cypher execute function7 files
Update documentation to reference platform_graphUpdate runbook commands to use platform_graphAdd design document for AGE graph schema fixAdd proposal document for AGE graph schema fixAdd specification for canonical AGE graph schema accessAdd implementation tasks for AGE graph schema fixAdd canonical AGE graph schema access requirementImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2697#issuecomment-3849389185
Original created: 2026-02-04T19:40:28Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
Config-driven privilege changes
Description: Startup migrations use an admin connection to grant privileges and change schema/table
ownership based on the configured
:age_graph_name(SERVICERADAR_AGE_GRAPH_NAME/AGE_GRAPH_NAME), so a compromised/misconfigured environment could steer privileged DDL(GRANT/ALTER OWNER) toward an unintended schema and broaden access or alter ownership
beyond the intended AGE graph. startup_migrations.ex [323-411]
Referred Code
🎫 #2612
core-elx“Interface graph upsert failed” error caused by PostgreSQLinsufficient_privilege/ “permission denied for schema serviceradar” when executing AGEcypher(...)upserts.core-elxinterface graph upserts no longer emitpermission denied for schema ...warnings (requires runtime DB role/privilege validationand actual ingestion execution).
Codebase context is not defined
Follow the guide to enable codebase context checks.
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: Comprehensive Audit Trails
Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.
Status:
Privilege change logging: The new privilege/ownership-changing operations are logged without actor/user context, so
it is unclear whether separate audit trail coverage exists for reconstructing who
initiated these critical permission changes.
Referred Code
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation
Status:
Migration fail-fast risk: The new ownership transfer logic uses
Postgrex.query!/3for multiple DDL statementswithout any explicit handling for expected failure modes (e.g., insufficient privilege),
so startup may crash rather than degrade gracefully depending on deployment credentials.
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/2697#issuecomment-3849389974
Original created: 2026-02-04T19:40:40Z
CI Feedback 🧐
A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
Action: build
Failed stage: Configure SRQL fixture database for tests [❌]
Failed test name: ""
Failure summary:
The action failed during environment/secret validation because the required TLS CA certificate
secret
SRQL_TEST_DATABASE_CA_CERTwas not configured (it is empty in the job environment).The
workflow explicitly checks for this secret and aborts with:
SRQL_TEST_DATABASE_CA_CERT secret mustbe configured to verify SRQL fixture TLS.which caused the step to exit with code 1.Relevant error logs:
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2697#issuecomment-3849398025
Original created: 2026-02-04T19:42:36Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Improve migration robustness for pre-existing schemas
In the database migration, change the
duplicate_schemaerror from an exceptionto a warning to make the migration more robust against pre-existing schemas.
elixir/serviceradar_core/priv/repo/migrations/20260204090000_use_platform_age_graph.exs [10-32]
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies a potential failure case in the database migration and proposes a change to make it more robust, which is a valuable improvement for deployment stability.