diff --git a/sdk/python/feast/repo_operations.py b/sdk/python/feast/repo_operations.py index 3e9ddb6e30..0638ca589a 100644 --- a/sdk/python/feast/repo_operations.py +++ b/sdk/python/feast/repo_operations.py @@ -237,12 +237,13 @@ def extract_objects_for_apply_delete(project, registry, repo): return all_to_apply, all_to_delete, views_to_delete, views_to_keep -@log_exceptions_and_usage -def apply_total(repo_config: RepoConfig, repo_path: Path, skip_source_validation: bool): - - os.chdir(repo_path) - project, registry, repo, store = _prepare_registry_and_repo(repo_config, repo_path) - +def apply_total_with_repo_instance( + store: FeatureStore, + project: str, + registry: Registry, + repo: RepoContents, + skip_source_validation: bool, +): if not skip_source_validation: data_sources = [t.batch_source for t in repo.feature_views] # Make sure the data source used by this feature view is supported by Feast @@ -262,6 +263,16 @@ def apply_total(repo_config: RepoConfig, repo_path: Path, skip_source_validation log_cli_output(diff, views_to_delete, views_to_keep) +@log_exceptions_and_usage +def apply_total(repo_config: RepoConfig, repo_path: Path, skip_source_validation: bool): + + os.chdir(repo_path) + project, registry, repo, store = _prepare_registry_and_repo(repo_config, repo_path) + apply_total_with_repo_instance( + store, project, registry, repo, skip_source_validation + ) + + def log_cli_output(diff, views_to_delete, views_to_keep): from colorama import Fore, Style