-
Notifications
You must be signed in to change notification settings - Fork 106
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
cleanup: Initialize new root and targets at version 1 #272
Comments
Hi, it seems that the spec versions are already initialized to 1 in |
Hey! It's not spec version, but the version of the metadata file. |
See context here: https://github.com/theupdateframework/go-tuf/pull/175/files#r850775514 Those lines you've pointed out do set the root/targets to 1! This issue is meant to track moving that over to For instance, look at Lines 120 to 129 in 4f55897
It doesn't set The fix for this issue is easy: just set |
Oh, gotcha. The review wasn't loading for me earlier. Thanks for the explanation! |
Could I get some more info as to where exactly does the Asking this as tests check to see if the version results to 1. With me adding |
@ethan-lowman-dd I'm attempting to solve this issue and I have set |
@abs007 The relevant code is in
the |
@ethan-lowman-dd So from what I could understand, in the functions where if !r.local.FileIsStaged("root.json") {
root.Version++
} is present, the Since, |
Hi, I'd like a final go-ahead to push a pr with the suggested changes. Thanks. |
Go ahead! |
It seems that the |
Is this line supposed to exist? |
Closing since the code base changed and this is already fixed in the new implementation. Thanks for raising this 👍 |
Currently, the API for
NewRoot()
andNewTargets()
initialized version at 0, whereas they should generally be started at 1.Clean this up, and existing tests.
https://github.com/theupdateframework/go-tuf/pull/175/files#r850775514
The text was updated successfully, but these errors were encountered: