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

Andy Bierman <andy@yumaworks.com> Tue, 01 March 2022 14:49 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 D1CE73A0AAF for <netmod@ietfa.amsl.com>; Tue, 1 Mar 2022 06:49:27 -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=ham 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 hMqkymfbyfTY for <netmod@ietfa.amsl.com>; Tue, 1 Mar 2022 06:49:22 -0800 (PST)
Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) (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 A58193A0AB0 for <netmod@ietf.org>; Tue, 1 Mar 2022 06:49:22 -0800 (PST)
Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-2d646fffcc2so147303457b3.4 for <netmod@ietf.org>; Tue, 01 Mar 2022 06:49:22 -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=y/EuLvWSrCZ4NDNCObcTqL9gh1P+qLZCDmGb4TQ7ahs=; b=Pd97xG6tUzC0wAK/9nvd90raPYlfoDjZc59fy0/q3mkEg0BuLd7fAKxJxMgf7/mV7x QSwWRkImJ4TRoolqOSuK9gxxJWdfSYAJpp/9pqU20HuwU3wPhMJ8eLiqF8KBX50Tbwpq z7xMXVlNf7f+NN7mczV61ZfJWd34JbXiWFPGETup/RJSzm+wDt8J5sM10EYGxO+BU7ki L/TfZF1y/kOC6iiI8XqoYHHgN0rDT9/pb3GFQcjtvBhpOaL15s/tUcEQyZe6I/k2n0Im Igvx8FUPQKIz5HMMBhoMUMBSmN9GcuS04Ug9vP0VKlsY/PfciSYLQnFfoed8lnvnT2yl txWQ==
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=y/EuLvWSrCZ4NDNCObcTqL9gh1P+qLZCDmGb4TQ7ahs=; b=Hp/ZXnsbc2frSOFWCuCtUP3eEFcv9hH7pCS+0V+1FuuKGELCt98pOiOYmggqtFSuQm w2mwDgSnd0FkIUoqQNxXWsFoWECD2PWnA24HdNUBW+89m5I3Njg53Sa1H5b8wzX5L7Nc zy5CsVqNDlHOP4hdR4GE5v/x8PJh10pWY9DheYW0PAHTsMT/J3Ls052406Xe3F3K1YUo fuaZIK/eqLJ25ldIkFJU3wbacWOEHeq8TYydNGPTtZqfq48ICx7lM0hmhZN50Qj+qvB4 4r6emSm/IuRa/Z3h2xUlY6Bllat5O/oaBroJ8x3Zr10u6xT5f0MDCzrJrr2Aau5uP6lK EFPw==
X-Gm-Message-State: AOAM532DtWOkzKoZBqm37DVwtXAm5gVfVIkkdced2VVT0omvfIIl5jYw mJHijn5XhxffJv4/id1NAcQ3tFX2/LrG7lw+duigoQ==
X-Google-Smtp-Source: ABdhPJzp6TfjKyaCFroshBYMysKZ+IBKwd+27ngOLZ5jyaqVXyX7y6Bdgs2Rez7Y6kxird9hnyB/joxul2XMzCYWfcI=
X-Received: by 2002:a81:7c7:0:b0:2db:f50a:4b02 with SMTP id 190-20020a8107c7000000b002dbf50a4b02mr1534511ywh.350.1646146161125; Tue, 01 Mar 2022 06:49:21 -0800 (PST)
MIME-Version: 1.0
References: <CAEe_xxiTdvGscUqhuC=Kuh70C-=MRnA8GgjupC2vBfkK6_p+kw@mail.gmail.com>
In-Reply-To: <CAEe_xxiTdvGscUqhuC=Kuh70C-=MRnA8GgjupC2vBfkK6_p+kw@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Tue, 01 Mar 2022 06:49:10 -0800
Message-ID: <CABCOCHR+yKwL7kkV2_Teha-Vnc8AJ9Q8QhZyjYwjaj286=vR_g@mail.gmail.com>
To: William Lupton <wlupton@broadband-forum.org>
Cc: NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000002ec00005d92945b3"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/gwvaBb58oY2O1Qo2opZee3yPUC0>
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: Tue, 01 Mar 2022 14:49:28 -0000

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
>