Re: [netmod] iana-if-type.yang has multiple revisions with the same date

Andy Bierman <andy@yumaworks.com> Fri, 04 March 2022 17:58 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 A2A0A3A0E1A for <netmod@ietfa.amsl.com>; Fri, 4 Mar 2022 09:58:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 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_SCC_BODY_TEXT_LINE=-0.01, 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.20210112.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 9DNvxVzgkaeo for <netmod@ietfa.amsl.com>; Fri, 4 Mar 2022 09:58:20 -0800 (PST)
Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) (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 3394F3A0B3D for <netmod@ietf.org>; Fri, 4 Mar 2022 09:58:12 -0800 (PST)
Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-2d07ae0b1c4so99929227b3.11 for <netmod@ietf.org>; Fri, 04 Mar 2022 09:58:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KgGfB6PAKvAGM3IXupWUmRPD+C1UZn60b6PMtoUzOI8=; b=vymcSnUVrTnZvA3zUL8+2dRox8+j9/55xV5HAIPC6+MP17L9QusjOVqBsuLKEVY33d C/R0evdbUrej9jAL1sdNqdbtsCUm1jfZXhMzYCrbClmMTq4lUYx8Xj028dEdHY2DBISx vEAzCPrVg4xdrohvm/K5rCRim/Tvl4ieSRODQ1XuOc4FaxkYxIHvgFmOk9LJaIsmWZVh vpjQBR0cgFVWnnqZ6iJm4pYLZ9Lbnh0GQG8OoQN2m/2m4CgshTnr0jBU+e2YmZpqn+aS EIyrTR9YFUP79Q+GmvjW4z0vQo99qOajkpQHccBbtYpU3CBWVpLJgOkpGH8cCCWoPakA pDYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KgGfB6PAKvAGM3IXupWUmRPD+C1UZn60b6PMtoUzOI8=; b=aA45Ym1Z03pBAPyBk/ECkv6QIf8ZaZ5bGnPDrR5AFyXSP+AS26RnvNtUCSsEEPJYas 6pFJcbzlQqt8MCaYXU0nG24xxGGlqfIGtekqWTI0iFPGqIl6S7QnCWlKleaT5eWJR45n EvnnRzvYrh9Gekq5RpE/MqUI+8lIByPJ5A2QSj7rVjMC8SSDaS0V/+2dtR8hWGSQnfNU 6hNIbymmC6UvfWR2zRKGIB9/1tO2559c/eyf75oZSEh/ivZ8O8l97Aal38Xg5kdqfiBI jfsbYDAUcKfcqTv9KsSMX81gH6LJ0PI09Xvty2+GRz3WPN5fq1Dudt1euCcWWIQrpTUo fUVw==
X-Gm-Message-State: AOAM532qDf5REYxxEhwfyoGCeR8yLUT76+fcj5C5DT1osq2Eyb+bN5JJ e3Ou4XirbC3ibr5R8dzjy5BYk5i0Id73jWrfjY8sag==
X-Google-Smtp-Source: ABdhPJw7swHqHeEASxasjIkYhzNN+FIohsB9YloJWZeKAWpESNHbyTFhLFf6f7rjqqgV5lGDYAhoqxSd788rUyNYuuw=
X-Received: by 2002:a81:a453:0:b0:2d7:e35a:f7af with SMTP id b80-20020a81a453000000b002d7e35af7afmr42351601ywh.159.1646416690792; Fri, 04 Mar 2022 09:58:10 -0800 (PST)
MIME-Version: 1.0
References: <CAEe_xxiTdvGscUqhuC=Kuh70C-=MRnA8GgjupC2vBfkK6_p+kw@mail.gmail.com> <CABCOCHR+yKwL7kkV2_Teha-Vnc8AJ9Q8QhZyjYwjaj286=vR_g@mail.gmail.com> <BY5PR11MB4196F53BF5619B1492995A93B5059@BY5PR11MB4196.namprd11.prod.outlook.com>
In-Reply-To: <BY5PR11MB4196F53BF5619B1492995A93B5059@BY5PR11MB4196.namprd11.prod.outlook.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Fri, 04 Mar 2022 09:58:00 -0800
Message-ID: <CABCOCHQ=DWo5J7wTkEvJFtAOJPLRAAFL8Ki9QSOU_pU-xm-Giw@mail.gmail.com>
To: "Rob Wilton (rwilton)" <rwilton@cisco.com>
Cc: William Lupton <wlupton@broadband-forum.org>, NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000001dfc605d968426c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/vKnrVqskvdWnFnRX5jtVf5MtoDU>
Subject: Re: [netmod] iana-if-type.yang has multiple revisions with the same date
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: Fri, 04 Mar 2022 17:58:41 -0000

Hi,

Vendors (including YumaWorks) have been violating the [name, date]
uniqueness rule for about a decade.
This is because vendors do not release YANG modules independently from
software.
Only SDOs do that.

A common software release train model (obsolete, oldstable, stable, latest,
testing)
shows how a YANG module with the same date ends up in multiple release
trains.

- Obsolete release trains do not get any module updates at all
- Oldstable modules usually only get changed for serious bugfixes.
- Stable modules usually only get changed for bugfixes and minor
enhancements
- Latest modules get all bugfixes and all new features
- Testing is work-in-progress and the version tracking is not useful during
this phase
   since the modules and code are unstable and subject to many changes

Consider a simple use-case: a bugfix in a leaf is added to the oldstable
release train

This is then merged downstream into each subsequent release train.
It is impractical and misleading to give each updated release train a
different
revision date.  This may break client applications and break
import-by-revision in
other modules.

IMO a practical solution is to add a leaf to the yang-library list entries
called "need-get-schema" (or whatever) that tells the client that the
[name, date] is not globally unique and the <get-schema> operation
should be used to retrieve the module used on this server with that tuple.


Andy


On Fri, Mar 4, 2022 at 6:53 AM Rob Wilton (rwilton) <rwilton@cisco.com>
wrote:

> Hi Andy,
>
>
>
> On this specific point:
>
>
>
> Note that with multiple release trains and the new SERMVER, it is likely
>
> that multiple [name, date, label] tuples resolve to the same [name, date]
> pair,
>
> making the uniqueness problem even worse.
>
>
>
> The module versioning draft explicitly disallows this.  Even when using
> revision-labels/Semver there is a requirement that they are separate
> revision modules with unique revision dates.
>
>
>
> Specifically, it contains this text:
>
>
>
>    In addition, this document uses the following terminology:
>
>
>
>    o  YANG module revision: An instance of a YANG module, *uniquely*
>
> *      identified with a revision date*, with no implied ordering or
>
>       backwards compatibility between different revisions of the same
>
>       module.
>
>
>
>    This document clarifies [RFC7950] and [RFC6020] to explicitly allow
>
>    non-linear development of YANG module and submodule revisions, so
>
>    that they MAY have multiple revisions that directly derive from the
>
>    same parent revision.  *As per [RFC7950] and [RFC6020], YANG module*
>
> *   and submodule revisions continue to be uniquely identified by their*
>
> *   revision date, and hence all revisions of a given module or submodule*
>
> *   MUST have unique revision dates.*
>
>
>
> And for revision labels:
>
>
>
>       Revision labels MUST be unique amongst all revisions of a
>
>       module or submodule.
>
>
>
> Regards,
>
> Rob
>
> // As an author/contributor.
>
>
>
>
>
>
>
> *From:* netmod <netmod-bounces@ietf.org> *On Behalf Of *Andy Bierman
> *Sent:* 01 March 2022 14:49
> *To:* William Lupton <wlupton@broadband-forum.org>
> *Cc:* NetMod WG <netmod@ietf.org>
> *Subject:* Re: [netmod] iana-if-type.yang has multiple revisions with the
> same date
>
>
>
>
>
>
>
> On Tue, Mar 1, 2022 at 4:54 AM William Lupton <wlupton@broadband-forum.org>
> wrote:
>
> All,
>
>
>
> Sorry if (as is quite likely) this is a duplicate.
>
>
>
> I noticed from
> https://yangcatalog.org/private-page/BBFYANGPageCompilation.html that
> there's a (long-standing?) problem in iana-if-type.yang
> <https://www.iana.org/assignments/yang-parameters/iana-if-type@2021-06-21.yang>:
> it has multiple revision statements with the same date:
>
>
>
>   revision 2018-06-28 {
>     description
>       "Registered ifType 294.";
>   }
>
>   revision 2018-06-28 {
>     description
>       "Registered ifType 293.";
>   }
>
> This has presumably happened as a result of an automated update script
> that doesn't check for this case (*)? From a quick scan, I didn't see
> anything in RFC 7950 banning duplicate revision dates, but RFC 8407 section
> 4.8 says "*If the module contents have changed, then the revision date of
> that new module version MUST be updated to a date later than that of the
> previous version*" and of course yangdump-pro is checking this.
>
>
>
> I think that this should be fixed. What's the best way to achieve this?
>
>
>
> I think this issue should be resolved as well.
>
> The YANG library identifies each module by a [name, date] tuple.
>
> The <get-schema> operation uses this tuple to identify a specific revision
> to retrieve.
>
> The import-by-revision mechanism uses this tuple to identify a specific
> revision to import.
>
>
>
> If this [name, date] tuple is not unique, then it cannot be mapped to a
> single module revision.
>
>
>
> Note that with multiple release trains and the new SERMVER, it is likely
>
> that multiple [name, date, label] tuples resolve to the same [name, date]
> pair,
>
> making the uniqueness problem even worse.
>
>
>
> This is quite significant if a client reads the YANG library from a server
>
> and decides it already has the module cached (based on the [name, date]
> tuple,
>
> as defined in the standard.  Then it will not use the <get-schema>
> operation
>
> to retrieve the module from the server.
>
>
>
> YANG artifacts and SID files also rely on this [name, date] tuple
> uniqueness.
>
>
>
> Even with the new versioning drafts, it is impossible for the client to
> know
>
> "Do you mean the REAL module foo, version xxxx-xx-xx, or your private
> version?"
>
>
>
>
>
> Thanks,
>
> William
>
>
>
>  Andy
>
>
>
>
>
> (*) In the rare event that multiple changes are made in the same day,
> perhaps the second change should be (strictly wrongly) assigned to the
> following day. In theory this could cause revision dates to run far into
> the future but in practice I don't think this will happen :).
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>
>