We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47ea790 commit a8742bdCopy full SHA for a8742bd
sqlmesh/core/state_sync/db/snapshot.py
@@ -241,6 +241,7 @@ def _get_expired_snapshots(
241
exp.Select, expired_query.or_(exp.column("kind_name").eq(ModelKindName.VIEW))
242
)
243
244
+ candidates = {}
245
if ignore_ttl or expired_record_count > 0:
246
candidates = {
247
SnapshotId(name=name, identifier=identifier): SnapshotNameVersion(
tests/core/state_sync/test_state_sync.py
@@ -1129,6 +1129,8 @@ def test_get_expired_snapshots_includes_downstream_view_snapshots(
1129
):
1130
now_ts = now_timestamp()
1131
1132
+ assert len(state_sync.get_expired_snapshots(now_ts)) == 0
1133
+
1134
# model_a: table snapshot
1135
snapshot_a = make_snapshot(
1136
SqlModel(
0 commit comments