Skip to content

Commit

Permalink
Merge branch 'master' into update-yubikey
Browse files Browse the repository at this point in the history
  • Loading branch information
renatav authored Jun 11, 2024
2 parents e8ff508 + d3effa0 commit 115fd40
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 37 deletions.
38 changes: 19 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,47 @@ and this project adheres to [Semantic Versioning][semver].
## [Unreleased]

### Added

- Support for Yubikey Manager 5.1.x ([444])
- Support for Python 3.11 and 3.12 ([440])
- Fix generation of keys when they should be printed to the command line ([435])
- Made Updater faster through parallelization ([434])
- Fixes repeating error messages in taf repo create and manual entry of keys-description ([432])
- Fix add_target_repo when signing role is the top-level targets role ([431])
- New git hook that validates repo before push ([423])
- New function taf repo status that prints the state of whole library ([422])
- New function taf roles list that lists all roles in an authentication repository ([421])
- Reimplemented get_file_details function to not rely on old securesystemslib functions ([420])
- Clone target repositories to temp ([412, 418])
- Clone target repositories to temp ([412], [418])
- Add architecture overview documentation ([405])

[444]: https://github.com/openlawlibrary/taf/pull/444
[440]: https://github.com/openlawlibrary/taf/pull/440
[435]: https://github.com/openlawlibrary/taf/pull/435
[434]: https://github.com/openlawlibrary/taf/pull/434
[432]: https://github.com/openlawlibrary/taf/pull/432
[431]: https://github.com/openlawlibrary/taf/pull/431
[423]: https://github.com/openlawlibrary/taf/pull/423
[422]: https://github.com/openlawlibrary/taf/pull/422
[421]: https://github.com/openlawlibrary/taf/pull/421
[420]: https://github.com/openlawlibrary/taf/pull/420
[412]: https://github.com/openlawlibrary/taf/pull/412
[405]: https://github.com/openlawlibrary/taf/pull/405


### Changed

- Dropped support for Yubikey Manager 4.x [444]
- Only load the latest mirrors.jon ([441])
- Fix generation of keys when they should be printed to the command line ([435])
- Made Updater faster through parallelization ([434])
- Reimplemented get_file_details function to not rely on old securesystemslib functions ([420])
- Check if repositories are clean before running the updater ([416])
- Only show merging commits messages if actually merging commits. Rework logic for checking if a commits should be merged ([404], [415])

### Fixed

- Fixes repeating error messages in taf repo create and manual entry of keys-description ([432])
- When checking if branch is synced, find first remote that works, instead of only trying the last remote url ([419])

[444]: https://github.com/openlawlibrary/taf/pull/444
[440]: https://github.com/openlawlibrary/taf/pull/440
[435]: https://github.com/openlawlibrary/taf/pull/435
[434]: https://github.com/openlawlibrary/taf/pull/434
[432]: https://github.com/openlawlibrary/taf/pull/432
[431]: https://github.com/openlawlibrary/taf/pull/431
[423]: https://github.com/openlawlibrary/taf/pull/423
[422]: https://github.com/openlawlibrary/taf/pull/422
[421]: https://github.com/openlawlibrary/taf/pull/421
[420]: https://github.com/openlawlibrary/taf/pull/420
[419]: https://github.com/openlawlibrary/taf/pull/419
[418]: https://github.com/openlawlibrary/taf/pull/418
[416]: https://github.com/openlawlibrary/taf/pull/416
[415]: https://github.com/openlawlibrary/taf/pull/415
[412]: https://github.com/openlawlibrary/taf/pull/412
[405]: https://github.com/openlawlibrary/taf/pull/405
[404]: https://github.com/openlawlibrary/taf/pull/404

## [0.29.3] - 03/15/2024
Expand Down
20 changes: 2 additions & 18 deletions taf/repositoriesdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def load_dependencies(
if library_dir is None:
library_dir = str(Path(auth_repo.path).parent.parent)

mirrors = load_mirrors_json(auth_repo, commits[-1])
for commit in commits:
dependencies_dict: Dict = {}
# check if already loaded
Expand All @@ -104,7 +105,6 @@ def load_dependencies(
if dependencies is None:
continue

mirrors = load_mirrors_json(auth_repo, commit)
dependencies = dependencies["dependencies"]
if dependencies is None:
continue
Expand Down Expand Up @@ -235,6 +235,7 @@ def load_repositories(
only_load_targets = True

skipped_targets = []
mirrors = load_mirrors_json(auth_repo, commits[-1])
for commit in commits:
repositories_dict: Dict = {}
# check if already loaded
Expand All @@ -247,8 +248,6 @@ def load_repositories(
if repositories is None:
continue

mirrors = load_mirrors_json(auth_repo, commit)

# target repositories are defined in both repositories.json and targets.json
repositories = repositories["repositories"]
if repositories is None:
Expand Down Expand Up @@ -601,21 +600,6 @@ def _compare(repo):
)


def get_repo_urls(
auth_repo: AuthenticationRepository, repo_name: str, commit: Optional[str] = None
) -> Optional[List[str]]:
if commit is None:
commit = auth_repo.head_commit_sha()
if commit is None:
raise TAFError(
"Could not load urls. Commit is not specified and head commit could not be determined"
)
mirrors = load_mirrors_json(auth_repo, commit)
if mirrors is not None:
return _get_urls(mirrors, repo_name)
return None


def _initialize_repository(
factory, repo_classes, urls, custom, library_dir, name, default_branch, auth_repo
):
Expand Down

0 comments on commit 115fd40

Please sign in to comment.