Skip to content

Commit 5a882ee

Browse files
shuchuBhargav Dodla
authored and
Bhargav Dodla
committed
fix: Run store.plan() only when need it. (feast-dev#3708)
fix: issue-3682, run store.plan() only when need it.
1 parent 79cdd7d commit 5a882ee

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sdk/python/feast/repo_operations.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,6 @@ def apply_total_with_repo_instance(
296296
for data_source in data_sources:
297297
data_source.validate(store.config)
298298

299-
registry_diff, infra_diff, new_infra = store.plan(repo)
300-
301299
# For each object in the registry, determine whether it should be kept or deleted.
302300
(
303301
all_to_apply,
@@ -306,9 +304,10 @@ def apply_total_with_repo_instance(
306304
views_to_delete,
307305
) = extract_objects_for_apply_delete(project, registry, repo)
308306

309-
click.echo(registry_diff.to_string())
310-
311307
if store._should_use_plan():
308+
registry_diff, infra_diff, new_infra = store.plan(repo)
309+
click.echo(registry_diff.to_string())
310+
312311
store._apply_diffs(registry_diff, infra_diff, new_infra)
313312
click.echo(infra_diff.to_string())
314313
else:

0 commit comments

Comments
 (0)