@@ -781,6 +781,8 @@ def run(
781781 Returns:
782782 True if the run was successful, False otherwise.
783783 """
784+ self ._load_materializations ()
785+
784786 environment = environment or self .config .default_target_environment
785787 environment = Environment .sanitize_name (environment )
786788 if not skip_janitor and environment .lower () == c .PROD :
@@ -793,7 +795,6 @@ def run(
793795 engine_type = self .snapshot_evaluator .adapter .dialect ,
794796 state_sync_type = self .state_sync .state_type (),
795797 )
796- self ._load_materializations ()
797798
798799 env_check_attempts_num = max (
799800 1 ,
@@ -885,6 +886,8 @@ def _has_environment_changed() -> bool:
885886
886887 @python_api_analytics
887888 def run_janitor (self , ignore_ttl : bool ) -> bool :
889+ self ._load_materializations ()
890+
888891 success = False
889892
890893 if self .console .start_cleanup (ignore_ttl ):
@@ -2873,6 +2876,8 @@ def _destroy(self) -> bool:
28732876 self .state_sync .invalidate_environment (name = environment .name , protect_prod = False )
28742877 self .console .log_success (f"Environment '{ environment .name } ' invalidated." )
28752878
2879+ self ._load_materializations ()
2880+
28762881 # Run janitor to clean up all objects
28772882 self ._run_janitor (ignore_ttl = True )
28782883
0 commit comments