Skip to content

Commit

Permalink
fix: Run store.plan() only when need it. (feast-dev#3708)
Browse files Browse the repository at this point in the history
fix: issue-3682, run store.plan() only when need it.
  • Loading branch information
shuchu authored Aug 14, 2023
1 parent 4a35e0b commit 7bc7c47
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sdk/python/feast/repo_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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:
Expand Down

0 comments on commit 7bc7c47

Please sign in to comment.