Skip to content
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

repository: redesign needed after recent verify_delegate changes #2493

Open
jku opened this issue Oct 17, 2023 · 0 comments
Open

repository: redesign needed after recent verify_delegate changes #2493

jku opened this issue Oct 17, 2023 · 0 comments
Labels
discussion Discussions related to the design, implementation and operation of the project

Comments

@jku
Copy link
Member

jku commented Oct 17, 2023

The Repository interface looks like it does largely because of needs from A) verify_delegate and B) sign: Both needed to be called on a Metadata object and former event took a Metadata object as argument. This meant Repository.open() needed to return a Metadata even though most users could just use helpers like root() or edit_root()

The recent Metadata refactor means verify_delegate is now in Root/Targets, and takes a bytes and signatures as argument. So Repository.open() is now even more awkward than it used to be.

The remaining uses for Metadata are de/serialization, and accessing sign(), signatures and signed_bytes -- possibly these could be handled within Repository.open() /close() so that open() did not return a Metadata object and close did not require one as argument.

@jku jku added the discussion Discussions related to the design, implementation and operation of the project label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussions related to the design, implementation and operation of the project
Projects
None yet
Development

No branches or pull requests

1 participant