Skip to content

Commit 44fb06d

Browse files
committed
Don't always autocategorize breaking kind changes
1 parent 99806a2 commit 44fb06d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

sqlmesh/core/plan/builder.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -606,12 +606,15 @@ def _categorize_snapshot(
606606

607607
if self._context_diff.directly_modified(s_id.name):
608608
new, old = self._context_diff.modified_snapshots[s_id.name]
609-
if _is_breaking_kind_change(old, new):
610-
snapshot.categorize_as(SnapshotChangeCategory.BREAKING, False)
611-
elif self._auto_categorization_enabled:
612-
if snapshot.is_seed:
613-
# Seed changes can't be forward-only.
614-
forward_only = False
609+
is_breaking_kind_change = _is_breaking_kind_change(old, new)
610+
if is_breaking_kind_change or snapshot.is_seed:
611+
# Breaking kind changes and seed changes can't be forward-only.
612+
forward_only = False
613+
614+
if self._auto_categorization_enabled:
615+
if is_breaking_kind_change:
616+
snapshot.categorize_as(SnapshotChangeCategory.BREAKING, forward_only)
617+
return
615618

616619
s_id_with_missing_columns: t.Optional[SnapshotId] = None
617620
this_sid_with_downstream = indirectly_modified.get(s_id, set()) | {s_id}

0 commit comments

Comments
 (0)