[netmod] Re: YANG Versioning question - namespace version?

Andy Bierman <andy@yumaworks.com> Tue, 18 June 2024 14:36 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 83A2EC14F680 for <netmod@ietfa.amsl.com>; Tue, 18 Jun 2024 07:36:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.105
X-Spam-Level:
X-Spam-Status: No, score=-7.105 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_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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 CmXadNCidrvN for <netmod@ietfa.amsl.com>; Tue, 18 Jun 2024 07:36:08 -0700 (PDT)
Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) (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 699A8C14F617 for <netmod@ietf.org>; Tue, 18 Jun 2024 07:36:08 -0700 (PDT)
Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-2c2d25b5432so4297738a91.2 for <netmod@ietf.org>; Tue, 18 Jun 2024 07:36:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; t=1718721367; x=1719326167; 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=xGNq+jbL1R2bwgF4wIq3x0LsRyRMROjA1XrcF8hhfTI=; b=FX4JFm/oEGqS6b7KrtNiKJ891RpisfRzB0k2qyPiZWWVoWkr8UOG7cCctVpZLqVotS jRgnwguPntOZcQ+ZV6Opm2B95Y66SHZu9XyNx7OKXZbnQu6wb7YGgZtydsX61dMgC5DI 2djncvOJmj4U7WSFP8AGPEm875GL2VOoltjbHX47A5S+l32BIBoZoJxQiOaqa9l4eUmh N+5CwDvG7pzOZInEWXPMhLjwpTJ0Q3/zY3Du150N7TisdNT2i8nToG/H7sKsOEfx6a2y Ri1vKQwkPUou1C6FAOClZ6HoDhsCjIBeHwd7ZjGSY50fnNDZvX6vct384fk90STFYKfa W4TQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718721367; x=1719326167; 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=xGNq+jbL1R2bwgF4wIq3x0LsRyRMROjA1XrcF8hhfTI=; b=NaTdkuspvV6FdwOeL5jKEWnRKq/UTzL2g3ZnhTAQOz92ZpE2tTEqYRwK9QJb45U37a G9fEjbLNWlZ99YRYkk2V9JZBcr4HrachqxlICmr5BDCa2KPVweJgdgAqRK1w0aY+CBEg /hZirk9YFjh24alca5KRVvnynwfuJSlZXKtdDpWImgWeyb+hXuaFalwOoK2sgagY3W9G qjIGY+NWMUxurPQsMZkIt54wDMNgrsgH0KhSuwsmnVEni2Y+OTkBqs+M+lA/CRY74MV5 a1zxQwgf++www1onfNEpgfX37iKyBkNZee6NlGqg7zzNfk71S7j+iQkKBSKfPDu5rJMD P7nw==
X-Gm-Message-State: AOJu0YxQ4E7JKxZVwYy5iXa6xV2L+PG6Pr6YQjq7rs0CyXm//fFtgZVK 7DJRoPKIeIEtu2IV0OzKiFBpCBKECUj3SFVrY+J1Md6iTkGGrewtzvwp0TmMYE6OfwE76EnilaA XwORDeVMjzRrAsGhSrDwfJBlYrfkGvE62isLP7Q==
X-Google-Smtp-Source: AGHT+IHUuM+IDKhkDpw9BIJ2BdviIR535oOe/O1BUNSFSESiQxyTNaPIM27sDb1f0rXVWtAB3SMA973Y65EaXR/indU=
X-Received: by 2002:a17:90a:a58f:b0:2c2:f052:a24a with SMTP id 98e67ed59e1d1-2c4db34e3a7mr10632985a91.24.1718721367460; Tue, 18 Jun 2024 07:36:07 -0700 (PDT)
MIME-Version: 1.0
References: <010001902725fef5-d778c086-9139-46a1-bab0-50246decaed8-000000@email.amazonses.com> <DM6PR11MB2841739C3E6383F544D656D8CACE2@DM6PR11MB2841.namprd11.prod.outlook.com> <931abe0e-6a78-4ea3-97de-167eb62621ac@constructor.university>
In-Reply-To: <931abe0e-6a78-4ea3-97de-167eb62621ac@constructor.university>
From: Andy Bierman <andy@yumaworks.com>
Date: Tue, 18 Jun 2024 07:35:56 -0700
Message-ID: <CABCOCHTAN4JxGoo5w9EjcitnjOtLqF2c-7i0O_k_qSarxEXB-w@mail.gmail.com>
To: Jürgen Schönwälder <jschoenwaelder@constructor.university>
Content-Type: multipart/alternative; boundary="000000000000936daf061b2b00ce"
Message-ID-Hash: HIDH2YBZETCLJYWZIUOYONCFEUXBZNQZ
X-Message-ID-Hash: HIDH2YBZETCLJYWZIUOYONCFEUXBZNQZ
X-MailFrom: andy@yumaworks.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-netmod.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: netmod@ietf.org
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [netmod] Re: YANG Versioning question - namespace version?
List-Id: NETMOD WG list <netmod.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/KQ8hFIGYeTA9j6IgUdAGjQML_Gw>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Owner: <mailto:netmod-owner@ietf.org>
List-Post: <mailto:netmod@ietf.org>
List-Subscribe: <mailto:netmod-join@ietf.org>
List-Unsubscribe: <mailto:netmod-leave@ietf.org>

On Tue, Jun 18, 2024 at 1:53 AM Jürgen Schönwälder
<jschoenwaelder@constructor.university> wrote:

> The YANG naming scheme is (module, path). The XML namespaces are an
> XML serialization artifact.
>
> By promising backwards compatibility, the (module, path) naming scheme
> was sufficient (non-backwards compatible changes require to change either
> the module, the path, or both).
>
> The versioning effort proposes to evolve the current naming scheme
> to (module, path, version). This requires that in _all_ places where
> YANG-defined data is stored and processed, the version context needs
> to be made available, which essentially implies availability of the
> YANG library of the originating server plus code to process the same
> at all places where YANG-defined data is stored or processed and where
> robustness matters.
>
>

Versioning the namespace may be appropriate for a monolithic WEB API,
but YANG is modular, with lots of cross-references.  While it may be
trivial to
support GET or POST for many versions of a single WEB page, this is not the
case
for an API composed of 100s of modules.


/js
>

Andy


>
> On 18.06.24 08:22, Jan Lindblad (jlindbla) wrote:
> >
> > Kent,
> >
> >
> > I was recently asked why YANG module namespaces aren’t versioned.  For
> > example, the “1.0” at the end of this URI
> > "urn:ietf:params:xml:ns:yang:ietf-crypto-types:1.0”. The stated
> > concern was "because without this, then management of backward
> > compatibility becomes a nightmare.”
> >
> > In the very early days of YANG, we actually had a brief while when the
> > NS strings were composed just like that, with a sort of version number
> > at the end.
> >
> > To know that something is a new/different version of something else
> > you need two information elements. Something that indicates “sameness”
> > and something that indicates “newness”.
> >
> > When tracking files in git, the “sameness” typically comes from
> > keeping the same filename (even if git can handle file renames if
> > registered properly). In YANG, we didn’t want to rely on the filename,
> > since the module filenames are not necessarily globally unique, as the
> > thinking went. So the NS string serves as the sameness factor, and
> > must therefore not change. Basically, modules with different NS
> > strings are (considered) completely unrelated.
> >
> > To indicate “newness”, we depend on the revision statement in YANG. In
> > the Versioning Design Team, we have also been toying around with a
> > checksum to indicate newness, but that has not taken root.
> >
> > Theoretically, it would of course be possible to indicate both things
> > in the NS string by appending a version number at the end, but then
> > all clients and servers would have to agree on the convention/rule
> > that the characters after the last colon in the NS string need to be
> > processed differently. That ship has probably crossed the ocean by
> > now, but we could bring it up for YANG next.
> >
> > But I fail to see why our non-choice of this particular solution would
> > necessarily drive us into a nightmare. The necessary information is
> > available in the modules, just not in the NS string alone.
> >
> > Best Regards,
> >
> > /jan
> >
> >
> >
> > This convention was established prior to my becoming active in the
> > IETF, but my guess is that the reason is because the YANG-module
> > update rules in RFC 7950 Section 11 ensure backwards compatibility,
> > and hence the versioning the namespace would have no value. That said,
> > the YANG Versioning effort introduces the possibility of NBC changes,
> > which makes me wonder if this is something that should be discussed.
> >
> > Thoughts?
> >
> > Kent
> >
> >
> >
> > _______________________________________________
> > netmod mailing list -- netmod@ietf.org
> > To unsubscribe send an email to netmod-leave@ietf.org
> >
> >
> > _______________________________________________
> > netmod mailing list -- netmod@ietf.org
> > To unsubscribe send an email to netmod-leave@ietf.org
>
> --
> Jürgen Schönwälder              Constructor University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
>
> _______________________________________________
> netmod mailing list -- netmod@ietf.org
> To unsubscribe send an email to netmod-leave@ietf.org
>