From 12ef14cc945352a1b22cc6fa823c4037c71046c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20B=C3=BCchse?= Date: Wed, 3 Dec 2025 21:23:43 +0100 Subject: [PATCH 1/4] Include replaces field into chk_adrs.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Büchse --- Tests/chk_adrs.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tests/chk_adrs.py b/Tests/chk_adrs.py index a0a75f5ce..26f041b60 100755 --- a/Tests/chk_adrs.py +++ b/Tests/chk_adrs.py @@ -131,6 +131,13 @@ def check_front_matter(self, fn, front, filenames): ] if errors: self.emit(f"in {fn}: syntax errors with key(s) {', '.join(errors)}") + # special check for replaces field if major version > 1 + if fn[9:12] not in ("vN-", "v1-"): + replaces = front.get("replaces") + if replaces is None: + self.emit(f"in {fn}: missing replaces field") + elif replaces not in filenames: + self.emit(f"in {fn}: original version {replaces} not found") # now do cross-field checks status = front.get("status") if "replaced_by" in front and status not in ("Deprecated", "Rejected"): From 81c89d383004011a867fd11b88f2ce4d999be7f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20B=C3=BCchse?= Date: Wed, 3 Dec 2025 21:26:34 +0100 Subject: [PATCH 2/4] Fix missing replaces field in front matter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Büchse --- Standards/scs-0210-v2-k8s-version-policy.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Standards/scs-0210-v2-k8s-version-policy.md b/Standards/scs-0210-v2-k8s-version-policy.md index 1d20010d0..3698757c6 100644 --- a/Standards/scs-0210-v2-k8s-version-policy.md +++ b/Standards/scs-0210-v2-k8s-version-policy.md @@ -4,6 +4,7 @@ type: Standard stabilized_at: 2024-02-08 status: Stable track: KaaS +replaces: scs-0210-v1-k8s-new-version-policy.md --- ## Introduction From 13ddba526edfb565c3bfaeb866a6805fe124f150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20B=C3=BCchse?= Date: Thu, 4 Dec 2025 07:43:27 +0100 Subject: [PATCH 3/4] Treat replaces field as list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's specified to be a list, but every file in the main branch treats it as simple string. Signed-off-by: Matthias Büchse --- Tests/chk_adrs.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Tests/chk_adrs.py b/Tests/chk_adrs.py index 26f041b60..04d773432 100755 --- a/Tests/chk_adrs.py +++ b/Tests/chk_adrs.py @@ -136,8 +136,13 @@ def check_front_matter(self, fn, front, filenames): replaces = front.get("replaces") if replaces is None: self.emit(f"in {fn}: missing replaces field") - elif replaces not in filenames: - self.emit(f"in {fn}: original version {replaces} not found") + else: + if isinstance(replaces, str): + print(f"WARNING: replaces field not a list in {fn}", file=sys.stderr) + replaces = [replaces] + missing = [fn for fn in replaces if fn not in filenames] + if missing: + self.emit(f"in {fn}: original version(s) {','.join(missing)} not found") # now do cross-field checks status = front.get("status") if "replaced_by" in front and status not in ("Deprecated", "Rejected"): From 95964557e9553a5009f2f5693c79b8e60aaf20f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20B=C3=BCchse?= Date: Thu, 4 Dec 2025 16:14:36 +0100 Subject: [PATCH 4/4] Make warning output more consistent with errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Büchse --- Tests/chk_adrs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/chk_adrs.py b/Tests/chk_adrs.py index 04d773432..1173cb2ed 100755 --- a/Tests/chk_adrs.py +++ b/Tests/chk_adrs.py @@ -138,7 +138,7 @@ def check_front_matter(self, fn, front, filenames): self.emit(f"in {fn}: missing replaces field") else: if isinstance(replaces, str): - print(f"WARNING: replaces field not a list in {fn}", file=sys.stderr) + print(f"WARNING: in {fn}: replaces field not a list", file=sys.stderr) replaces = [replaces] missing = [fn for fn in replaces if fn not in filenames] if missing: