Uh oh!
There was an error while loading. Please reload this page.
Update ngclient to return loaded metadata - #1680
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Pull Request Test Coverage Report for Build 1476029676Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Looks pretty good... in addition to the annotation comment Martin made (that applies everywhere where we know the contained type):
- it looks like we'll only use the return values from update_delegated_targets() but I agree it still makes sense to make all
TrustedMetadataSet.update_*()methods return values in the same way: it keeps the TrustedMetadataSet API consistent TrustedMetadataSet.update_targets()does not return a value yet, it should- I wonder about
Updater._load_*()functions though -- they are internal to Updater... maybe it does not make sense to modify a function unless we actually want to use the return value. So this would mean we'd only modify _load_targets(), and not the other methods. I'm fine with other opinions in this one though
Uh oh!
There was an error while loading. Please reload this page.
ivanayov
commented
Nov 17, 2021
Thanks for the reviews! The reason I left |
ivanayov
commented
Nov 17, 2021
We agreed with @jku on returning metadata from all |
f778d36 to
ff5ddceCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
MVrachev
commented
Nov 17, 2021
I realized that probably there is no sense in annotating the return type as |
jku
commented
Nov 18, 2021
We should return Metadata[T] and it seems we do, I don't see a problem. If we returned Root from |
jku
left a comment
There was a problem hiding this comment.
Thanks, looks nice. Quite a bit of work to avoid one single dict lookup, but I think the end result is a better TrustedMetadataSet API (and might be useful in the repository work later).
I just had one nit about the return value docstring
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
MVrachev
commented
Nov 18, 2021
Apologize for my review here. I made a wrong assumption. |
ff5ddce to
a0d412fCompare
MVrachev
left a comment
There was a problem hiding this comment.
Thanks for addressing my comments!
LGTM!
jku
left a comment
There was a problem hiding this comment.
This looks good to me. Left a really minor comment but no need to update just for that
Uh oh!
There was an error while loading. Please reload this page.
This changes `TrustedMetadataSet` to return new trusted Metadata on successful calls of the `update_<role>` functions and also changes `Updater._load_targets` to return loaded metadata as well Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
a0d412f to
9c2bf6eCompare
This changes
TrustedMetadataSetto return new trusted Metadataon successful calls of the
update_<role>functions and alsochanges
Updater._load_targetsto return loaded metadata as wellFixes#1507