Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Standards/scs-0210-v2-k8s-version-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions Tests/chk_adrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,18 @@ 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")
else:
if isinstance(replaces, str):
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:
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"):
Expand Down