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

Clarify that CONSISTENT_SNAPSHOT is optional #162

Conversation

MVrachev
Copy link
Contributor

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 mvrachev@vmware.com

Copy link
Member

@jku jku left a 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 Show resolved Hide resolved
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
Copy link
Member

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?

Copy link
Contributor Author

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 <mvrachev@vmware.com>
@MVrachev MVrachev force-pushed the consistent-snapshot-optional branch from 7c0e7e9 to c9c3437 Compare May 19, 2021 14:37
Copy link
Member

@joshuagl joshuagl 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 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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
An optional boolean indicating whether the repository supports
An OPTIONAL boolean indicating whether the repository supports

Comment on lines +692 to +693
consistent snapshots. This field is optional for backward compatibility with
old metadata that may exist without it. New implementations SHOULD include
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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

Comment on lines +694 to +695
it. Section 7 goes into more detail on the consequences of enabling
this setting on a repository.
Copy link
Member

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

Suggested change
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.

@MVrachev
Copy link
Contributor Author

Superseded by #165.

@MVrachev MVrachev closed this May 31, 2021
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.

4 participants