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: Make refresh() optional #1650

Closed
jku opened this issue Oct 29, 2021 · 0 comments · Fixed by #1654
Closed

ngclient: Make refresh() optional #1650

jku opened this issue Oct 29, 2021 · 0 comments · Fixed by #1654
Assignees
Labels
backlog Issues to address with priority for current development goals
Milestone

Comments

@jku
Copy link
Member

jku commented Oct 29, 2021

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

@jku jku self-assigned this Oct 29, 2021
@jku jku added this to the Sprint 11 milestone Oct 29, 2021
@jku jku linked a pull request Nov 3, 2021 that will close this issue
3 tasks
@sechkova sechkova modified the milestones: Sprint 11, Sprint 12 Nov 10, 2021
@sechkova sechkova added the backlog Issues to address with priority for current development goals label Nov 10, 2021
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants