Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix load_repo_config
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals committed Aug 15, 2022
commit 9f2dd8e9b2abc1fe05373ae72ef9f421f86a407c
8 changes: 4 additions & 4 deletions sdk/python/feast/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def plan_command(ctx: click.Context, skip_source_validation: bool):
repo = ctx.obj["CHDIR"]
fs_yaml_file = ctx.obj["FS_YAML_FILE"]
cli_check_repo(repo, fs_yaml_file)
repo_config = load_repo_config(fs_yaml_file, repo)
repo_config = load_repo_config( repo, fs_yaml_file)
try:
plan(repo_config, repo, skip_source_validation)
except FeastProviderLoginError as e:
Expand All @@ -520,7 +520,7 @@ def apply_total_command(ctx: click.Context, skip_source_validation: bool):
fs_yaml_file = ctx.obj["FS_YAML_FILE"]
cli_check_repo(repo, fs_yaml_file)

repo_config = load_repo_config(fs_yaml_file, repo)
repo_config = load_repo_config( repo, fs_yaml_file)
try:
apply_total(repo_config, repo, skip_source_validation)
except FeastProviderLoginError as e:
Expand All @@ -536,7 +536,7 @@ def teardown_command(ctx: click.Context):
repo = ctx.obj["CHDIR"]
fs_yaml_file = ctx.obj["FS_YAML_FILE"]
cli_check_repo(repo, fs_yaml_file)
repo_config = load_repo_config(fs_yaml_file, repo)
repo_config = load_repo_config( repo, fs_yaml_file)

teardown(repo_config, repo)

Expand All @@ -550,7 +550,7 @@ def registry_dump_command(ctx: click.Context):
repo = ctx.obj["CHDIR"]
fs_yaml_file = ctx.obj["FS_YAML_FILE"]
cli_check_repo(repo, fs_yaml_file)
repo_config = load_repo_config(fs_yaml_file, repo)
repo_config = load_repo_config(repo, fs_yaml_file)

click.echo(registry_dump(repo_config, repo_path=repo))

Expand Down
4 changes: 2 additions & 2 deletions sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ def __init__(
if config is not None:
self.config = config
elif fs_yaml_file is not None:
self.config = load_repo_config(fs_yaml_file, self.repo_path)
self.config = load_repo_config(self.repo_path, fs_yaml_file)
elif repo_path:
self.config = load_repo_config(
Path(repo_path) / "feature_store.yaml", self.repo_path
self.repo_path, Path(repo_path) / "feature_store.yaml"
)
else:
raise ValueError("Please specify one of fs_yaml_dir or config.")
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/repo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def get_feature_server_config_from_type(feature_server_type: str):
return import_class(module_name, config_class_name, config_class_name)


def load_repo_config(fs_yaml_file: Path, repo_path: Path) -> RepoConfig:
def load_repo_config(repo_path: Path, fs_yaml_file: Path) -> RepoConfig:
config_path = fs_yaml_file

with open(config_path) as f:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _test_config(config_text, expect_error: Optional[str]):
error = None
rc = None
try:
rc = load_repo_config(repo_config, repo_path)
rc = load_repo_config(repo_path, repo_config)
except FeastConfigError as e:
error = e

Expand Down