Repository navigation
Description
We would like to make it possible to make changes to the TUF specification in a way that:
-
makes it easy to timestamp and archive versions of the TUF specification in semver style
-
enables there to be working drafts of new TUF versions. In particular, changes that are backwards incompatible (major), backwards compatible (minor), and typo fixes (patch) in parallel.
-
the manual effort to keep everything consistent is minimized.
To achieve these goals, I propose that there are three different "living" documents for the TUF spec (major-draft, minor-draft, and latest) that are edited in a very specific way. To provide a conceptual model that is easy to understand, the documents form a hierarchy, major (backwards-incompatible) -> minor (backwards compatible) -> patch (typo fixes). To minimize manual effort, changes in the document are only made to the drafts that need to be changed. To achieve this, all changes to lower documents propagate to higher documents. For example, if a typo is fixed in a patch, both the minor and major draft versions are updated to fix the typo. If a backwards incompatible change is made to the specification, only the major document changes.
Using such a hierarchy, it requires little effort to apply the correct semver number to a new release of TUF. Simply take the prior version and increment the version number that applies to the appropriate patch, while zeroing out all lower version numbers. For example, when at version 2.4.3 of the specification and accepting a minor draft, the new version number is 2.5.0. In all cases, the newly approved draft becomes the latest. If the major draft is accepted, then the previous major draft also becomes the new minor-draft and latest.
However, this does not handle the question of when to release a new version of the specification. A new version of the specification is released in two scenarios. First, whenever a patch change is accepted, the specification number is released. Second, when there is consensus in the community that a specific minor version or major version is ready, this is accepted and finalized.
Activity
lukpueh commentedon Dec 12, 2019
I like the concept, but I see some operational difficulties if we indeed have multiple documents:
If we choose a concept like @JustinCappos suggests, I'm in favor of using different git branches that all work on the same document instead of different documents. This only solves (3), but maybe we can use something like gitflow to mitigate (1) and (2).
JustinCappos commentedon Dec 12, 2019
Should we PoC a version of this with gitflow? I'm all for making this as simple as possible.
I'm not sure how this would work in the hopefully rare case where there is a conflict in changes.
lukpueh commentedon Dec 12, 2019
A
gitflow-like approach could be to have 4 permanent branches (master,major,minorandpatch). Contributors work on feature branches and submit PRs againstmajor,minororpatchdepending on the type of their PR.Whenever we merge from
major,minororpatchintomasterwe bump the corresponding version number, so thatmasteralways points to the latest stable version of the spec.This still requires manual syncing:
major,minororpatch, the change needs to be adopted in higher number branches, andmajor,minororpatchgets merged intomaster, lower number branches need to be reseted.The manual syncing and the fact that either the contributor or at least the maintainer need to coordinate if a change from a feature branch should go into
major,minororpatchworry me a little bit.lukpueh commentedon Dec 12, 2019
A stripped down alternative that is less flexible in regards to parallel work on
major,minor,patchwould be to only havemasteranddraft. Like abovemasteralways points to the latest stable release and each merge into master must bump the version number.Contributors either PR their features against
draft(for major- and minor-release work), or directly against master (for patch-release work).This makes syncing a lot easier, because we only need to sync
masterback todraft, in case of a patch release.The downside is reduced flexibility in regards to parallel work on
majorandminor, but I don't know if that actually is a problem.lukpueh commentedon Jan 6, 2020
I'd love to see others weigh in (cc @mnm678, @trishankatdatadog, @joshuagl).
trishankatdatadog commentedon Jan 6, 2020
What do people think about committing things directly to branches corresponding to the version numbers, like
1.1.0and2.0.0and so on? I don't expect a lot of parallel updates to the spec, and as long as we review and merge PRs quickly enough, this should work.lukpueh commentedon Jan 7, 2020
Thanks for chiming in, @trishankatdatadog. What would be the advantage of your proposal over either of mine above?
jhdalek55 commentedon Jan 7, 2020
Mine is probably the minority view on these issues, but I am thinking about the less-git-savvy person (someone not unlike myself) who wants to contribute a correction or addition. Will it be clear which version to submit a change to? And will there be an explictly clear criteria for what corrections fit within these specifications, particularly between the patch and the minor draft? I'm not sure its a good idea to leave such a decision to the contributor.
lukpueh commentedon Jan 7, 2020
I agree with you 100%, @jhdalek55, and I think the arguments you make apply to the git-savvy person just as well (see my similar concern (2) above in #73 (comment), which was in reply to a not git-based strategy).
I think my proposition from #73 (comment), i.e.
masteranddraftbranches, is the way to go. Its main downside is the reduced flexibility in parallel work on major and minor releases, which, as @trishankatdatadog claims, should not be a problem. Besides, parallel work would still be possible by coordinating the feature branch PRs.trishankatdatadog commentedon Jan 7, 2020
@lukpueh Yes, on second thought, it seems to me that your proposal is operationally the simplest.
joshuagl commentedon Jan 8, 2020
FWIW I agree that striving for operational simplicity is the best approach. The process can evolve as gaps become apparent in use, it's usually harder to rein in an unwieldy process than it is to evolve a simple one.