Skip to content

ngclient: Make refresh() optional #1650

Closed

Description

@jku

A core design change in ngclient (compared to legacy) is that the updater only loads metadata in "dependency order": this means reloading e.g. root metadata after timestamp metadata is loaded is just not possible. This means that calling Updater.refresh() multiple times is not possible: if user wants to "load a new repository snapshot" they should create a new Updater*.

This leads to refresh() call becoming rather unnecessary: we can just run that automatically the first time get_targetinfo() is called. I don't want to remove refresh() from the API completely as it does do multiple http requests and the targets response could be large, so some clients might want to do refresh() explicitly. I do want to make calling refresh() optional.

This is the last part of #1580.

*) we could make multiple refreshes work: it would just mean almost the same thing as creating a new Updater. The only thing that would be optimized is not reading root.json from disk

Activity

  1. self-assigned this
    on Oct 29, 2021
  2. added this to the Sprint 11 milestone on Oct 29, 2021
  3. linked a pull request that will close this issuengclient: Implicitly call refresh() #1654on Nov 3, 2021
  4. modified the milestones: Sprint 11, Sprint 12 on Nov 10, 2021
  5. added
    backlog
    on Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backlog

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions