Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split apply total parse repo #2226

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions sdk/python/feast/repo_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down