Re: [netmod] YANG Versioning: filename recommendations for YANG Semver

Andy Bierman <andy@yumaworks.com> Tue, 02 April 2024 21:40 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 7B8C0C151076 for <netmod@ietfa.amsl.com>; Tue, 2 Apr 2024 14:40:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.095
X-Spam-Level:
X-Spam-Status: No, score=-2.095 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, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 (2048-bit key) header.d=yumaworks.com
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 tzGmHUW2yIVf for <netmod@ietfa.amsl.com>; Tue, 2 Apr 2024 14:40:47 -0700 (PDT)
Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 36B28C14CE5F for <netmod@ietf.org>; Tue, 2 Apr 2024 14:40:47 -0700 (PDT)
Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2a297378cf0so16170a91.1 for <netmod@ietf.org>; Tue, 02 Apr 2024 14:40:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; t=1712094046; x=1712698846; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ReH6xMZpPuFkITK3cYAFzZ3oePO8VEGBMU9AGQNWVtg=; b=bCCIakceWOx3eIvDZEk/+VblCbfuG22j4qkBZDEMzS/uGIyoHPNto6kM99EnE1S0N1 5Ebhw+TGD+txwsmPT4GwybBC/HmvX7Vkq4X9zCiSu5GgxAnlHUOhUS3riw1KFHh69f/R vi7BmKUooHJxM1bZZZcu02De3fp8XjEiinJeMwU7Vw+SMGOtJHmThwzz2bzX78XmAbZg rv8LQlA9tWhOZbee4Y1rW9Yav13pLNFMSLzcO1NcbzXm0LJ0WUYcBNH2hU3BlztX9IOw JkdiD3dQiuOA5CT6c8ShZHrP1VGWJoG8Ev6k+JRPwnJA20iLg2errZl98vF/H6lcgWk2 bjkA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712094046; x=1712698846; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ReH6xMZpPuFkITK3cYAFzZ3oePO8VEGBMU9AGQNWVtg=; b=ZbMVsn6M/HmyzghTQzh6Gaqh5B9Gx1LvukcAHAILilKjtElMm/9MoJhE82Fc/uecne 0rDBvXtca699SHWbimYJ5S90Smsl+IisfgTgFepiYcOlnCxst5Zrfs3KUJHlj/HqNvBh ND7ef/UYz2ygC+nsnOBhoOm/taNKAdSng7/2odw6sg+NqrjA0QtH00yj4h+WP9ySI3NN W6y0sUw9oG6w8WCykt7MG8hnJ46zkzBSD9J55JHrOpcToQIsyAtbomgpBnSydwdq1+5Y rexovBL0+OcECQurq+f/hsqIcRYU2abIIetMqNtORfBI9PhAxSAVqcehIuDRTCFaaXZc midw==
X-Forwarded-Encrypted: i=1; AJvYcCVwHz/SesdJeJ7FsiN7t9/fU7tpygypObXcDUHwKYDpJwhM9ComRz3eDl5gswdVmxFTbZ/FnOKgzY71rxUVcoQ=
X-Gm-Message-State: AOJu0Yz1pQSJqNVCnKTlntAD3TsyNVC7aguv870rlKjcyLYyo5Hja+xK /wUVzBug2vrQInWe1jCtkZynq7UqzsYpPqKFD5fjXIYlqui/oQPtphJUHjWEaivcO1OU+pwTDKm ERT3QD6oHzIxOlmNPOvySlGoMzwWHdQSij+Nmz8SFCumbyRAW
X-Google-Smtp-Source: AGHT+IFdS3zfm1Z1aid2qG5ALCuRMbDF1HrS+w+2ro9tBdgthDMpcBvjFQo/EbNpwcIddLnQknoFtFOUm69z2ZT4kBI=
X-Received: by 2002:a17:90a:db49:b0:29f:c827:bc8c with SMTP id u9-20020a17090adb4900b0029fc827bc8cmr11774147pjx.18.1712094046277; Tue, 02 Apr 2024 14:40:46 -0700 (PDT)
MIME-Version: 1.0
References: <SN6PR08MB484796C238E42AD91D29FA5F9B3E2@SN6PR08MB4847.namprd08.prod.outlook.com> <CABCOCHQk6BovHW7FA_moB+xrs8B1TH8eKmyiC1bco8WregvqBg@mail.gmail.com> <BN9PR11MB537127401708C17E194EC115B83E2@BN9PR11MB5371.namprd11.prod.outlook.com>
In-Reply-To: <BN9PR11MB537127401708C17E194EC115B83E2@BN9PR11MB5371.namprd11.prod.outlook.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Tue, 02 Apr 2024 14:40:34 -0700
Message-ID: <CABCOCHQi-Wqt+mCDho9b4w3HgC0xNeMq8iRC-GR4rmZGSdH8Kw@mail.gmail.com>
To: "Joe Clarke (jclarke)" <jclarke@cisco.com>
Cc: "Jason Sterne (Nokia)" <jason.sterne=40nokia.com@dmarc.ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000736dbf061523f524"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/M1ASphxzTATHmzPIOOh87-beNs4>
Subject: Re: [netmod] YANG Versioning: filename recommendations for YANG Semver
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, 02 Apr 2024 21:40:51 -0000

On Tue, Apr 2, 2024 at 2:11 PM Joe Clarke (jclarke) <jclarke@cisco.com>
wrote:

> Thanks, Andy.  See inline below.
>
>
>
> I do not agree with these recommendations to change the file names of YANG
> modules.
>
> The OFFICIAL YANG version is RFC 7950 - YANG 1.1.
>
> Any module using YANG version 1.1 needs to follow the rules in RFC 7950.
>
> Additional file naming that can be ignored by YANG 1.1 tools is OK.
>
>
>
> [JMC] We had this conversation on our call today.  I agree with you that
> tools can be unaware of YANG Semver and attempt to load a file named
> foo#1.2.3.yang as a module named “foo#1.2.3”, which would disagree with the
> module name defined within the module.
>
>
>

This can never happen since the '#' char is not allowed in a YANG module
name.
YANG 1.1 tools look for MODNAME[@DATE].EXT.
If the YANG module name is not in this format the tool will not find the
module.

The issue is obviously not the 2 lines of code to parse "#" instead of "@".
IMO this file name change is operationally disruptive and not really needed.
How come OpenConfig modules do not use this naming scheme?
Is it because they are following the RFC 7950 file naming rules?



> [JMC] Therefore, I’d be more in favor of no strong language on
> recommendations for YANG Semver within filenames.  Instead, to avoid a de
> facto standard in the industry, I’d prefer language such as, “if you want
> to insert YANG Semver into the module filename, then the format MUST be
> MODULE_NAME#SEMVER.yang.”  Any recommendation would be to remain consistent
> to 7950 and additionally publish the file with @REVSION.
>
>
>
> I do not understand how a 1:1 deterministic mapping is achieved, based on
> the YANG SemVer spec:
>
>
>
>
> https://www.ietf.org/archive/id/draft-ietf-netmod-yang-semver-15.html#name-yang-semver-pattern
>
>
>
>        1.0.3
>
>        1.0.3_compatible
>
>        1.0.3_non_compatible
>
>
>
> [JMC] These three versions cannot happen for a given module.  Only one of
> them can exist based on the rules.  If 1.0.3 already exists, then the next
> version could only be 1.0.4_compatible or 1.0.4_non_compatible (assuming
> you want to do BC or NBC changes in the 1.0 MAJOR.MINOR branch).
>
>
>
> The SemVer draft is confusing.
>
>
>
>       YANG artifacts that employ semantic versioning as defined in this
> document MUST use a version identifier
>
>       that corresponds to the following pattern: 'X.Y.Z_COMPAT'.
>
>
>
> And also:
>
>
>
>       Additionally, [SemVer] defines two specific types of metadata that
> may be appended to a semantic version string.  ....
>
>
>
> Examples from sec 6:
>
>
>       1.0.0-alpha.1
>
>       1.0.0-alpha.3
>
>       2.1.0-beta.42
>
>       3.0.0-202007.rc.1
>
>
>
>
>
> How do these strings conform to the pattern specified in sec. 4.3?
>
>
>
> [JMC] This additional build metadata is ignored for the purposes of YANG
> Semver, but I get your point.  I think some text should be added to address
> this optional metadata.
>
>
>

So the revision-date is the only field that can be relied upon since the
same SemVer (e.g. "1.0.0") could be released several times,
each one containing different content.


Joe
>


Andy