@@ -216,7 +216,6 @@ def promote(
216216 snapshots : t .Optional [t .Dict [SnapshotId , Snapshot ]] = None ,
217217 table_mapping : t .Optional [t .Dict [str , str ]] = None ,
218218 on_complete : t .Optional [t .Callable [[SnapshotInfoLike ], None ]] = None ,
219- snapshots_with_virtual_views : t .Optional [t .List [SnapshotId ]] = None ,
220219 ) -> None :
221220 """Promotes the given collection of snapshots in the target environment by replacing a corresponding
222221 view with a physical table associated with the given snapshot.
@@ -250,7 +249,6 @@ def promote(
250249 environment_naming_info = environment_naming_info ,
251250 deployability_index = deployability_index , # type: ignore
252251 on_complete = on_complete ,
253- snapshots_with_virtual_views = snapshots_with_virtual_views ,
254252 ),
255253 self .ddl_concurrent_tasks ,
256254 )
@@ -260,7 +258,6 @@ def demote(
260258 target_snapshots : t .Iterable [SnapshotInfoLike ],
261259 environment_naming_info : EnvironmentNamingInfo ,
262260 on_complete : t .Optional [t .Callable [[SnapshotInfoLike ], None ]] = None ,
263- snapshots_with_virtual_views : t .Optional [t .List [SnapshotId ]] = None ,
264261 ) -> None :
265262 """Demotes the given collection of snapshots in the target environment by removing its view.
266263
@@ -272,9 +269,7 @@ def demote(
272269 with self .concurrent_context ():
273270 concurrent_apply_to_snapshots (
274271 target_snapshots ,
275- lambda s : self ._demote_snapshot (
276- s , environment_naming_info , on_complete , snapshots_with_virtual_views
277- ),
272+ lambda s : self ._demote_snapshot (s , environment_naming_info , on_complete ),
278273 self .ddl_concurrent_tasks ,
279274 )
280275
@@ -923,7 +918,6 @@ def _promote_snapshot(
923918 execution_time : t .Optional [TimeLike ] = None ,
924919 snapshots : t .Optional [t .Dict [SnapshotId , Snapshot ]] = None ,
925920 table_mapping : t .Optional [t .Dict [str , str ]] = None ,
926- snapshots_with_virtual_views : t .Optional [t .List [SnapshotId ]] = None ,
927921 ) -> None :
928922 if snapshot .is_model :
929923 adapter = self .adapter
@@ -950,31 +944,22 @@ def _promote_snapshot(
950944 )
951945 adapter .execute (snapshot .model .render_on_virtual_update (** render_kwargs ))
952946
953- if (
954- on_complete is not None
955- and snapshots_with_virtual_views
956- and snapshot .snapshot_id in snapshots_with_virtual_views
957- ):
947+ if on_complete is not None :
958948 on_complete (snapshot )
959949
960950 def _demote_snapshot (
961951 self ,
962952 snapshot : SnapshotInfoLike ,
963953 environment_naming_info : EnvironmentNamingInfo ,
964954 on_complete : t .Optional [t .Callable [[SnapshotInfoLike ], None ]],
965- snapshots_with_virtual_views : t .Optional [t .List [SnapshotId ]] = None ,
966955 ) -> None :
967956 adapter = self .adapter
968957 view_name = snapshot .qualified_view_name .for_environment (
969958 environment_naming_info , dialect = adapter .dialect
970959 )
971960 _evaluation_strategy (snapshot , adapter ).demote (view_name )
972961
973- if (
974- on_complete is not None
975- and snapshots_with_virtual_views
976- and snapshot .snapshot_id in snapshots_with_virtual_views
977- ):
962+ if on_complete is not None :
978963 on_complete (snapshot )
979964
980965 def _cleanup_snapshot (
0 commit comments