Subject: Re: [netmod] All IETF YANG modules MUST include revision-label statements

From: tom petch <[email-masked]>
Date: Wed, 1 Apr 2020 11:05:10 +0000

From: netmod <[email-masked]> on behalf of Andy Bierman <[email-masked]>
Sent: 31 March 2020 17:19

<tp>
Agreeing with Andy that BC/NBC is a bad idea but from a different standpoint.  In general the concept sounds great but turning it into an unambiguous, usable by engineers test is mostly impossible as a number of discussions have shown.  Does it mean I can write a client that copes with old and new  server? or write a server that copes with old and new client? That has been discussed with no resolution.
What if the intended meaning of the WG was clear but someone later finds a loophole and interprets it differently and the module is revised to be unambiguous?  BC for most but NBC for those who found a different meaning.
Much depends on the original specification.  It may say, in a routing protocol,
Unrecognised TLV must be discarded
Unrecognised TLV must be treated as a fatal error
Unrecognised TLV must be forwarded unaltered
but many specifications are not that forward looking.  It is rare for a YANG module to capture that forward thinking.  
I think that BC is a very seductive concept that leads onto the rocks.

Tom Petch

On Tue, Mar 31, 2020 at 8:37 AM Kent Watsen <[email-masked]<mailto:[email-masked]>> wrote:
[replying to Reshad as well]

Hi Rob,

My impression is that Semver 2.0.0 works fine if you can always force clients to move to the latest version of the API whenever any bugfixes are made to the API (whether they are BC or NBC).  This is a natural fit for open source projects, but not so great for long life paid support contracts.

Agreed.

The goal of YANG semver is not to facilitate release branching.  It is to allow vendors to fix YANG modules without forcing clients to update to the latest version of that YANG module (which may contain other unrelated NBC changes and have lots of dependencies on other modules).

This is what Reshad was pointing to as well.  I’m very familiar with the issue, from my Juniper days, where there were all sorts of patch and (gasp) customer special releases, either of which could introduce any number of NBCs.

The background, of course, is that [very important] customers have working/validated infrastructure running a specific release and simply cannot tolerate any change beyond the very specific one they need *NOW*

I get it, truly,  but I feel that the ‘m’ / ‘M’ suffixes are both inconsistent with general understanding and insufficiently to express what is needed.

+1

I also find the granularity of NBC info to be mostly worthless at the module level.
There is no difference between a 1 leaf bugfix and a complete rewrite of the module.
Let's say 1 leaf "type string" needs to be changed to add "length 1..max".
This reduces the value set for 1 leaf by 1 value.

This flags the entire module as NBC and you would bump the major revision number.
The entire premise that one can decide if it is safe to upgrade based on the version string is flawed.

A possible fix might be to allow for <major>.<minor>.<patch>[-<anystring>], thereby enabling vendors to encode any format off a base release…and rely on inspection of the “revision” history indicate if/when NBC changes occurred.

But then I question (again) the need for the simplified format at all, as opposed to just using revision dates.  For instance, if <anysting> represents a long history of NBCs, that they were based on some source M.m.p starts to lose relevance.

Is the expectation that the vendor's module versions will use <major>.<minor>.<patch> values mimicking their release numbers?  For instance, would FooBar OS version 20.1.2 implement YANG module "[email-masked]”?    I can see product mangers pushing for this, but then are companies (like Juniper) that use alternate release name-formatting strategies disadvantaged?  How is that fair?   To thwart this, would the WG be willing to assert that the history MUST start at 0.0.0 and MUST only monotonically increment values?

Note that OpenConfig also hit this problem, but they proposed a different solution.  I..e. ship the base module with another module that contains deviations to fix any bugs in the base module.  Alas this completely decouples the real module history from any revision-date/version number contained in the module, since to really understand the version of the module you also need to know the set of associated patch modules containing any deviations to the base module.

I’d need to see an illustration of this to be sure I understand, but my first impression is that it is yet another attempt to fit a square into a circle.

I don't have a solution proposal, but it would be great if a vendor could issue a patch
to a standard module which says "this is the standard module plus these known Errata ".
OK if this is in the form of deviations

In the end, I see no substitute to relying on “revision” history which 1) perfectly tracks branching history and can flag if/when NBC changes occurred.

Agreed

Kent // contributor

Andy

---

From: "Rob Wilton (rwilton)" <[email-masked]>
Date: Wed, 1 Apr 2020 15:05:42 +0000

[As a contributor]

Hi Kent,

Please see [RW] inline

From: Kent Watsen <[email-masked]>
Sent: 31 March 2020 16:37
To: Rob Wilton (rwilton) <[email-masked]>
Cc: Andy Bierman <[email-masked]>; Martin Björklund <[email-masked]>; [email-masked]
Subject: Re: [netmod] All IETF YANG modules MUST include revision-label statements

Hi Rob,

Agreed.

I get it, truly,  but I feel that the ‘m’ / ‘M’ suffixes are both inconsistent with general understanding and insufficiently to express what is needed.
[RW]
The aim is for the ‘m’/’M’ suffix to provide a mechanism to describe where the module has deviated from the rules in a limited way.

The hope/intention is that these should be avoided whenever possible, i.e. they are designed to be limited in what they can express to encourage regular semver and a non-branched revision history.

As YANG APIs become more mature, and as automation becomes more important, then I would expect that these APIs become more hardened, and there should be less usage of the suffix.

A possible fix might be to allow for <major>.<minor>.<patch>[-<anystring>], thereby enabling vendors to encode any format off a base release…and rely on inspection of the “revision” history indicate if/when NBC changes occurred.
[RW]
But this would look like a valid semver 2.0.0 (rule 10), but presumably one that is not following the semver 2.0.0 rules.  I also don’t see how having each vendor design their own scheme really helps interop.

I agree that one option is to tell everyone to look at the revision dates and revision history.  But I think for most people a semantic version number is much easier to mentally process than a date.

Is the expectation that the vendor's module versions will use <major>.<minor>.<patch> values mimicking their release numbers?  For instance, would FooBar OS version 20.1.2 implement YANG module "[email-masked]<mailto:[email-masked]>”?
[RW]
No, the plan would be to given the modules semantic version numbers that are not tied to release, i.e. the API is versioned independently.

   I can see product mangers pushing for this, but then are companies (like Juniper) that use alternate release name-formatting strategies disadvantaged?  How is that fair?   To thwart this, would the WG be willing to assert that the history MUST start at 0.0.0 and MUST only monotonically increment values?
[RW]
The solution allows allows any revision label to be used.  E.g. if you wanted to label it after release then you could call it “r20.1.2”, the ‘r’ prefix stops it being parsed as semantic version number.

So the choices that the drafts currently present are:

1)      Modules can just use revision dates if they wish.

2)      Modules can use YANG Semver, noting that all Semver 2.0.0 versions are valid YANG Semver versions with the same semantic meaning.

3)      Modules can use whatever revision label/scheme that they like, as long as it doesn’t conform to the regex for a YANG semantic version number.  This rule is only currently there to avoid requiring a separate statement to define the versioning scheme.  The YANG Semver draft could also define a statement to indicate that the YANG Semver scheme is being used, and then that restriction would go away.

Note that OpenConfig also hit this problem, but they proposed a different solution.  I.e. ship the base module with another module that contains deviations to fix any bugs in the base module.  Alas this completely decouples the real module history from any revision-date/version number contained in the module, since to really understand the version of the module you also need to know the set of associated patch modules containing any deviations to the base module.

I’d need to see an illustration of this to be sure I understand, but my first impression is that it is yet another attempt to fit a square into a circle.
[RW]
Yes, it is an attempt to pretend that Semver 2.0.0 is sufficient except when it isn’t.

At the end of day, we could just standardize using regular Semver 2.0.0.  But when push comes to shove, and that customer is demanding a fix, I doubt many vendors will say “no, I’m sorry, but our versioning scheme prevents us from providing you a fix”, instead my supposition is that most vendors will provide the fix, and just break the rules, probably labelling it a patch release (e.g. going from 1.0.0 to 1.0.1 if 1.1.0 had already been used).  In this scenario it is better to have a scheme that vendors don’t actually follow, or is it better to have a slightly ugly scheme that does at least truly express that a non patch change has occurred (i.e. going 1.0.1m)?

[RW]
I think that both are useful/required.

If the client is doing a large upgrade between releases then I think that you need to rely on tooling that compares and reports the exact differences between the schema.

But I still think that semantic version numbers give helpful easier to understand information for humans.  E.g. I personally find it easier to remember that the first version of ietf-types.yang is 1.0.0 (RFC 6021), the second version (RFC 6991) is 1.1.0, the third version will be 1.2.0 (rfc6991bis), rather than trying to remember the revision dates AND knowing whether or not any NBC changes have been made between the definitions.  I don’t argue that YANG semver is perfect, but I do still believe that it is better than all of the alternatives.

As a corollary to this point, I note that a lot more software artifacts tend to use explicit version labels rather than revision dates.  I presume that this is the case because most people find them easier to deal with.

Regards,
Rob

Kent // contributor

---

From: "Rob Wilton (rwilton)" <[email-masked]>
Date: Wed, 1 Apr 2020 17:41:15 +0000

[As an individual contributor]

Hi Andy,

Please see [RW] inline

From: Andy Bierman <[email-masked]>
Sent: 31 March 2020 17:20
To: Kent Watsen <[email-masked]>
Cc: Rob Wilton (rwilton) <[email-masked]>; Martin Björklund <[email-masked]>; [email-masked]
Subject: Re: [netmod] All IETF YANG modules MUST include revision-label statements

Hi Rob,

Agreed.

+1

This flags the entire module as NBC and you would bump the major revision number.
The entire premise that one can decide if it is safe to upgrade based on the version string is flawed.
[RW]
Yes, for NBC changes, I think that this is probably correct.  I.e. if a module user sees a major version change then they have to understand what the changes are and whether they will be impacted by those changes.  Note, this is what the YANG schema comparison draft aims to define.

But the goal here is not to encourage NBC changes, but allow them to be expressed when they do occur.

So, if the module author is following the rules, and a client sees a minor version change (e.g. 1.0.0 to 1.1.0) then their existing client software should be compatible with the new server release.  The desire is that this is the mainline case that everyone should be striving for (and of course RFC 7950 currently says that this is the only case that is allowed).

Is the expectation that the vendor's module versions will use <major>.<minor>.<patch> values mimicking their release numbers?  For instance, would FooBar OS version 20.1.2 implement YANG module "[email-masked]<mailto:[email-masked]>”?    I can see product mangers pushing for this, but then are companies (like Juniper) that use alternate release name-formatting strategies disadvantaged?  How is that fair?   To thwart this, would the WG be willing to assert that the history MUST start at 0.0.0 and MUST only monotonically increment values?

I don't have a solution proposal, but it would be great if a vendor could issue a patch
to a standard module which says "this is the standard module plus these known Errata ".
OK if this is in the form of deviations
[RW]
For an individual module I don’t have a great solution.

But if this is done at the schema level, then I think that YANG packages can cover this case well, the only additional work that might be helpful would be a convention to specify how to name the module containing the deviations.

Regards,
Rob

Agreed

Kent // contributor

Andy