Re: [netmod] YANG filenames in module versioning

Robert Varga <nite@hq.sk> Tue, 30 May 2023 17:38 UTC

Return-Path: <nite@hq.sk>
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 5F778C13AE5A for <netmod@ietfa.amsl.com>; Tue, 30 May 2023 10:38:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=hq.sk
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d4N1OSfNapbP for <netmod@ietfa.amsl.com>; Tue, 30 May 2023 10:38:32 -0700 (PDT)
Received: from mail.hq.sk (hq.sk [81.89.59.181]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D826CC159A35 for <netmod@ietf.org>; Tue, 30 May 2023 10:38:30 -0700 (PDT)
Received: from [192.168.1.107] (chello085216197060.chello.sk [85.216.197.60]) by mail.hq.sk (Postfix) with ESMTPSA id B0658247860; Tue, 30 May 2023 19:38:26 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hq.sk; s=mail; t=1685468306; bh=ih9KalIGwr44PErxLWubqp+5C7i0fHy30iR24epOA7k=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=aeQSZgIgcpI/3jD1q4ZDUHtWw8a5twXwnyH9xiwEWYbfCRJ91X0BEU9cpLtu521pm MISQWn8XmBYoTI5gB7qdNtsLy7KxuIOCflLce5JLsA1MDiAy1Az3pkWu62nHKR/m4n T20CRE0lC2ZMjLrEYHB/p4UpSLJ59uyVzhkMlOwU=
Message-ID: <9427c22a-068e-3e38-6a27-a0261c2e55b7@hq.sk>
Date: Tue, 30 May 2023 19:38:26 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0
Content-Language: en-US
To: "Jason Sterne (Nokia)" <jason.sterne@nokia.com>, Andy Bierman <andy@yumaworks.com>
Cc: "netmod@ietf.org" <netmod@ietf.org>
References: <01000187fd8e0407-84bd7e7b-ede3-43d8-a9b3-5d4d0a915509-000000@email.amazonses.com> <af6b37a6-a439-adfc-0738-e2fc8e48b07e@hq.sk> <CABCOCHQ2eGHA-NkGNScEJ9mEbCRT0TYUGzbpsche064qagdsmw@mail.gmail.com> <DM6PR08MB5084AF63D4C5A93ED95F1CB69B4B9@DM6PR08MB5084.namprd08.prod.outlook.com>
From: Robert Varga <nite@hq.sk>
In-Reply-To: <DM6PR08MB5084AF63D4C5A93ED95F1CB69B4B9@DM6PR08MB5084.namprd08.prod.outlook.com>
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="------------uuZZRSl0mXfQyl0Ve07S8KJ2"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/1XsjMqVnVcIOzu-Us-usMnGQGkw>
Subject: Re: [netmod] YANG filenames in module versioning
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.39
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, 30 May 2023 17:38:37 -0000

On 30/05/2023 17.23, Jason Sterne (Nokia) wrote:
> (changing subject for a dedicated thread on the filename)
> 
> What the draft was mainly trying to achieve (IMO) wrt filename was to 
> have a standard format/separator (#) when using a revision-label.
> 
> i.e. **if** anyone is to use a revision-label, then it should be done 
> with <module-name>#<revision-label>.yang.
> 
> (and some users will indeed like to manage module versions using 
> revision labels instead of dates – probably most over the long term)
> 
> I’m not sure that {date, label} is a required tuple to identify a 
> version of a module. I see the “keys” more as {module-name, label} OR 
> {module-name,date}.

And therein lies a bit of the problem :)

As it currently stands, 
https://datatracker.ietf.org/doc/html/rfc7950#section-5.2 provides a 
SHOULD -- and this draft updates it with an incompatible RECOMMENDED.

The incompatibility stems from the amount of available metadata, which 
tools based on filesystem storage can glean from the file name:
- RFC7950 makes metadata available for efficient lookup by revision
- draft-ietf-netmod-yang-module-versioning makes metadata available for 
efficient lookup by label

The obvious problem for tools is that they need to support both 
concurrently -- and the question then becomes: which of the two should 
be used? :)

I think symlinks would be a good answer, in the way it's done in 
https://github.com/YangModels/yang/tree/main/standard/ietf/RFC:
- foo@date.yang is the actual file
- foo.yang is the symlink to the latest version

Perhaps the draft should define the module#label.yang as a secondary 
name, recommending tools make both module@data.yang and 
module#label.yang available?

> (where {module-name, label} could theoretically allow multiple revisions 
> in a single day, although for now we haven’t changed the 7950 
> requirement that every module has a unique date)

Actually that requirement has already been relaxed, i.e. you can have 
multiple revisions of any module which (after applying conformance) only 
defines typedefs/groupings for the purposes of using those in another 
module.

This includes ietf-inet-types.yang (obviously), but also 
ietf-keystore.yang when the server does not advertize 
central-keystore-supported feature.

RFC7895 section 2.1.2 already allows for that, RFC8525's 
"import-only-module" list makes it explicit.

Regards,
Robert

> 
> Jason
> 
> *From:*netmod <netmod-bounces@ietf.org> *On Behalf Of *Andy Bierman
> *Sent:* Wednesday, May 24, 2023 8:29 PM
> *To:* Robert Varga <nite@hq.sk>
> *Cc:* netmod@ietf.org
> *Subject:* Re: [netmod] Joint WGLC on "semver" and "module-versioning" 
> drafts
> 
> 	
> 
> *CAUTION:*This is an external email. Please be very careful when 
> clicking links or opening attachments. See the URL nok.it/ext for 
> additional information.
> 
> On Tue, May 16, 2023 at 11:10 AM Robert Varga <nite@hq.sk 
> <mailto:nite@hq.sk>> wrote:
> 
>     On 09/05/2023 00.49, Kent Watsen wrote:
>      > Dear NETMOD WG,
>      >
>      > This message begins a joint two-week WGLC for
>     draft-ietf-netmod-yang-semver-11 and
>     draft-ietf-netmod-yang-module-versioning-09
>      >   ending on Monday, May 22nd.  Neither draft has IPR declared. 
>     Here are the direct links to the HTML version for these drafts:
>      >
>      >     -
>     https://datatracker.ietf.org/doc/html/draft-ietf-netmod-yang-semver-11 <https://datatracker.ietf.org/doc/html/draft-ietf-netmod-yang-semver-11>
>      >     -
>     https://datatracker.ietf.org/doc/html/draft-ietf-netmod-yang-module-versioning-09 <https://datatracker.ietf.org/doc/html/draft-ietf-netmod-yang-module-versioning-09>
>      >
>      > Positive comments, e.g., "I've reviewed this document and believe
>     it is ready for publication", are welcome!  This is useful and
>     important, even from authors.  Objections, concerns, and suggestions
>     are also welcomed at this time.
> 
>     Hello, I have reviewed the module-versioning draft and overall it looks
>     fine (well, aside from the incoming pain :), but we'll cope with
>     that in
>     due time).
> 
>     One concern I have is with
>     https://datatracker.ietf.org/doc/html/draft-ietf-netmod-yang-module-versioning-09#name-file-names <https://datatracker.ietf.org/doc/html/draft-ietf-netmod-yang-module-versioning-09#name-file-names>,
>     which changes file naming.
> 
>     Previously the canonical file name included revision -- and now that
>     information is lost. While I understand the desire for descriptive
>     names, which are a boon for humans, the until the entire ecosystem
>     adopts labels, this change is either-or -- and hence tools have to pick
>     which metadata is more important: label or revision.
> 
>     Would it be possible to define a format which contains *both* the label
>     and revision, so as not to pick favorites?
> 
> This is an example of an important detail that could be solved differently
> 
> if a new YANG language version was used.  In YANG 1.1 the revision-date 
> is optional.
> 
> In YANG 1.2, both the revision-date and label could be mandatory.
> 
> It is common practice to release YANG changes in multiple release trains
> 
> on the same day.  So the {date, label} is the unique identifier for the 
> YANG file,
> 
> not some combination of optional parts.  IMO the file name you suggest 
> should
> 
> be the mandatory-to-implement canonical file name format for YANG 1.2.
> 
> */[>>JTS:] /*…snipped out the comments on doing this work in YANG 
> 1.0/1.1 vs another version of YANG…
> 
>     Thanks,
>     Robert
> 
> Andy
> 
>     _______________________________________________
>     netmod mailing list
>     netmod@ietf.org <mailto:netmod@ietf.org>
>     https://www.ietf.org/mailman/listinfo/netmod
>     <https://www.ietf.org/mailman/listinfo/netmod>
>