Skip to content

Commit 288611f

Browse files
even-weiclaude
andcommitted
fix(cll): handle non-string checksum values from dbt manifest
The test helper uses `hash(raw_code)` which returns an int, and some older dbt versions may also store non-string checksums. Wrap with `str()` to ensure the content key always receives a string. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: even-wei <evenwei@infuseai.io>
1 parent c302475 commit 288611f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

recce/adapter/dbt_adapter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ def _get_checksum(nid: str) -> str:
10671067
if nid in manifest.nodes:
10681068
cs = getattr(manifest.nodes[nid], "checksum", None)
10691069
if cs and getattr(cs, "checksum", None):
1070-
return cs.checksum
1070+
return str(cs.checksum)
10711071
return nid
10721072

10731073
# Collect all node IDs from all resource types

recce/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def _get_checksum(nid_: str) -> str:
409409
if nid_ in manifest.nodes:
410410
cs = getattr(manifest.nodes[nid_], "checksum", None)
411411
if cs and getattr(cs, "checksum", None):
412-
return cs.checksum
412+
return str(cs.checksum)
413413
return nid_
414414

415415
success = 0

0 commit comments

Comments
 (0)