-
Notifications
You must be signed in to change notification settings - Fork 55
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
Clarify that CONSISTENT_SNAPSHOT is optional #162
Clarify that CONSISTENT_SNAPSHOT is optional #162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other descriptions of optional fields use the word "OPTIONAL" in capitals, maybe you want to do that too. Also, it seems the metadata examples use ( ) to signify optional parts so maybe we should have ("consistent_snapshot": <a>CONSISTENT_SNAPSHOT</a>,)
in there as well.
There's an extra d in "include"
tuf-spec.md
Outdated
of enabling this setting on a repository. | ||
An optional boolean indicating whether the repository supports | ||
consistent snapshots. This field is optional for backward compatibility with | ||
old metadata that may exist without it. New implementations SHOULD included |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we discuss what we should do if it doesn't exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec leaves this open. From chapter 7.1:
Finally, the root metadata should write the Boolean "consistent_snapshot"
attribute at the root level of its keys of attributes.
If consistent snapshots are not written by the repository,
then the attribute may either be left unspecified or be set to the False value.
Otherwise, it must be set to the True value.
From chapter 7 in the spec (version 1.0.17): "Finally, the root metadata should write the Boolean "consistent_snapshot" attribute at the root level of its keys of attributes. If consistent snapshots are not written by the repository, then the attribute may either be left unspecified or be set to the False value. Otherwise, it must be set to the True value." The above implies that there could be repositories with root metadata without CONSISTENT_SNAPSHOT. Clarify that, but phrase it to make it clear this should be included in new implementations. Signed-off-by: Martin Vrachev <[email protected]>
7c0e7e9
to
c9c3437
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for suggesting this. A few minor comments. We'll also need to address the version number for this and your other submissions. Probably makes sense to come up with a planned merge order with the other maintainers – let me get back to you on that.
A boolean indicating whether the repository supports | ||
consistent snapshots. Section 7 goes into more detail on the consequences | ||
of enabling this setting on a repository. | ||
An optional boolean indicating whether the repository supports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An optional boolean indicating whether the repository supports | |
An OPTIONAL boolean indicating whether the repository supports |
consistent snapshots. This field is optional for backward compatibility with | ||
old metadata that may exist without it. New implementations SHOULD include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consistent snapshots. This field is optional for backward compatibility with | |
old metadata that may exist without it. New implementations SHOULD include | |
consistent snapshots. This field is OPTIONAL for backward compatibility with | |
old metadata. New implementations SHOULD include |
it. Section 7 goes into more detail on the consequences of enabling | ||
this setting on a repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's both ensure we are cross-linking and avoid referring to sections by their explicit numbering
it. Section 7 goes into more detail on the consequences of enabling | |
this setting on a repository. | |
it. [[consistent-snapshots]] goes into more detail on the consequences of enabling | |
this setting on a repository. |
Superseded by #165. |
From chapter 7 in the spec (version 1.0.17):
"Finally, the root metadata should write the Boolean
"consistent_snapshot" attribute at the root level of its keys of
attributes.
If consistent snapshots are not written by the repository,
then the attribute may either be left unspecified or be set to the
False value. Otherwise, it must be set to the True value."
The above implies that there could be repositories with root metadata
without CONSISTENT_SNAPSHOT.
Clarify that, but phrase it to make it clear this should be included
in new implementations.
Signed-off-by: Martin Vrachev [email protected]