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

ngclient: return loaded metadata from Updater._load_targets #1507

Closed
sechkova opened this issue Jul 23, 2021 · 2 comments · Fixed by #1680
Closed

ngclient: return loaded metadata from Updater._load_targets #1507

sechkova opened this issue Jul 23, 2021 · 2 comments · Fixed by #1680
Assignees
Labels
backlog Issues to address with priority for current development goals enhancement good first issue Bite-sized items for first time contributors ngclient

Comments

@sechkova
Copy link
Contributor

Description of issue or feature request:
During the traversal of the delegations tree, each targets metadata file is first loaded/downloaded and then "visited".
It would be convenient if Updater._load_targets directly returns the loaded metadata to avoid lookup on the next line.

Current behavior:

            # The metadata for 'role_name' must be downloaded/updated before
            # its targets, delegations, and child roles can be inspected.
            self._load_targets(role_name, parent_role)
            role_metadata: Targets = self._trusted_set[role_name].signed

Expected behavior:

role_metadata = self._load_targets(role_name, parent_role)
@joshuagl joshuagl added the good first issue Bite-sized items for first time contributors label Jul 27, 2021
@jku
Copy link
Member

jku commented Aug 4, 2021

This should go one level deeper. right? TrustedMetadataSet should return the new trusted Metadata on successful calls to all update_*() functions?

This doesn't make the task any more complex but means it could be done in two bits: first add the TrustedMetadataSet changes, then use them in Updater._load_targets()

@joshuagl joshuagl added the backlog Issues to address with priority for current development goals label Aug 18, 2021
@ivanayov
Copy link
Collaborator

Can I take this, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issues to address with priority for current development goals enhancement good first issue Bite-sized items for first time contributors ngclient
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants