Re: [netmod] yang versioning solution complexity and alternative approaches

Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de> Wed, 08 June 2022 15:38 UTC

Return-Path: <J.Schoenwaelder@jacobs-university.de>
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 9EAACC14CF0F for <netmod@ietfa.amsl.com>; Wed, 8 Jun 2022 08:38:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.911
X-Spam-Level:
X-Spam-Status: No, score=-1.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=jacobsuniversity.onmicrosoft.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fAJZWTtIzYUa for <netmod@ietfa.amsl.com>; Wed, 8 Jun 2022 08:38:10 -0700 (PDT)
Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20083.outbound.protection.outlook.com [40.107.2.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 86BEBC14F607 for <netmod@ietf.org>; Wed, 8 Jun 2022 08:38:09 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DWr6N4L4OGK9dl80Y3RTBSmXhMBdW6ChuNsCK6zuzlh4KCeau9lLnrSlO8jA2J5KWp4Sxw1k2p+OUfqGtA5mIr84Gtk7/t8u2j5RGQAyUh9LqjGeSyoNO1ZIAbzaJu/bJ8ddWQeOL5lsdfXlLbZF7qOmasGRCnsHa/orrxXbCCy+LCtpEhiYzR9Z9UGAzL+4uYlGwRlMqNk9z0KACK6bs9JXXKfI4as9HMDfvBMn+vGqe2No7iTFuRHmaDJ0ZdXFrwqLbA6xa0UuMsF6itI7q0cZvREtM09v0STkXHTXpJ/AxRzC7J54eRssnQcn4mvnAyOUQuTeeLA1RUyfeG2gUg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VnOaz4LUdfZ7ULn+EUdTQNOpC8ub60fgqC4KbNxYavc=; b=PXNsekzxX3ZIASu2srcTzSFkViCl22F48B7ZSPeOHrTnGOveYjbozxGkC1b1lwQAihdlxrQJxus0Q5i8D+rthkbwR/NutTl84TwzneeYzvBm6yXuvX5mArzw+GCe3iC2fgyoJp5BufqYBhvmCbxNM+u6xa1L3ecIoxHIVWC+q821bzkHQ0qq2t6cYaZyHCE/WhlEuDkX3/ysI7uKEAGLSRpzwSTxCOS4nC/H2ANA4Qc76WxNzil+49ur/lmk+OQ9UI0F1BjvMt4R8KvqgjI5EHSAC2SXud/bKDeN3BFQhlRvlTiGjCx3wAadux0yZLIox6aPMBfFDT7kn5GcYZa2wg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jacobs-university.de; dmarc=pass action=none header.from=jacobs-university.de; dkim=pass header.d=jacobs-university.de; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jacobsuniversity.onmicrosoft.com; s=selector2-jacobsuniversity-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VnOaz4LUdfZ7ULn+EUdTQNOpC8ub60fgqC4KbNxYavc=; b=M1HevEPlvA3cVufvUrDcddhcBDOAkdNgs686nPbFDAnHITv/vz/8pr/T7XHoBx+Dp443sbS+rVYNwHtshX/wbcR1tMLjexIQDUlTgH1OvkRsLV+Y0GVxNKR8IeyRiBlZb+jeQs7sU+6LHltfXhWHt/L887gtg03qTwJ5m5RhDCg=
Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=jacobs-university.de;
Received: from GVXP190MB1991.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:3::6) by PA4P190MB1200.EURP190.PROD.OUTLOOK.COM (2603:10a6:102:be::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Wed, 8 Jun 2022 15:38:04 +0000
Received: from GVXP190MB1991.EURP190.PROD.OUTLOOK.COM ([fe80::64d3:b182:f717:5176]) by GVXP190MB1991.EURP190.PROD.OUTLOOK.COM ([fe80::64d3:b182:f717:5176%9]) with mapi id 15.20.5314.013; Wed, 8 Jun 2022 15:38:04 +0000
Date: Wed, 08 Jun 2022 17:38:02 +0200
From: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
To: "Rob Wilton (rwilton)" <rwilton@cisco.com>
Cc: "netmod@ietf.org" <netmod@ietf.org>
Message-ID: <20220608153802.63h7knp5ezmhfjya@anna>
Reply-To: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: "Rob Wilton (rwilton)" <rwilton@cisco.com>, "netmod@ietf.org" <netmod@ietf.org>
References: <20220309101609.d33knxlhyq62wejq@anna> <BY5PR11MB41967D79E62D8D08CBEF6128B5A59@BY5PR11MB4196.namprd11.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <BY5PR11MB41967D79E62D8D08CBEF6128B5A59@BY5PR11MB4196.namprd11.prod.outlook.com>
X-ClientProxiedBy: AM0PR03CA0049.eurprd03.prod.outlook.com (2603:10a6:208::26) To GVXP190MB1991.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:3::6)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 7911d3b4-f66d-4c82-174b-08da4964e088
X-MS-TrafficTypeDiagnostic: PA4P190MB1200:EE_
X-Microsoft-Antispam-PRVS: <PA4P190MB1200FD82EAFEAB1F9B89FC0ADEA49@PA4P190MB1200.EURP190.PROD.OUTLOOK.COM>
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: l7lXPZEbUPA0591uWTtfAAFU/acYdEVzSm92tS4umvIE9e+lQDWInglVwplBjhKolGBzq903rLLuWWRcQsn7VNeAwQ65FPZqlymR4kmXclHF+9totZPGwaSvjwOQCel/uJsUEyu+iNxCntrV6r5G3OMB7DgLj/ISz/ldbG9WzcQe//Fy6wmJwE7RUC8uU5tiSZ0UMMdzb8u5BmypU8/p+tmNtTZLO50GIliVRPw+TdDOzuqQ8Qxxlzeo+2XcCPQ5CDKyOYrylYNOwcSxMGRfElWuOCvT7GDgUvuzO7XRXtrIKCBsMNY15kx/Ijwplbanp+tJjbi6hCkHh3Jsa9r23OlRP1PENyXQtQoOoMFbos6A204Cf7DkUULgGW5zY5QTpqyEfBcUzcux9vw0WU6rRs3UyDXrOgGryL46MKXDl0+ocVYm1GBiXOBb7OVEANLnC5w8yQt3tksq5yRtKvVhMfhy8WUUyRiE9ou5/+91eShuqICw6FOSbcfV4NPOUcSMZrRsK7IsSj9eQA3mk1TuhfidmbUOPeVJiktTCWXXJzH+9cF+QJ13UtPcXE92BeTHNOUP+d9yyhI2ZSHQocACCQRcXuH4JtdHh26TnQwNzY72mokZIzQQJyMGyyMNNbW5OCt7a5VxcOuUl1Eg9gJXLiBz2NhsAzqvJzSAj9VDOgRADXuJEO6G6tOxnS5igtFSfpeAQlvB1RwlphcSVCbVrmE/zLgJB98FV9yMCzl3ZeZIvzUp6NpWAXTq1ktQlvTrvmq38/ZWb/iAq4jjAA9uaXz7KXt4muByy4ZJ+6/ew2SsM2AGuCnMpeF8LCq6Cn8t
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GVXP190MB1991.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230001)(7916004)(366004)(26005)(66574015)(85202003)(2906002)(38100700002)(30864003)(6916009)(6506007)(52116002)(38350700002)(786003)(9686003)(3450700001)(316002)(6512007)(83380400001)(86362001)(8936002)(53546011)(40140700001)(85182001)(66476007)(8676002)(66946007)(4326008)(1076003)(33716001)(966005)(6486002)(186003)(508600001)(66556008)(5660300002); DIR:OUT; SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: A5WoY2NkZOuBI0+0UnticpwrcRMz7uGj4ZJMSkZF6vNLmC6k+PU//MQMLQWQDe97402EJo7gz4b1jYW3f97lxw8mE79iPa6OO8CapdoYXEJj2P1zrUvPUu465hl9/SHvC61JcMw5w4HY8e5wYVAQAAllO0AuCRx/NugrcnZQrR6UhIZ9TfBVtM6Zbp+snqlu+nKG/fm5z6d+usHhBor9p3xEEcX08BKOrkH0TECbFTEKZYFFKqjuPtXYsszU6ZbnCi5pfsZlb3S1kH6GmoOSsme4xPpA31DSSmIp8urWtPi+tb0d4VB9GcwHoxQfMHG9qFbt4zpeUUujYDQYxfu5kNgQOTFaUUv8edKnQkFQdGBFULW/3AIRe3aRzTSiEBmPwNB1boaV8CNEBCEG7BzYAe0s+wCNam69alUgNVpB6Z+x3j1KAzWX6VoOkE1SvpZusF9qDfE/fKwlg5X19PJQ+P+3nc3BIIqLGED6WdFPNco5gi7sNkqpWmjb10+XiDt7rfjPuBsHpT0gLPMTJb0kKPhncGjuFzxCQnr1A168aQwGZWsCGPSsZ3PS2ClZi4i2SjQMARlCr+Vyv0qJX4oeqE2dTaz/YzEOCMJjPIXVKb9UaDRezyiNHaC8qWqXZwlOJhVrEv8bkJ6QzWzX88+4pYccoeLxWOkGrVrgjkhNb3jry2vKUNitvC/naeChn/iH1272QkHdx9jDFNpGcxPbnRr/pBVqQAwH+4JFHxhB04gZAe327BOoVbhqC+d21hk88mOZevR8+LO/tVOfxAp4iYqWLFFpirysYhahHj2iNfjAXsnBwVxkfLJU2SpV8w43015CIIKrDaGeTkqqTkPX8DHGa7nN0nS/fFIWg7SEj/ydT7S+1KWxGrXj3COnvwFM0dqQCplZnJGV7STxxhYg23Elm9vOdR1dBp0DpLu17YZ6hmqTRa1dL6/JwaiVKQ6foFVf5Du8f0/RHFFQuJN974FESuJHcPPGCvm2c5Hj6MbtV12KlmWRSlZFalUjnmQtI49e5arES67yUbGOg0SB/mRiMbw+7Eeg6r4bcU/rOW7MSpJ6/nWB1pRRZjYpgG2M7yzT8x9A1Nfu2mNf/0zBoVUBIULKNWnLpk4fQeM1d5qPZkO1XoVvbfNv5QjzjtSP4gCrd/VUS80xjXNlr8m4dKiD3LVu7QDV/m5emuMhPnW9P7OTiayO6D8pqsCWodJhO5IkSktXC6T/vFPEyh/UOcIumM+HTB/D+gVs1PwQWvP+Swud4tkYDoz3LJNYbny58z9Kzfg/81kQr7fN8gNFL23pUptczZN1p3WWc8hAjL0NPN080ZuSLv/XRionq7jySaoBbY83G4ejwTQ8BgHSzc+gbUZRYdcIOGFC1bKGis/LClrMOtmwNz+KeX0rxR4nNON0WE/IhDXSz3aNGuf3XAPhU3kdFQFBrjOBEdjE6ihOioNXhkc/fI9QST/Y9UECKuSAyWIGD3iQ05LpCsn5VCQJGN47cx0EakKe2jMIc2QhdW5+rpxT5eRdpV/JBIZV9JeGD2Z18hNvlPv58kaw5/faFZ/J34HqDh6hgUOvfPX6eRqy6OhlvaSOTTOe7SPTHF5seOAni2rFMFx9L3n6GKfHqp9F5Awl4KJS9bXQZgRn4BmU+/owVHs6PBg8nmWCWJEq2siMDXpz0+Bt3vJHqnUf7UDd95IbjTKNmKT2dqfzSiOnmIZo3A2AeEVwX9XOYj+bAU4ERIT5U47+P9yKfLxrZKflKM34L8dYQ7nUAUFWvvNBcX8cdPXwKiYkn0sd
X-OriginatorOrg: jacobs-university.de
X-MS-Exchange-CrossTenant-Network-Message-Id: 7911d3b4-f66d-4c82-174b-08da4964e088
X-MS-Exchange-CrossTenant-AuthSource: GVXP190MB1991.EURP190.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2022 15:38:04.2657 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: f78e973e-5c0b-4ab8-bbd7-9887c95a8ebd
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 0K+vH8kzjmst85qojMhyJKmWmW7lOwrc3adfzS+6VIR4WXzY3RityaqAGuGHpj2cNixqVfmhLdDgbufM7B/vYDj0g4pmFa9QV03SN13nqg4=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4P190MB1200
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/26jq1w_v2aaduLdN8MnzsWW4C2Q>
Subject: Re: [netmod] yang versioning solution complexity and alternative approaches
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.39
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: Wed, 08 Jun 2022 15:38:14 -0000

Rob,

discussing details is likely distracting from the main difference in
our viewpoints so I will only give a top posting response.

NBC changes happen to "data definitions" and I believe this is where
they deserve to be documented. Once you have NBC changes properly
marked and documented at this granularity, you can generate any
desirable information easily (perhaps even module version numbers).
But most importantly, you can algorithmically decide whether a module
B importing from module A is affected by any NBC changes in A. Module
version numbers are too course grained to do that, hence they force
consumers of YANG modules (the readers) to reverse engineer the NBC
changes to decide if and how they might be affected.

A NETMOD design principle has been that readers come first, writers
second, and tool makers last. The versioning solution presented by the
design team seems to put writers first, leaving readers with the
exercise to reverse engineer where NBC changes took place. I consider
this backwards.

/js

PS: I believe it is generally not decidable whether two YANG module
    revisions are BC or NBC. This does not mean that smart diffing
    tools are not useful but we should not leave the impression that
    they are a solution for readers; they are a useful tool for writers.

On Tue, Jun 07, 2022 at 12:54:14PM +0000, Rob Wilton (rwilton) wrote:
> Hi Jürgen,
> 
> Thank you for your feedback and apologies for the very delayed reply.  The versions authors have been discussing some of the points that you raised in a lot of detail and hence I was waiting for this discussion to converge before replying to you.
> 
> 
> > -----Original Message-----
> > From: netmod <netmod-bounces@ietf.org> On Behalf Of Jürgen
> > Schönwälder
> > Sent: 09 March 2022 10:16
> > To: netmod@ietf.org
> > Subject: [netmod] yang versioning solution complexity and alternative
> > approaches
> > 
> > Hi,
> > 
> > the YANG versioning solution appears to be complex.
> 
> I think some aspects of the solution are complex, but I'm not sure whether they are really avoidable, or whether the complexity comes from wanting to solve a complex problem.
> 
> One aspect of additional complexity is because of a WG desire stated during adoption and previous discussions to support different version schemes (E.g., YANG Semver, Open Config's use of vanilla Semver, vendor versioning schemes).
> 
> I think that keeping this flexible is a reasonable choice. I also think that having some version indicator at the module level (or in the case of YANG packages, YANG schema level) is beneficial.  For example, if my client is designed to work with module x@2.0.0, then if the server has actually implemented x@2.5.2 then it is compatible, assuming that module x has been updated according to the rules.   x@3.0.0 might also be compatible depending on what has changed - but as a client I had better check to see what the changes are to determine what the incompatibility is (using tooling).  I.e., I still think that version numbers provide more useful guidance (and partial relationship) than say revision dates, particularly given that YANG modules are not always strictly evolved in chronological order.
> 
> It was also clear to me when considering versioning schemes there is no perfect one-size fits all solution.  The YANG Semver approach is meant to be a pragmatic compromise.  I.e., encourage linear development, encourage backwards-compatible changes, but allow for non-backwards-compatible changes to occur and allow bugfixes to older revisions if required.
> 
> Finally, the wider versioning solution is also aiming to solve multiple different problems (e.g., package/schema level versioning, differentiation between backwards-compatible and non-backwards-compatible changes, supporting some level of branching for bugfixes, improving import dependencies, etc) which I think naturally somewhat increases its complexity.  We have somewhat tried to put these into separate documents so that each document can focus on specific aspects.
> 
> 
> > 
> > - We introduce version numbers that smell a bit like SemVers but then
> >   are not really SemVer.
> 
> Yes, and no.  I'm not sure that there is really a canonical industry agreed definition of what Semver is, and hence we wanted quite a tight specification of what it means in the context of YANG, whilst still aiming to be mostly compatible with the Semver 2.0.0 definition.
> 
> We created YANG Semver for the sole reason that regular Semver or revision-dates are not sufficient to support one of the key requirements.  Specifically, the need to allow bug fixes to older shipped modules without the luxury of forcing both client and server to always migrate to the latest version of the module (e.g., as an Open Source software project might be able to do).
> 
> It is also worth noting that module authors have the choice of never branching older versions, and only ever making updates to the latest version, in which case YANG Semver is identical to Semver 2.0.0.
> 
> 
> > 
> > - We have no solution to do meaningful things with these version
> >   numbers, it does not even seem to be possible to decide whether
> >   X.Y.Z derives from x.y.z or not.
> 
> The derivation is based solely on the revision history in the YANG module file.  If the previous revision exists in the module's revision history, then the revision is derived from it.
> 
> The intention is that the version numbers represent a partial ordering.  E.g., moving from version X.a.b to X.c.d, where c > a, or c == a and d > b is a backwards compatible change.  This relationship breaks down when the _compatible and _non_compatible modifiers are used, but I regard these as a practical compromise to allow a limited form of branching.
> 
> Even with regular Semver it is not possible to know if version X.Y.Z derives from x.y.z.  Even with semver 2.0.0, it seems (the spec is somewhat ambiguous) that you are allowed to chronologically create 1.2.1 then 2.0.0, then 1.3.1.  And in this case 2.0.0 will not necessarily contain the content that was added in 1.3.1.
> 
> 
>  We still seem to believe that
> >   having compatibility constraints embedded in module imports are a
> >   workable solution even though we acknowledge future breaking
> >   changes.
> 
> This is a point of confusion, which probably means that we need to improve the text, since this isn't our goal for the "import by revision-or-derived".   Note, we did consider a more complete, and hence complex, solution, but this seemed to be the right pragmatic compromise of improving what we have today vs embedding too much information.
> 
> The only goal is to specify a minimum import dependency that the author knows is required.  E.g., if you are using a new type defined in RFC 6991bis then it is useful to indicate the minimum module revision that is likely to be compatible.  Later versions are likely to be okay, but that obviously depends on whether any non-backwards compatible changes happen and what the nature of those changes are.
> 
> YANG packages allow compatibility to be indicated for exact module versions outside the module.  We did consider whether YANG packages could be extended to cover ranges of versions, but that was deemed to increase complexity and best left to future work.  We had an issue tracking this, but after discussion closed the issue.
> 
> 
> > 
> > - We push for a reasonably complex algorithm to calculate deltas of
> >   YANG module revisions to let users of modules to determine the real
> >   impact of module updates on their work.
> 
> Please can you clarify.  Are you saying that the algorithm to determine whether a change is a non-backwards-compatible change is complex?  Or the encoding of it into a semantic version number is complex?
> 
> For the former, most of these rules were also defined in RFC 7950 but extended to fix some corner cases.  For the latter, this is basically the standard Semver which is widely understood but with a minor extension.
> 
> In both cases, I think that tooling can flag most of these warnings and calculate (or check) what the new semantic version number should be.  I'm not sure that this algorithm really ends up being that complex in practice.
> 
> 
> > 
> > I wonder why we not consider the opposite approach, namely to have
> > author making NBC changes to document them right where the changes
> > are. If authors would write something like
> > 
> >       leaf foo {
> > 	nbc-change "2022-03-01" {
> >           description "changed type from int32 to string";
> > 	};
> > 	// ...
> >       }
> 
> In the discussions with the other authors the consensus was that these sorts of annotations are useful in some places.  I.e., the original intention is that this would be covered by the 5th draft of the versioning set, i.e., https://www.ietf.org/archive/id/draft-ietf-netmod-yang-schema-comparison-01.txt, but on further discussion we now believe that it may be more appropriate to define this annotations are part of the module versioning draft instead (which we would be keen to hear wider WG thoughts on).
> 
> The consensus of the discussions from other authors was:
> 
> - Providing a module level indicator of the type of changes is required, even if we have per data-node annotations.
> - Consumers will ultimately need to rely on tooling to do module and package schema comparisons to determine what has changed and the potential impact of those changes to catch the case where the changes have not been correctly labelled by the authors.
> - Using annotations doesn't really work in the case that a definition has been removed from a module.  Even after a deprecation/obsoletion phase this could still break clients.
> - We were concerned that these annotations would end up cluttering the module definition with a lot of extra history, the desire is that the modules can evolve and each module version provides a snapshot of the API at that point in time.
> 
> We believe that the greatest value of the annotations is to use them when a change cannot be robustly detected by tooling alone, e.g., for changes to pattern, must, when, regex statements or descriptions.  There was also a question as to what the tooling should default to, if it cannot calculate what type of change is being made. 
> 
> 
> Hence, we discussed three proposals on how these tags could be used:
> 
> Proposal A:
> We provide both nbc-change and bc-change marker extensions but they are only expected to be used when a tool cannot reasonably automatically determine if the change is bc or nbc.
> Or, in more detail, I would expect the following steps:
> (i) A tool is used to compare a new revision of a module to the previous revision in its revision-history to calculate what type of changes the module contains and validate (or calculate) the module's Semver version label.
> (ii) bc-change and nbc-change markers would be used where the tool cannot automatically determine what the changes are for a given statement (e.g., pattern, must, when, regex, description statements).
> (iii) The module versioning (or tooling) draft would define change defaults for the case that the tool cannot be expected to robustly check.  I.e., the proposal would be to assume that pattern, must, when, regex changes are all nbc-changes unless annotated with a bc-change marker.  Description (and other similar) statements would be assumed to be editorial changes unless marked with an nbc-change or bc-change marker.
> (iv) bc-change and nbc-change markers would also be allowed to be added at the authors discretion (i.e., it is okay to explicitly mark changes that the tool would be expected to identify anyway).
>  
> Proposal B:
> The second proposal is the same as Proposal A, except that the nbc-change marker is mandatory to include everywhere where there is an nbc-change, i.e., even if tooling would be expected to detect it as an NBC change.
> - This approach probably prevents an author from ever deleting a node (because you can't annotate what isn't there), instead a "tombstone" obsolete entry would need to be retained.
> - I'm also concerned that this approach assumes that every change is implicitly compatible unless marked otherwise, and hence I think that we would still need a bc-change marker extension to be used to suppress possibly false nbc warnings by a module/schema comparison tool.  E.g., a tool might not be able to see that a change to a pattern statement is backwards-compatible and hence would probably need a bc-change annotation to avoid it incorrectly flagging it as an non-backwards-compatible change.
> 
> Proposal C:
> The third proposal is the observation that we don't have to take the same approach for all sources of YANG models.  E.g., we could allow YANG modules generally to follow proposal A, but then mandate that IETF modules follow the stricter approach of Proposal B.  I.e., all nbc-changes must be explicitly annotated, and data nodes cannot be removed from published modules.
> 
> 
> Between the authors I think that the discussion was leaning was towards proposal A or C.  But we would be interested in hearing other views from the WG.
> 
> 
> > 
> > then tool and humans can easily figure out in which revision NBC
> > changes occured and if they affect a certain usage of the module.
> 
> Without a module (or schema) level indication then I think that this is harder for humans, giving a module summary indication is I believe also helpful.  I was also assuming that module revision description should highlight any NBC changes - maybe we should add text for this.
> 
> E.g., if over time most updates to modules are backwards compatible then being able to see that the device package version number changed in a backwards-compatible way is much simpler (but both humans and tools) than having to check all changes in all modules trying to spot non-backwards-compatible differences. 
> 
> 
> > 
> > Instead of simply properly documenting the changes, we invent fuzzy
> > version numbers and complex algorithms to reverse engineer the facts
> > that could have easily been documented by whoever makes the change.
> > 
> > If the reason is that developers do not document their changes, then
> > go and develop tools to force them to document their changes. I do not
> > think it is fair to simply push the pain to the users of YANG modules.
> 
> Note, the aim here is not to push pain on the users of YANG modules, but actually to act as a warning to the user.  I.e., if it is a minor version change then they should be safe to use the updated module version, if not then they need to check the changes more closely, and I agree that annotations inline within the module may be helpful for this.
> 
> But in all cases, whether we are talking about a version number at the module level, or annotations on particular data nodes, it is still plausible that publishers will sometimes get this wrong and we need good tooling (alongside bc/nbc annotations) to check when a module is published that it is following the rules, and which can also be used by clients to check that any breaking changes have been properly described.
> 
> Regards,
> Rob
> 
> // All as a contributor and with no hats.
> 
> 
> >   
> > /js
> > 
> > --
> > Jürgen Schönwälder              Jacobs University Bremen gGmbH
> > Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> > Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
> > 
> > _______________________________________________
> > netmod mailing list
> > netmod@ietf.org
> > https://www.ietf.org/mailman/listinfo/netmod

-- 
Jürgen Schönwälder              Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>