Skip to content

Commit

Permalink
fix: pass in 'library_dir' to load_repositories (#553)
Browse files Browse the repository at this point in the history
It was previously retrieved through auth_repo.parent.parent, which works in most cases. The only case where this fails is when the authentication repository is not within 2 levels above the current directory, and is the current case on our AppVeyor CI.
  • Loading branch information
n-dusan authored Oct 16, 2024
1 parent 449f05f commit 210be9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions taf/repositoriesdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,15 @@ def get_deduplicated_repositories(
auth_repo: AuthenticationRepository,
commits: Optional[List[str]] = None,
excluded_target_globs: Optional[List[str]] = None,
library_dir: Optional[str] = None,
) -> Dict[str, GitRepository]:
return _get_deduplicated_target_or_auth_repositories(
auth_repo, commits, False, excluded_target_globs
auth_repo, commits, False, excluded_target_globs, library_dir
)


def _get_deduplicated_target_or_auth_repositories(
auth_repo, commits, load_auth=False, excluded_target_globs=None
auth_repo, commits, load_auth=False, excluded_target_globs=None, library_dir=None
):
if commits is None:
commits = [auth_repo.head_commit_sha()]
Expand All @@ -499,6 +500,7 @@ def _get_deduplicated_target_or_auth_repositories(
auth_repo=auth_repo,
commits=commits,
excluded_target_globs=excluded_target_globs,
library_dir=library_dir,
)
}

Expand Down
1 change: 1 addition & 0 deletions taf/updater/updater_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,7 @@ def load_target_repositories(self):
self.state.users_auth_repo,
self.state.auth_commits_since_last_validated[-1::],
excluded_target_globs=self.excluded_target_globs,
library_dir=self.library_dir,
)
)
if self.only_validate:
Expand Down

0 comments on commit 210be9d

Please sign in to comment.