Skip to content

Commit c5b52b2

Browse files
authored
fix!: include end in metadata hash (#2344)
1 parent 30b1e5e commit c5b52b2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

sqlmesh/core/model/definition.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,7 @@ def metadata_hash(self, audits: t.Dict[str, ModelAudit]) -> str:
755755
json.dumps(self.column_descriptions, sort_keys=True),
756756
self.cron,
757757
str(self.start) if self.start else None,
758+
str(self.end) if self.end else None,
758759
str(self.retention) if self.retention else None,
759760
str(self.batch_size) if self.batch_size is not None else None,
760761
json.dumps(self.mapping_schema, sort_keys=True),

tests/core/test_snapshot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ def test_fingerprint(model: Model, parent_model: Model):
606606

607607
original_fingerprint = SnapshotFingerprint(
608608
data_hash="372035512",
609-
metadata_hash="3575901791",
609+
metadata_hash="490962550",
610610
)
611611

612612
assert fingerprint == original_fingerprint
@@ -666,7 +666,7 @@ def test_fingerprint_seed_model():
666666

667667
expected_fingerprint = SnapshotFingerprint(
668668
data_hash="2156038176",
669-
metadata_hash="3058233394",
669+
metadata_hash="3304326900",
670670
)
671671

672672
model = load_sql_based_model(expressions, path=Path("./examples/sushi/models/test_model.sql"))
@@ -705,7 +705,7 @@ def test_fingerprint_jinja_macros(model: Model):
705705
)
706706
original_fingerprint = SnapshotFingerprint(
707707
data_hash="900027747",
708-
metadata_hash="3575901791",
708+
metadata_hash="490962550",
709709
)
710710

711711
fingerprint = fingerprint_from_node(model, nodes={})

0 commit comments

Comments
 (0)