Skip to content

Commit

Permalink
fix for using git SSH credentials (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddl-joyce-zhao authored Jan 3, 2023
1 parent 710fc44 commit 47e0085
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions domino_data/_feature_store/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,18 @@ def feature_store_sync(
result = FeatureStoreSyncResult.FAILURE
lock(feature_store_id, max_retries)
try:
pull_repo(repo, branch_name)
run_feast_apply(repo_path_str=repo_path_str, skip_source_validation=skip_source_validation)
push_to_git(repo)
# Feature store syncing is going to be run in a domino job. Turn off it
# to avoid the user interaction on host authentication. Feast git repo
# has already been pulled and mounted as a volume to the job pod, so the host
# can be trusted.
git_ssh_cmd = "ssh -o StrictHostKeyChecking=no"
with repo.git.custom_environment(GIT_SSH_COMMAND=git_ssh_cmd):
pull_repo(repo, branch_name)
run_feast_apply(
repo_path_str=repo_path_str, skip_source_validation=skip_source_validation
)
push_to_git(repo)

update_feature_views(repo.head.object.hexsha, repo_path_str)
result = FeatureStoreSyncResult.SUCCESS
logger.info("Finished feature store syncing.")
Expand Down

0 comments on commit 47e0085

Please sign in to comment.