Skip to content

Commit ea8f1ff

Browse files
committed
fix(llama-index): escape node label in upsert_nodes with _cypher_ident
fix(llama-index): align delete() to use n.id (string) not id(n) (int graph ID) fix(client): add debug logging on gRPC health check failure docs(release): document single shared version intent in release-please-config.json
1 parent 1c64499 commit ea8f1ff

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

coordinode/client.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from __future__ import annotations
66

77
import asyncio
8+
import logging
89
from collections.abc import Sequence
910
from typing import Any
1011

@@ -19,6 +20,8 @@
1920
props_to_dict,
2021
)
2122

23+
logger = logging.getLogger(__name__)
24+
2225
# ── Low-level helpers ────────────────────────────────────────────────────────
2326

2427

@@ -295,7 +298,12 @@ async def health(self) -> bool:
295298
try:
296299
resp = await self._health_stub.Check(HealthCheckRequest(), timeout=5.0)
297300
return resp.status == ServingStatus.SERVING_STATUS_SERVING
298-
except grpc.RpcError:
301+
except grpc.RpcError as e:
302+
logger.debug(
303+
"health check failed: %s %s",
304+
e.code(), # type: ignore[union-attr]
305+
e.details(), # type: ignore[union-attr]
306+
)
299307
return False
300308

301309

llama-index-coordinode/llama_index/graph_stores/coordinode/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def upsert_nodes(self, nodes: list[LabelledNode]) -> None:
183183
"""Upsert nodes into the graph."""
184184
for node in nodes:
185185
props = _labelled_to_props(node)
186-
label = _node_label(node)
186+
label = _cypher_ident(_node_label(node))
187187
cypher = f"MERGE (n:{label} {{id: $id}}) SET n += $props"
188188
self._client.cypher(cypher, params={"id": node.id, "props": props})
189189

@@ -215,7 +215,8 @@ def delete(
215215
if relation_names or properties:
216216
raise NotImplementedError("delete() does not yet support filtering by relation_names or properties")
217217
if ids:
218-
cypher = "MATCH (n) WHERE id(n) IN $ids DETACH DELETE n"
218+
# Use n.id (string adapter ID) for consistency with get()
219+
cypher = "MATCH (n) WHERE n.id IN $ids DETACH DELETE n"
219220
self._client.cypher(cypher, params={"ids": ids})
220221
elif entity_names:
221222
cypher = "MATCH (n) WHERE n.name IN $names DETACH DELETE n"

release-please-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"include-component-in-tag": false,
66
"packages": {
77
".": {
8+
"_comment": "Single shared version for all three workspace packages (coordinode, langchain-coordinode, llama-index-graph-stores-coordinode). release.yml builds and publishes all three from one tag.",
89
"component": "sdk",
910
"changelog-path": "CHANGELOG.md"
1011
}

0 commit comments

Comments
 (0)