From c3801c3d6627eb98b6ba92583823e887c83d47b7 Mon Sep 17 00:00:00 2001 From: Shuchu Han Date: Thu, 3 Aug 2023 12:35:17 -0400 Subject: [PATCH] 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: