Move all TUF mgmt code to RepositoryService (WIP) #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alternative design for pypi#10870
Motivated by pypi#10870 (comment)
Reduce complexity and lines of code by implementing all current TUF
management code inside
RepositoryService
, and thus removing onelevel of abstraction, previously implemented by the
MetadataRepository
class.NOTE: This patch is marked WIP, as it has not removed all
references to
MetadataRepository
, nor adopted the tests.Moreover, it still needs review in terms of correctness wrt PEP458.
But the reduced complexity should make this easier.
NOTE: (2) There is more potential for DRY code, see reoccurring
_bump_version; _bump_expiration; _sign; _persist;
and_update_snapshot; _update_timestamp;
call chains. For thisiteration of the patch, I chose verbosity/explicitness over saving
a few more lines. But maybe both can be achieved.
Signed-off-by: Lukas Puehringer [email protected]