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.
ADR: Add New repository library design #1693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADR: Add New repository library design #1693
Changes from all commits
845f307
bcab2e9
f6ede42
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hooray for GitHub Markdown footnotes! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a bit confused by the word "generic" in "Generic App Code". Isn't this actually the code specific to an application? Maybe it's me, but I briefly thought that it means that it is something provided by python-tuf (generic and thus eligible for all applications).
Would "App management code" be a good choice of words?
(Same goes for the second diagram)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, "generic" was meant in the sense that "this code does not need to be part of the class implementing Repository interface"...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the design document make the decision on what layer such functionality should be implemented? Or at least explain based on what factors the decision should be made?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm proposing we start with the absolute minimum in the library: possibly just snapshot and sign implemented in the library itself. So the application is left with it's own design choices for the rest (should
MyDerivedRepository
offer helper functions or should the application code just use the edit() contextmanager itself -- the proof of concept goes with the latter choice)...Nothing prevents us from moving some functionality into the library if that seems to make sense for multiple users but I don't see a reason to do that without seeing some implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, with your explanation here the document makes more sense. (cf. my reply above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be nice to have this example concrete implementation support a CLI for demos and such.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I didn't want to bloat these docs but I see a few potential implementations:
Both of these could live inside or outside the repo... I'm not against the first one at all but I kind of feel the second one is even more important. The focus on CLI tools in TUF community (where every project seems to be a CLI tool) is not just a good thing IMO: it creates this impression that production repos can be shell scripts calling CLI tools**... which I don't think is such a great idea.
** yes, I realize I've written exactly this myself: don't do as I do, do as I say 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see potential problems for our current deserialization implementation when providing default arguments, but we can discuss this separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's do that in #1459 (see #1459 (comment))
Possibly some
from_dict()
implementations would have to be extra careful not to pass deserialized None/null values to a constructor.