From fd9adeede773f7f6bcf5fcc211062b8929d94bd1 Mon Sep 17 00:00:00 2001 From: Iaroslav Zeigerman Date: Tue, 19 Aug 2025 14:13:26 -0700 Subject: [PATCH] Fix: Remove leftover forward-only category usage when categorizing orphaned snapshots --- sqlmesh/core/plan/builder.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/sqlmesh/core/plan/builder.py b/sqlmesh/core/plan/builder.py index a1adca56fb..3bfff1aa12 100644 --- a/sqlmesh/core/plan/builder.py +++ b/sqlmesh/core/plan/builder.py @@ -733,17 +733,11 @@ def _get_orphaned_indirect_change_category( # One of the new parents in the chain was breaking so this indirect snapshot is breaking return SnapshotChangeCategory.INDIRECT_BREAKING - if SnapshotChangeCategory.FORWARD_ONLY in previous_parent_categories: - # One of the new parents in the chain was forward-only so this indirect snapshot is forward-only - indirect_category = SnapshotChangeCategory.FORWARD_ONLY - elif ( - previous_parent_categories.intersection( - { - SnapshotChangeCategory.NON_BREAKING, - SnapshotChangeCategory.INDIRECT_NON_BREAKING, - } - ) - and indirect_category != SnapshotChangeCategory.FORWARD_ONLY + if previous_parent_categories.intersection( + { + SnapshotChangeCategory.NON_BREAKING, + SnapshotChangeCategory.INDIRECT_NON_BREAKING, + } ): # All changes in the chain were non-breaking so this indirect snapshot can be non-breaking too indirect_category = SnapshotChangeCategory.INDIRECT_NON_BREAKING