Skip to content

ngclient: return loaded metadata from Updater._load_targets #1507

Closed

Description

@sechkova

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)

Activity

  1. added
    good first issue
    on Jul 27, 2021
  2. jku commented on Aug 4, 2021

    @jku
    Member

    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()

  3. added
    backlog
    on Aug 18, 2021
  4. ivanayov commented on Nov 12, 2021

    @ivanayov
    Collaborator

    Can I take this, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backlogenhancementgood first issuengclient

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions