Re: [netmod] Import by revision-date or label vs semantic version
Andy Bierman <andy@yumaworks.com> Wed, 02 September 2020 14:52 UTC
Return-Path: <andy@yumaworks.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 2CA583A0DBD for <netmod@ietfa.amsl.com>; Wed, 2 Sep 2020 07:52:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.887
X-Spam-Level:
X-Spam-Status: No, score=-1.887 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 1Tp7u_xDuIrf for <netmod@ietfa.amsl.com>; Wed, 2 Sep 2020 07:52:23 -0700 (PDT)
Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EED7D3A0943 for <netmod@ietf.org>; Wed, 2 Sep 2020 07:52:22 -0700 (PDT)
Received: by mail-lj1-x22a.google.com with SMTP id a15so6289634ljk.2 for <netmod@ietf.org>; Wed, 02 Sep 2020 07:52:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=M2bzkuHz66kTwmCtLACHHOXu19Uu0uKJOp4Gzjrp6S4=; b=kffISuOTWv8p38s9zMyfj6kAckHoTl8t+kOnvQj9YB4GkhwJYlBWw8QgsO0BNIpn1W wHw0xroCuDXslxgahZBJV+O8DPRq3NKIvGPNcUGT4eB9TyKfhovmSv17pOapFl4QMnxE RyNlcCPXs3z/LOVEm/TO5sdCXm68utct/1w9QEZwE/bZDykiwnWvZtHxN+HBxMLqnXBK RWLWjGttMLoNa3n8gwpQ1jan/V9ukWehvfs1F1+WafY+jydFqUHPwSVnOZkz4ydTRfeE TBs8pWQg5A76YYPbEqtjt23cKRCw16D4gnsD2H6/JNzpVZVuzB1wHGGpi7UcaufHimzV 8uBQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=M2bzkuHz66kTwmCtLACHHOXu19Uu0uKJOp4Gzjrp6S4=; b=lmjKD2Cge8BuIXr4oMYh1OMQsWNiveOZhseGh8XpCpkELin/t808EFaf+rselgk4/O 033kbpjfm14F8wHk7LM4bSYhDM7/so2wvIwhjoHtmee5uWjC1DFomSX5nJJBh0I0aDCb Q1PzJd4kGn3r1wF5pEwAlnWx36uNui2f/eoFw5mldfmfjLKeEhcVemVO8GZA5/F1RL4F sn4qoXRPjervRTuMscWTb82k/pwxgEHNIGPu1My3yETYdLt9OsMGIH5ksGA1H+rrb7f3 UaIrPK0xEcoxvmTfGQDtghTotxgt7egXcud21kTmmuKXH6x/dNOTy78MnVg4w0sZXBEq ZU0w==
X-Gm-Message-State: AOAM530qdXVOtRMo9FPtZCSmDhpUNbnJlcXcr/n3qj5iHmd5tWi3GqB8 1yzZbi36SYI+Hh7wzCgcdKssX01OQYuuw6KEOTMUow==
X-Google-Smtp-Source: ABdhPJzgoRrX01JWLEVisCUW2bzc8FAhCazGEjw9X2REUqfhIVdELAdytl04YHs6i5Mhms3M8eepFZXyGDLY1ZifVZ8=
X-Received: by 2002:a2e:9047:: with SMTP id n7mr3670185ljg.125.1599058340961; Wed, 02 Sep 2020 07:52:20 -0700 (PDT)
MIME-Version: 1.0
References: <MN2PR11MB4366EC1CC0D62CAC0B3B02A1B52F0@MN2PR11MB4366.namprd11.prod.outlook.com> <20200902105539.dc4u5476nu434jyy@anna.jacobs.jacobs-university.de>
In-Reply-To: <20200902105539.dc4u5476nu434jyy@anna.jacobs.jacobs-university.de>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 02 Sep 2020 07:52:10 -0700
Message-ID: <CABCOCHREeGA_tSMVu=M7VZ-nR0FAwNo3egTSVta3BGM+jmTiMA@mail.gmail.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "Rob Wilton (rwilton)" <rwilton=40cisco.com@dmarc.ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000006384e705ae55c820"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/xS-rOF0CgpvXyQneTeDNXYZlZ7s>
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, 02 Sep 2020 14:52:26 -0000
On Wed, Sep 2, 2020 at 3:55 AM Juergen Schoenwaelder < 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 > > 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 > https://www.ietf.org/mailman/listinfo/netmod >
- [netmod] Import by revision-date or label vs sema… Rob Wilton (rwilton)
- Re: [netmod] Import by revision-date or label vs … Juergen Schoenwaelder
- Re: [netmod] Import by revision-date or label vs … Andy Bierman
- Re: [netmod] Import by revision-date or label vs … Sterne, Jason (Nokia - CA/Ottawa)
- Re: [netmod] Import by revision-date or label vs … Andy Bierman
- Re: [netmod] Import by revision-date or label vs … Juergen Schoenwaelder