Repository navigation
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Symptom
First consolidateConcepts cron run after the 48h DEV soak (#448) failed:
2026-06-21 03:47 UTC consolidateConcepts FAILED (duration 7.4s)
transaction rolled back by an internal error:
"AC9753D6C4764F5ABE3B3CA4E88233C0"."(DO statement)":
line 4 col 3 (at pos 129): generic. Error -
https://developers.sap.com/kg/tutorials: Object does not exist
or is inaccessible
GraphMetadata row was never inserted (still 0 rows post-soak).
Root cause (hypothesis)
The consolidator issues a SPARQL INSERT DATA { GRAPH <https://developers.sap.com/kg/tutorials> { ... } } against the named graph defined in srv/lib/kg-graph-rebuild.js:35 as DEFAULT_GRAPH_IRI. HANA Cloud's SPARQL engine rejects the insert because the graph object hasn't been created yet — it doesn't auto-create on first INSERT.
Fix options
- Pre-create on first run: issue
CREATE GRAPH <https://developers.sap.com/kg/tutorials>(orCREATE SILENT GRAPH ...if idempotent) before the firstINSERT DATA. Wrap in a transaction guard so re-runs after first success are no-ops. - Lazy create-or-skip: catch the "does not exist" error code on first INSERT, issue a CREATE, retry. Inverts the order but is more failure-tolerant.
- Bootstrap script: a one-shot CLI (sibling of
npm run kg:reextract) that issues the CREATE GRAPH. Avoids changing the consolidator. Trade-off: needs to be remembered before each new HDI container.
Likely option (1) since it's most robust against fresh QA / future PROD provisioning.
Impact while open
- DEV sidebar shows nothing on every tutorial OP (hide-on-empty short-circuits before the sidebar mounts visibly)
- Telemetry: zero
kg.*events recorded during 48h soak (no sidebar → no events) - Concept extraction is unaffected — 1089 ACTIVE concepts + 2183 TutorialConceptLinks + 569 ConceptEdges are still being curated by the nightly
extractConceptscron
Repro
# Hits the same failure mode on demand:
cf run-task tutorials-srv -c "node -e 'import(\"@sap/cds\").then(({default:cds})=>cds.connect.to(\"db\").then(async d=>{ const r = await d.run(\"SPARQL INSERT DATA { GRAPH <https://developers.sap.com/kg/tutorials> { <urn:test> <urn:p> <urn:o> . } }\").catch(e=>e.message); console.log(r); process.exit(0); }))'"Or just wait for the next scheduled consolidateConcepts Sunday 03:47 UTC.
Refs
- Knowledge graph of related tutorials and to help with learning discovery #381 (KG epic)
- docs(kg): Phase 1 DEV rollout note (#381 PR 8/8) #442 (PR 7 — Vue sidebar that depends on this graph)
- Fill in Phase 1 rollout-note placeholders after 48h soak #448 (Phase 1 rollout note post-soak fill-in — surfaced this)
- srv/lib/kg-graph-rebuild.js:35 (
DEFAULT_GRAPH_IRI) - srv/lib/kg-queries.js:240 (
FROM <…>clause) - srv/jobs/scheduler.js:188-199 (cron registration)
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Activity
docs(kg): fill in Phase 1 rollout-note placeholders post-48h soak (#527)
fix(kg): bootstrap named graph before CLEAR in graphRebuild (#529)
feat(kg): add predicate-count breakdown to GraphMetadata (#526)
feat(kg): add predicate-count breakdown to GraphMetadata (#526)
feat(kg): add predicate-count breakdown to GraphMetadata (#526) (#530)
fix(kg): bump DEFAULT_GRAPH_IRI to dodge stale per-graph ACL (#533) (#…
fix(admin-ui): add ConceptActionsController.js for FE V4 press paths (#…
feat(kg): SPARQL DEFINER procedures eliminate per-graph ACL (#533) (#555