Skip to content

export API to set RefTime of Updater#641

Merged
kommendorkapten merged 5 commits intotheupdateframework:masterfrom
AdamKorcz:reftime
Jun 18, 2024
Merged

export API to set RefTime of Updater#641
kommendorkapten merged 5 commits intotheupdateframework:masterfrom
AdamKorcz:reftime

Conversation

@AdamKorcz
Copy link
Copy Markdown
Contributor

This PR exports an API to set the RefTime of the trusted metadata of an Updater. This is useful for testing time-related cases in the client outside of go-tufs own repository.

@AdamKorcz AdamKorcz requested a review from a team as a code owner June 18, 2024 12:24
AdamKorcz and others added 2 commits June 18, 2024 13:33
Co-authored-by: Fredrik Skogman <[email protected]>
Signed-off-by: AdamKorcz <[email protected]>
Signed-off-by: Adam Korczynski <[email protected]>
@kommendorkapten
Copy link
Copy Markdown
Member

Thanks for the contribution @AdamKorcz, would you mind also adding a comment describing this, why it may be useful and any consequences of using this in a real life application?

Signed-off-by: Adam Korczynski <[email protected]>
@AdamKorcz
Copy link
Copy Markdown
Contributor Author

Thanks for the contribution @AdamKorcz, would you mind also adding a comment describing this, why it may be useful and any consequences of using this in a real life application?

faf9792 - LMK if it needs more context. I have kept it short to align the description with other methods in the file.

Co-authored-by: Fredrik Skogman <[email protected]>
Signed-off-by: AdamKorcz <[email protected]>
Copy link
Copy Markdown
Member

@kommendorkapten kommendorkapten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@kommendorkapten
Copy link
Copy Markdown
Member

@rdimitrov @trishankatdatadog any thoughts?

Copy link
Copy Markdown
Contributor

@rdimitrov rdimitrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rdimitrov @trishankatdatadog any thoughts?

I think it makes sense 👍 I don't think it's worth it that much but I was going to suggest that we can make the RefTime field private and add set/get methods so setting it is even more explicit.

Thanks for these changes, @AdamKorcz 🙌

@kommendorkapten
Copy link
Copy Markdown
Member

I think it's fine w/out get/set? The other fields are lacking this, and I think it's clear with the current design?

@kommendorkapten kommendorkapten merged commit f1d8916 into theupdateframework:master Jun 18, 2024
AdamKorcz added a commit to AdamKorcz/tuf-conformance that referenced this pull request Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants