From 7bc7c47b4507310850474290131c03fb6d480834 Mon Sep 17 00:00:00 2001 From: Shuchu Han Date: Sun, 13 Aug 2023 23:33:47 -0400 Subject: [PATCH] fix: Run store.plan() only when need it. (#3708) fix: issue-3682, run store.plan() only when need it. --- sdk/python/feast/repo_operations.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sdk/python/feast/repo_operations.py b/sdk/python/feast/repo_operations.py index 0cd425a46b..120f6e7a42 100644 --- a/sdk/python/feast/repo_operations.py +++ b/sdk/python/feast/repo_operations.py @@ -296,8 +296,6 @@ def apply_total_with_repo_instance( for data_source in data_sources: data_source.validate(store.config) - registry_diff, infra_diff, new_infra = store.plan(repo) - # For each object in the registry, determine whether it should be kept or deleted. ( all_to_apply, @@ -306,9 +304,10 @@ def apply_total_with_repo_instance( views_to_delete, ) = extract_objects_for_apply_delete(project, registry, repo) - click.echo(registry_diff.to_string()) - if store._should_use_plan(): + registry_diff, infra_diff, new_infra = store.plan(repo) + click.echo(registry_diff.to_string()) + store._apply_diffs(registry_diff, infra_diff, new_infra) click.echo(infra_diff.to_string()) else: