-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor update_snapshot & _run_online_roles_bump
The goal of the "update_snapshot" refactoring is to: 1. make a better separation between the two usages of "update_snapshot" - the first is to update snapshot and all roles that were given with the "targets_roles" argument - the second is to update snapshot and ALL bin target roles In the end, I wanted to be able to call "update_snapshot" with "bump_all" without having to pass the "targets_roles" argument. 2. fix a bug where when calling "update_snapshot" the resulting new snapshot meta didn't contain updated information for targets.json This resulted in a bug that when calling "_run_online_roles_bump", which updated targets.json, we saved the new targets.json, but the new snapshot.json didn't reference it. The second part of this refactoring is about "_run_online_roles_bump". Again there were two goals of this refactoring: 1. make sure we call "update_snapshot" correctly. This means when we force an update of all target bins we shouldn't also pass the "targets_roles" list. 2. make it clearer how we use the "force" argument: - when "force = True" we force a bump of all bins and targets.json - when "force = False" we bump only those bins and targets.json which have expired. Finally, I did some small tweaks on our tests with the idea to improve them our asserts and checks. Signed-off-by: Martin Vrachev <[email protected]>
- Loading branch information
Showing
2 changed files
with
275 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.