Re: [netmod] import-by-semver issue

"Rob Wilton (rwilton)" <rwilton@cisco.com> Sun, 24 March 2019 15:14 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 46263127968 for <netmod@ietfa.amsl.com>; Sun, 24 Mar 2019 08:14:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.501
X-Spam-Level:
X-Spam-Status: No, score=-14.501 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=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 n0z7HYQxuPdj for <netmod@ietfa.amsl.com>; Sun, 24 Mar 2019 08:14:21 -0700 (PDT)
Received: from alln-iport-8.cisco.com (alln-iport-8.cisco.com [173.37.142.95]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DC3F812787E for <netmod@ietf.org>; Sun, 24 Mar 2019 08:14:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3018; q=dns/txt; s=iport; t=1553440460; x=1554650060; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=SfkAaDWZXorHSn8D4HuFmFKypv/UCvBbo6lj5+iT77s=; b=aSSw7lvv1v8um7rG7wz3k2MdsOZ6w/JiOcqmM5zI1ti7eMf+r/Xumnwq zIeLY1bTxIXyW/gy2okHhp39o0nIV9twFsrVI6NM0Z8wRHkU49MWx6xaq 0+Hb7M63H6XEcU1/A+z845Fea74UL/hAvdo4OF4OjYQa6MspibsIJltle Q=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AHAADSnZdc/5hdJa1gAxkBAQEBAQEBAQEBAQEHAQEBAQEBgVMCAQEBAQELAYIQaIEDJwqEBJVImDqBew0BAR+ETQIXhGUiNgcNAQEDAQEJAQMCbRwMhUoBAQEEIxFFDAICAgEIDgIBBAEBAQICJgICAhkXFQgIAgQOBQgTgwiBdawpgS+KHwUFgQYkAYsxF4FAP4QjPoRbCiaCQ4JXA4pqggaYJgkCky8hk36eRgIRFYEuJgMugVZwFYMnhiuKIEExjnOBHwEB
X-IronPort-AV: E=Sophos;i="5.60,256,1549929600"; d="scan'208";a="249643024"
Received: from rcdn-core-1.cisco.com ([173.37.93.152]) by alln-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 24 Mar 2019 15:14:19 +0000
Received: from XCH-ALN-008.cisco.com (xch-aln-008.cisco.com [173.36.7.18]) by rcdn-core-1.cisco.com (8.15.2/8.15.2) with ESMTPS id x2OFEJGH017493 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Sun, 24 Mar 2019 15:14:19 GMT
Received: from xch-rcd-007.cisco.com (173.37.102.17) by XCH-ALN-008.cisco.com (173.36.7.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 24 Mar 2019 10:14:18 -0500
Received: from xch-rcd-007.cisco.com ([173.37.102.17]) by XCH-RCD-007.cisco.com ([173.37.102.17]) with mapi id 15.00.1473.003; Sun, 24 Mar 2019 10:14:18 -0500
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
CC: Andy Bierman <andy@yumaworks.com>, NetMod WG <netmod@ietf.org>
Thread-Topic: [netmod] import-by-semver issue
Thread-Index: AQHU4arYjIn8/1YI30euxcwhgGMsT6YahbWggABuJwD//9uzgIAAXWcA//+zwcA=
Date: Sun, 24 Mar 2019 15:14:18 +0000
Message-ID: <de771cdd329046cfa42a92d8d8ecf525@XCH-RCD-007.cisco.com>
References: <CABCOCHRQXwRM1_xNzwoWxdT6e_zSNSFpvooDDmP3g11gxd3NuA@mail.gmail.com> <892d5ab4649549698808a6150067f840@XCH-RCD-007.cisco.com> <CABCOCHT3qfo4s7JV6WktWuz2C_UA6NFjqdVcjxVjxCDTUHWDzg@mail.gmail.com> <4c0a8dca338f4ca384dea933f046511e@XCH-RCD-007.cisco.com> <20190324143116.evgabiqpmz5gwgem@anna.jacobs.jacobs-university.de>
In-Reply-To: <20190324143116.evgabiqpmz5gwgem@anna.jacobs.jacobs-university.de>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.61.79.96]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Outbound-SMTP-Client: 173.36.7.18, xch-aln-008.cisco.com
X-Outbound-Node: rcdn-core-1.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/67tuXe97iAhtpC5SqSpVhdjZZCg>
Subject: Re: [netmod] import-by-semver issue
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: Sun, 24 Mar 2019 15:14:24 -0000

Hi Juergen,

> -----Original Message-----
> From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
> Sent: 24 March 2019 15:31
> To: Rob Wilton (rwilton) <rwilton@cisco.com>
> Cc: Andy Bierman <andy@yumaworks.com>; NetMod WG <netmod@ietf.org>
> Subject: Re: [netmod] import-by-semver issue
> 
> On Sun, Mar 24, 2019 at 02:07:15PM +0000, Rob Wilton (rwilton) wrote:
> > Hi Andy,
> >
> > There are many ways to write and design compilers.
> >
> > Compilers that don’t understand import-by-semver just ignore the extension,
> no deviation is required.  They just import whichever arbitrary revision that they
> would have imported anyway, as specified by YANG 1.1.  The import-by-semver
> statement just reduces the set of valid modules revisions that can be used for
> import.
> >
> 
> If two compilers (one supporting semver, the other not) resolve imports
> differently, then the design is in my view somewhat broken, in particular if you
> allow NBC changes.

But that is true of YANG compilers today.  If there are multiple revisions of a module that could be chosen, then each compiler is at liberty to decide which revision to choose (last paragraph of section 5.1.1 in RFC 7950).

So, I would argue that "import-by-version" doesn't make YANG compilers any less consistent that they are already today, since that inconsistency already exists.

I presume that the real solution here is to explicitly define the full set of implemented, import-only-modules to the compiler so that it always compiles a consistent schema.  Perhaps other compilers have different ways to solve this problem.

Note, I also think that YANG library has a similar inconsistency.  I.e. there is no guarantee that two different compilers will construct exactly the same datastore schema from the YANG library output.  I think that this is a design bug, but also one that we attempt to address in draft-verdt-netmod-yang-semver-00.

Thanks,
Rob

> 
> /js
> 
> --
> Juergen Schoenwaelder           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/>