Re: [netmod] Import by revision-date or label vs semantic version

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Wed, 16 September 2020 22:48 UTC

Return-Path: <jason.sterne@nokia.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 52D193A12B8 for <netmod@ietfa.amsl.com>; Wed, 16 Sep 2020 15:48:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.594
X-Spam-Level:
X-Spam-Status: No, score=-3.594 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.695, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nokia.onmicrosoft.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 irN2jcA7BR9G for <netmod@ietfa.amsl.com>; Wed, 16 Sep 2020 15:48:25 -0700 (PDT)
Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-co1nam04on0728.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe4d::728]) (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 97B633A12B6 for <netmod@ietf.org>; Wed, 16 Sep 2020 15:48:25 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=It3f2zz0pVkDZnbCqGWoaG+yuMf16hrpEsftv7SSaI+Gplb74OV4F5S17Vq0lTPS3ihIioGdjrZNd4lrxqEOF1LXNzt0OCczW3JYgWjxy48oZzMhI2TLZTFElFiKC9EJvUWnPkBxdqtwnRHEDesbYvooyMO33thf3KU4KClWf49/39wDu0wtpK+Jiqxhx9JaCRXNcwRfYMgiB+u9La5Au8K++O0VhpJpXPZs8b3gSXl4SvCzCC+gI0w3UPTBAvXV0jC0Gji1NPfWomgQ1VAiRaBzD70DsCrOgRYqj1Layu2XQpp6+c0bnkrDLnYBuCQQpfcIc9p2ebOaTs0iKw9xDw==
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-SenderADCheck; bh=bopn+sZnoh3dZDvby4l91IESxc0HpeuIIazOq/4Yzpo=; b=Tyf9OYqQpgDiFqLFRLze3mhzQ40jsWQi3kucZuSuz69Al1TCS2UQc4IMWgQxI08YXjNTBWKJOOl5RuKHJKaBNMMuUS+/6gyTyc80OojneRhVEhVoPKRDAnKZOT+uE8uNzvSr7BqKQWTJVyxzLfib+AkFV0HNB2G+43yB6olAgt9125bPM2MH767lzMGQsIRWeZ5k54pTqtI4bKV0YUPKjo7rRnnuNa6R3mZ7rKpPaJuexXCjS4uiodiWc/QB8VfEi4KVxhG6ZYTU0VT3Z+mBSTULTJFpzNXY0W6pmTCz8YWppkaY8OuwJd58m3aZmRBuBSQTnuFfHeGOmsZXrW8VCA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bopn+sZnoh3dZDvby4l91IESxc0HpeuIIazOq/4Yzpo=; b=EdoipviYZkjgnNAEPoG2CnsPd8DUot+Q/uU1zDHrm56xMQ5kxEaf6JXjGfD5lNP9+RVtPek3yNKJYbiBgsVdVm8JVT0g05du6piE/seoKpFKh4LUJVktmvCFlqcAknJ5dPRQOuntbb3Wk3Ek4LntOc8T+KDtNJ8cjWMgY938CPI=
Received: from DM5PR08MB2633.namprd08.prod.outlook.com (2603:10b6:3:ca::21) by DM6PR08MB4090.namprd08.prod.outlook.com (2603:10b6:5:85::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Wed, 16 Sep 2020 22:48:23 +0000
Received: from DM5PR08MB2633.namprd08.prod.outlook.com ([fe80::21c1:edb6:a539:2ba9]) by DM5PR08MB2633.namprd08.prod.outlook.com ([fe80::21c1:edb6:a539:2ba9%4]) with mapi id 15.20.3370.019; Wed, 16 Sep 2020 22:48:23 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: Andy Bierman <andy@yumaworks.com>, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "Rob Wilton (rwilton)" <rwilton=40cisco.com@dmarc.ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Import by revision-date or label vs semantic version
Thread-Index: AQHWgTi289R36RXSjkqpSJGF6EdfMqlr8OIA
Date: Wed, 16 Sep 2020 22:48:23 +0000
Message-ID: <DM5PR08MB263314C85783418EC6A9AFD99B210@DM5PR08MB2633.namprd08.prod.outlook.com>
References: <MN2PR11MB4366EC1CC0D62CAC0B3B02A1B52F0@MN2PR11MB4366.namprd11.prod.outlook.com> <20200902105539.dc4u5476nu434jyy@anna.jacobs.jacobs-university.de> <CABCOCHREeGA_tSMVu=M7VZ-nR0FAwNo3egTSVta3BGM+jmTiMA@mail.gmail.com>
In-Reply-To: <CABCOCHREeGA_tSMVu=M7VZ-nR0FAwNo3egTSVta3BGM+jmTiMA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: yumaworks.com; dkim=none (message not signed) header.d=none;yumaworks.com; dmarc=none action=none header.from=nokia.com;
x-originating-ip: [174.112.3.120]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: 223b4fab-a0ee-4829-aaea-08d85a929dea
x-ms-traffictypediagnostic: DM6PR08MB4090:
x-microsoft-antispam-prvs: <DM6PR08MB4090F2E87D01456A4B5DE4589B210@DM6PR08MB4090.namprd08.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: DhmoyOVUK6FbTLTnFENGAoM6HfVLyh+Bk0HIlGOCDwFPuA6mWmnWvKQNtlR0c2oJCARpueh4BMGA5nfVZcZlzoPx8jQ2hyRhbfs23ZNjlwW9gSatg2V8Cjm6kWU3wZhjmGv/KsNvSaavqZkC3F3QaJMUue3RtYFSSPHXne4+n41WmKjte1dF15J9EiPguA9SGU06s+eE9HgSZGPdwl5PAXDyKAvPkf7Bb13Wx97gPAl7Qz/mwXdCLzd2JhNaAY/SMUpwDLiigowaHmACOO4wvPh8OtLqPRTXv4+Ymm1kQNkiY3/tTsiU6tlb02XfqMpNTTV964NjvGMxrw3gAmiYMyxMtzZ2PXg49BfZ49PmjBWUWg7Vqu/7kWjcF8G6F1VCqDQpASxkzoaoI1rP1YsMHg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR08MB2633.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(136003)(346002)(376002)(366004)(39860400002)(7696005)(110136005)(86362001)(9686003)(76116006)(6506007)(53546011)(66556008)(66476007)(55016002)(64756008)(66446008)(66946007)(83380400001)(26005)(478600001)(166002)(5660300002)(83080400001)(8676002)(2906002)(71200400001)(316002)(8936002)(52536014)(186003)(33656002)(966005); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata: Uypqbf52n22ibRuNup5g0oIYwpi+zp+aE31CUzIyx80/yWkml3EwMjUFYAWlSIHRge0Q/AMBAD4IKRT/7dKprO/7OATqL3R2PQeCoha6rS4WT6h2jbcoOA2oU+JAT9kJH34GOtKnibU6ONEB08vV0AL2aUkYxKVASpLRJN0eAYBa23Vnd1NsG74i4cFHJkgfgJCibG4PqpnxqSQ7pKbn2yxzojQZ8ScTHLikbakfLe/42LQ6SiG1Wp8+zL7bwuN2peEaZjh2Zc7HywctLZsNiuQDpFOikqkpWXMBuwrAo8yKcPYHtAdcNPaib/naVPHnTz5f063KgYpIVbPOz6eB02+0x+iodIbLV5PJVmQcOMdT2F5BsnLBCHJwA+T/yHhwXvW4oW0eQ5wVcqEslINd3B2RWtyJwQG5HGxeLCzpsLCuPHIbJcl6FOi5zOkE5k1bP6f+gb2LlrK59WxlovB+ylwVlwH5WUkcA8hWnP1oQN54TZrrhzM6e7sEp0wqJ1RD1igWz7RpSsAT22gILHGcQfWxOvHxy/u3KWcV6TdItKDnmdY8HNlhdw3LkqDvsr+bZiKhGbDyEUwIe++OnxH5xQotVhXrggSwpYgQoJvVICKaREjWb17kCHKNV0U9rxaVi290xuRqRq1w8xIOC5zQWA==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_DM5PR08MB263314C85783418EC6A9AFD99B210DM5PR08MB2633namp_"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM5PR08MB2633.namprd08.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 223b4fab-a0ee-4829-aaea-08d85a929dea
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Sep 2020 22:48:23.3072 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: /TZl4pwjwMBWCBXrBRGYY+zA/SFbAtinOmkUykPU6kyJeLfZAv9jzPOraMvp1Sv+osej37WID/xkuHZavvD+eg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR08MB4090
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/5uJ8i-EyM7nLVwia06kYpsr0yeA>
Subject: Re: [netmod] Import by revision-date or label vs semantic version
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: Wed, 16 Sep 2020 22:48:29 -0000

Hi all,

We have a practical problem though. YANG NEXT/2.0 is some indeterminate date in the future. Certainly measured in years (not months) and likely >2.

But we could really use a lot of this versioning work, including a more complete solution for importing by revision, now. Maybe we will roll this into YANG 2.0 but we can take advantage of it years before that will happen.

If we can add some improvements here, and the downside (i.e. clients/tools that don't understand the extensions) is no worse than today, then we should go ahead IMO.


The existing import behaviour is ambiguous in RFC 7950, so if multiple revisions of an imported module are available then two compilers could produce different schema. It is also quite likely that the compile would just break if the imported version was too old (i.e. missing dependency)

Consider this text from RFC8526:

An NMDA-compliant NETCONF server MUST implement the "ietf-netconf-nmda" module defined in this document, MUST support the operational state datastore, and MUST implement at least revision 2019-01-04 of the "ietf-yang-library" module defined in [RFC8525<https://tools.ietf.org/html/rfc8525>].

Notice the "at least revision 2019-01-04".

As another example: RFC8572 Secure Zero Touch Provisioning (SZTP) imports ietf-yang-types in order to use hex-string. But hex-string was only introduced in the second standard version of ietf-yang-types in rfc 6991. So the import should be something like "revision 2013-07-15 or derived;".

Rgds,
Jason


From: netmod <netmod-bounces@ietf.org> On Behalf Of Andy Bierman
Sent: Wednesday, September 2, 2020 10:52 AM
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>; Rob Wilton (rwilton) <rwilton=40cisco.com@dmarc.ietf.org>; netmod@ietf.org
Subject: Re: [netmod] Import by revision-date or label vs semantic version



On Wed, Sep 2, 2020 at 3:55 AM Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de<mailto:j.schoenwaelder@jacobs-university.de>> wrote:
I continue to have a problem with changing YANG import semantics using
extension statements. Versioning people should understand that this is
an NBC change and hence they should request that the YANG version
number is changed.

+1

IMO it is a huge mistake to think YANG will be easier to use in the long run by
adding optional extensions to YANG 1.1 instead of introducing a new language version.
YANG 1.1 will splinter into several dialects, all relying on different subsets of an ad-hoc
set of language extensions.


/js


Andy


On Wed, Sep 02, 2020 at 10:51:38AM +0000, Rob Wilton (rwilton) wrote:
> Hi,
>
> During the NETMOD 108 meeting I had made a comment that imports using revision-or-derived are not done using a semantic version number, but instead are done by revision label, which limits how they behave and what they are allowed to do.  Some participants were concerned that this might be confusing or even broken, and the outcome of that short discussion was that I should send an email to NETMOD with an example to help explain how they are proposed to work.
>
> The main principle here is that the versioning drafts have a clear distinction between supporting an abstract version label vs a specific version label scheme (such as YANG Semver).
>
> The new "revision-or-derived" extension is defined as part of base draft-ietf-netmod-yang-module-versioning.  The "revision-or-derived" extension takes a single argument that can either be a "revision date" or a "revision label".  It can be used regardless of the versioning scheme that is being used as a revision label, but therefore is also restricted to treating the revision label as an opaque textual label for a revision date.
>
> So, making use of the examples in section 4.1 of https://tools.ietf.org/html/draft-ietf-netmod-yang-module-versioning-01
>
> When a module has an import statement like this:
>
>    import example-module {
>      rev:revision-or-derived 2.0.0;
>    }
>
> Then the processing to find a suitable revision to import would be something like this (ignoring the issue of which revision is chosen from the set of suitable candidate revisions):
>
> 1) Iterate suitable candidate "example-module" YANG files.
> 2) For each candidate file, parse the revision history, and check back through the revision history to see if a revision with label "2.0.0" exists.  If it does, then that module revision is a suitable candidate for import.  If no revision with label "2.0.0" exists then that module revision does not satisfy the import.  Note the tooling does not need to understand the format of the revision label at all, a textual comparison between labels is sufficient.
>
> The algorithm works equivalently if the import was done using a revision date instead of a label (e.g., rev:revision-or-derived 2019-02-01), except that obviously the comparison in the revision history is done on the revision date rather than the revision labels.
>
>
> -------
>
> So, how does this interact with YANG Semver (or vanilla Semver 2.0.0)?
>
> Well, this still works because each version of a YANG module contains the revision history back to the root of the version tree.
>
> E.g., the YANG file defining version 2.2.0 would contain revisions for versions 2.2.0, 2.1.0, 2.0.0, 1.0.0 in its revision history, and hence would satisfy an import using label "2.0.0" or derived" solely because a revision with that label exists in its revision history.
>
> However, if the revision history had entries pruned (i.e., perhaps 2.1.0 hadn't been included in the revision history so that it was just 2.2.0, 2.0.0, 1.0.0) then this particular YANG file for version 2.2.0 WOULD NOT satisfy an import for "revision-or-derived 2.1.0;" because the module's revision history does not contain revision 2.1.0.
>
> So, the import revision-or-derived works fine for Semver version labels as long as the revision history is consistent and complete.
>
> -------
>
> Finally, there has been some discussion about whether it would be useful to have an import statement that restricts imports to only backwards compatible versions - I'll post a separate email on this.
>
> If the WG decided that this is useful, then this could still be supported, and without needing to understand the revision label.  Instead, it can be done by checking the revision history for the "rev:nbc-changes" substatement that indicates where NBC changes have occurred in the revision history.  As long as the allocated YANG Semver revision labels are consistent with the use of the rev:nbc-changes" substatement in the revision history then it would still behave in the intuitive way.
>
>
> Regards,
> Rob
>
> [As an individual contributor]
>
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org<mailto:netmod@ietf.org>
> https://www.ietf.org/mailman/listinfo/netmod

--
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/>

_______________________________________________
netmod mailing list
netmod@ietf.org<mailto:netmod@ietf.org>
https://www.ietf.org/mailman/listinfo/netmod