theupdateframework / go-tuf

Go implementation of The Update Framework (TUF)
https://theupdateframework.com
Apache License 2.0
625 stars 105 forks source link

Enable Refresh() to be called more than once #593

Open rdimitrov opened 8 months ago

rdimitrov commented 8 months ago

Moved from https://github.com/rdimitrov/go-tuf-metadata/issues/86

Describe the bug

Currently a Refresh() can be done only once during the lifetime of an Updater.

This is not optimal for long-living processes so it would be better if we enable calling Refresh() more than once.

References:

Expected behavior

Upon calling Refresh() make sure everything is up-to-date and if that's true:

If something else occurred which failed us to refresh the metadata, still return the appropriate error value.

Additional context

No response