[netmod] Limitations of semver

Robert Wilton <rwilton@cisco.com> Mon, 12 November 2018 17:54 UTC

Return-Path: <rwilton@cisco.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E4F73130E8E for <netmod@ietfa.amsl.com>; Mon, 12 Nov 2018 09:54:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.971
X-Spam-Level:
X-Spam-Status: No, score=-14.971 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.47, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D742I_EVFX1J for <netmod@ietfa.amsl.com>; Mon, 12 Nov 2018 09:54:48 -0800 (PST)
Received: from aer-iport-4.cisco.com (aer-iport-4.cisco.com [173.38.203.54]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 50A24130EBE for <netmod@ietf.org>; Mon, 12 Nov 2018 09:54:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3663; q=dns/txt; s=iport; t=1542045288; x=1543254888; h=to:from:subject:message-id:date:mime-version: content-transfer-encoding; bh=WmT1baTXGomOONsPkMOQWnI05uSN7FDPkBlQOqbAJGI=; b=g+o+LxBHKZw4BtJ4MCsmtXZrJoQP7HLEutVr9t4RuQrHlMq+fTFPWwzJ GwzjDigr2WcEjQ8G8I83hxjTK9PoqLwUJ5Kk51PbUOiuIwTIyj/EuLyVb 8/udZmOnBumeS/8yyMtih096/zpots16IUBNO+d8P++ks5K6fAcgBdTMI U=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0DfAgALvelb/xbLJq1jHAEBAQQBAQcEAQGBZYFWgRRPIRKEH4h3jQOZVA0jgVSGRjgWAQMBAQIBAQJtHAELhWQPAQV2AiYCXw0IAQGDHQGCAQ+pGIEvhT6EZgWBC4sMgUA/gTgMgjIBg0cCgUuDGoJXAokwDgOWDgmBYoUUiiEGGIFYh36HGolag0yDeoZYgVohgVUzGggbFYMogiYXg0qKUj8DjkQBAQ
X-IronPort-AV: E=Sophos;i="5.54,496,1534809600"; d="scan'208";a="7940469"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Nov 2018 17:54:46 +0000
Received: from [10.63.23.62] (dhcp-ensft1-uk-vla370-10-63-23-62.cisco.com [10.63.23.62]) by aer-core-4.cisco.com (8.15.2/8.15.2) with ESMTP id wACHski2028063 for <netmod@ietf.org>; Mon, 12 Nov 2018 17:54:46 GMT
To: "netmod@ietf.org" <netmod@ietf.org>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <3bea2401-6888-7643-7a20-52ecaf908fa9@cisco.com>
Date: Mon, 12 Nov 2018 17:54:45 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Outbound-SMTP-Client: 10.63.23.62, dhcp-ensft1-uk-vla370-10-63-23-62.cisco.com
X-Outbound-Node: aer-core-4.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/RKck83s0Un5_oGPeQYgebM_tAQQ>
Subject: [netmod] Limitations of semver
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Nov 2018 17:54:57 -0000

Although, we may like to think otherwise, I do not believe that semver 
is a silver bullet that will solve all YANG versioning problems.

Yes, it is popular and used, perhaps quite successfully, in lots of 
projects.  But there are many other large scale projects that have not 
adopted semver, e.g. 
https://gist.github.com/jashkenas/cbd2b088e20279ae2c8e states that none 
of the following properly use semver: Node doesn't follow SemVer, Rails 
doesn't do it, Python doesn't do it, Ruby doesn't do it, jQuery doesn't 
(really) do it, even npm doesn't follow SemVer.

The reason why I don't think that vanilla semver works for YANG is for 
two reasons:
(1) Semver is often used where API and implementation are versioned 
together (e.g. code libraries).  I.e. the "patch" field is semver is 
really about fixes to the implementation that do not change the API in 
anyway.  But a YANG module definition is really defining an API contract 
between client and server.
(2) Semver makes the assumption that all changes can be made to the head 
of the development branch, and that clients are able to relatively 
easily update to the latest version if required.  In fact, for an open 
source project it is a beneficial feature if you can force your clients 
to migrate to the latest API and code because there are less different 
versions to support.

But when applied to YANG modules there are two significant differences:
(1) The server implementations are not being versioned with the YANG 
API.  They may be multiple vendor products implementing the same YANG 
module, or there may be multiple products across multiple vendors 
implementing the same YANG module.  Asking a customer to move to the 
latest release to pick up a bug fix is not a realistic option, since the 
vendor/device may not even implement the latest version of the YANG 
module.  Also moving to the latest version of one particular YANG module 
could have cascading dependencies on other YANG modules.

(2) I would expect YANG modules, and the requirements to support them, 
to be much more long lived than open source projects that are using 
semver.  Where vendors are being paid to support software releases that 
have shipped with particular modules, customer have an expectation that 
they can get point fixes to those releases without being forced to 
update to major versions.

Hence, the proposal for modified semver.  Its aim is to be semver plus 
the minimal added changes to allow it to primarily support bug fixes 
(including nbc ones) to older releases.

The alternative, of using vanilla semver, looks similar to what we have 
today:
- vendors will increment the major version number for every release so 
that they they can increment the minor version number for bug fixes.
- or vendors will use deviations as a mechanism to get round where the 
API is wrong,
- or most likely, vendors will just fix the bug and increment the 
"patch" version number anyway breaking the semver rules, just as they 
ignore the YANG module updated rules today.

Perhaps this will all lead to the schema diff tool that I also like, if 
clients reach the point where they cannot trust the semver version 
numbers because it cannot actually encode the changes that are happening 
to the module.

As a vendor, I know that we have bug fixes going into older modules, Rob 
S indicated that OpenConfig does as well.  So, I think that the key 
question is whether we want the versioning scheme to be able to sensibly 
label bug fixes.  If we do, then I don't think that vanilla semver will 
meet the requirement.

Thanks,
Rob