@@ -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.
@@ -258,7 +257,6 @@ def promote(
258257 environment_naming_info = environment_naming_info ,
259258 deployability_index = deployability_index , # type: ignore
260259 on_complete = on_complete ,
261- snapshots_with_virtual_views = snapshots_with_virtual_views ,
262260 ),
263261 self .ddl_concurrent_tasks ,
264262 )
@@ -268,7 +266,6 @@ def demote(
268266 target_snapshots : t .Iterable [SnapshotInfoLike ],
269267 environment_naming_info : EnvironmentNamingInfo ,
270268 on_complete : t .Optional [t .Callable [[SnapshotInfoLike ], None ]] = None ,
271- snapshots_with_virtual_views : t .Optional [t .List [SnapshotId ]] = None ,
272269 ) -> None :
273270 """Demotes the given collection of snapshots in the target environment by removing its view.
274271
@@ -280,9 +277,7 @@ def demote(
280277 with self .concurrent_context ():
281278 concurrent_apply_to_snapshots (
282279 target_snapshots ,
283- lambda s : self ._demote_snapshot (
284- s , environment_naming_info , on_complete , snapshots_with_virtual_views
285- ),
280+ lambda s : self ._demote_snapshot (s , environment_naming_info , on_complete ),
286281 self .ddl_concurrent_tasks ,
287282 )
288283
@@ -948,7 +943,6 @@ def _promote_snapshot(
948943 execution_time : t .Optional [TimeLike ] = None ,
949944 snapshots : t .Optional [t .Dict [SnapshotId , Snapshot ]] = None ,
950945 table_mapping : t .Optional [t .Dict [str , str ]] = None ,
951- snapshots_with_virtual_views : t .Optional [t .List [SnapshotId ]] = None ,
952946 ) -> None :
953947 if snapshot .is_model :
954948 adapter = (
@@ -979,19 +973,14 @@ def _promote_snapshot(
979973 )
980974 adapter .execute (snapshot .model .render_on_virtual_update (** render_kwargs ))
981975
982- if (
983- on_complete is not None
984- and snapshots_with_virtual_views
985- and snapshot .snapshot_id in snapshots_with_virtual_views
986- ):
976+ if on_complete is not None :
987977 on_complete (snapshot )
988978
989979 def _demote_snapshot (
990980 self ,
991981 snapshot : SnapshotInfoLike ,
992982 environment_naming_info : EnvironmentNamingInfo ,
993983 on_complete : t .Optional [t .Callable [[SnapshotInfoLike ], None ]],
994- snapshots_with_virtual_views : t .Optional [t .List [SnapshotId ]] = None ,
995984 ) -> None :
996985 adapter = (
997986 self .get_adapter (snapshot .model_gateway )
@@ -1003,11 +992,7 @@ def _demote_snapshot(
1003992 )
1004993 _evaluation_strategy (snapshot , adapter ).demote (view_name )
1005994
1006- if (
1007- on_complete is not None
1008- and snapshots_with_virtual_views
1009- and snapshot .snapshot_id in snapshots_with_virtual_views
1010- ):
995+ if on_complete is not None :
1011996 on_complete (snapshot )
1012997
1013998 def _cleanup_snapshot (
0 commit comments