Skip to content

Commit

Permalink
Replace obsoleted with deprecated
Browse files Browse the repository at this point in the history
SCS-0001 defines deprecation (and deprecated_at) as the keywords for deprecated or obsolete standards, that are most of the time succeeded by newer versions.
This commit replaces the obsoleted_at strings with deprecated_at defined by the initial standard.

Signed-off-by: Hannes Baum <hannes.baum@cloudandheat.com>
  • Loading branch information
cah-hbaum committed Feb 8, 2024
1 parent 044ec11 commit 7578dc1
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Standards/scs-0001-v1-sovereign-cloud-standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ embedded in the markdown header.
| `type` | REQUIRED | one of `Procedural`, `Standard`, or `Decision Record` |
| `status` | REQUIRED | one of `Proposal`, `Draft`, `Stable`, `Deprecated`, or `Rejected` |
| `track` | REQUIRED | one of `Global`, `IaaS`, `KaaS`, `IAM`, `Ops` |
| `obsoleted_at` | REQUIRED if `status` is `Deprecated` | ISO formatted date indicating the date after which the deprecation is in effect |
| `deprecated_at` | REQUIRED if `status` is `Deprecated` | ISO formatted date indicating the date after which the deprecation is in effect |
| `stabilized_at` | REQUIRED if `status` was ever `Stable` | ISO formatted date indicating the date after which the document was considered stable |
| `rejected_at` | REQUIRED if `status` is `Rejected` | ISO formatted date indicating the date on which the document was rejected |
| `replaced_by` | RECOMMENDED if `status` is `Deprecated` or `Rejected`, FORBIDDEN otherwise | List of documents which replace this document. |
Expand Down
10 changes: 5 additions & 5 deletions Standards/scs-0003-v1-sovereign-cloud-standards-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ then a certificate of that prerequisite scope has to be presented before the cer
| `version` | String | Mandatory: Version of the particular list of standards | _v3_ |
| `standards` | Array of maps | Mandatory: List of standard descriptors for this particular layer | |
| `stabilized_at` | Date | ISO formatted date indicating the date after this version is considered stable. | _2022-11-09_ |
| `obsoleted_at` | Date | ISO formatted date indicating the date on which this version is expired. | _2023-04-09_ |
| `deprecated_at` | Date | ISO formatted date indicating the date on which this version is expired. | _2023-04-09_ |

Once a version has a `stabilized_at` field, this field may not be changed. The same holds true for the `obsoleted_at` field.
Once a version has a `stabilized_at` field, this field may not be changed. The same holds true for the `deprecated_at` field.

Note that at any point in time, all versions that are older (`stabilized_at` is at or before this point)
can be certified against, unless the version is already obsoleted (the point is after `obsoleted_at`).
can be certified against, unless the version is already deprecated (the point is after `deprecated_at`).
This means that more than one version may be allowable at a certain point in time. Tooling should default
to use the newest allowable version (the one with the most recent `stabilized_at` date) then.

Expand Down Expand Up @@ -176,13 +176,13 @@ versions:

- version: v3 # This is the stable set of standards that is currently active
stabilized_at: 2021-10-01
obsoleted_at: 2022-11-08
deprecated_at: 2022-11-08
standards:
- name: ....

- version: v2 # This set of standards is obsolete and has been replaced by v3
stabilized_at: 2021-07-01
obsoleted_at: 2021-11-01
deprecated_at: 2021-11-01
standards:
- name: ....
kaas:
Expand Down
2 changes: 1 addition & 1 deletion Standards/scs-0100-v1-flavor-naming.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ track: IaaS
status: Deprecated
state: v1.1 (for R3)
stabilized_at: 2022-09-08
obsoleted_at: 2023-10-31
deprecated_at: 2023-10-31
---

## Introduction
Expand Down
2 changes: 1 addition & 1 deletion Standards/scs-0100-v2-flavor-naming.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: Deprecated
track: IaaS
replaces: scs-0100-v1-flavor-naming.md
stabilized_at: 2023-02-21
obsoleted_at: 2023-11-30
deprecated_at: 2023-11-30
---

## Introduction
Expand Down
6 changes: 3 additions & 3 deletions Tests/chk_adrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# | `type` | REQUIRED | one of `Procedural`, `Standard`, or `Decision Record` |
# | `status` | REQUIRED | one of `Proposal`, `Draft`, `Stable`, `Deprecated`, or `Rejected` |
# | `track` | REQUIRED | one of `Global`, `IaaS`, `KaaS`, `IAM`, `Ops` |
# | `obsoleted_at` | REQUIRED if `status` is `Deprecated` | ISO formatted date indicating the date after which the deprecation is in effect |
# | `deprecated_at` | REQUIRED if `status` is `Deprecated` | ISO formatted date indicating the date after which the deprecation is in effect |
# | `stabilized_at` | REQUIRED if `status` was ever `Stable` | ISO formatted date indicating the date after which the document was considered stable |
# | `rejected_at` | REQUIRED if `status` is `Rejected` | ISO formatted date indicating the date on which the document was rejected |
# | `replaced_by` | RECOMMENDED if `status` is `Deprecated` or `Rejected`, FORBIDDEN otherwise | List of documents which replace this document. |
Expand All @@ -44,7 +44,7 @@ def iso_date(value):
"type": ("Procedural", "Standard", "Decision Record").__contains__,
"status": ("Proposal", "Draft", "Stable", "Deprecated", "Rejected").__contains__,
"track": ("Global", "IaaS", "KaaS", "IAM", "Ops").__contains__,
"obsoleted_at": optional(iso_date),
"deprecated_at": optional(iso_date),
"stabilized_at": optional(iso_date),
"rejected_at": optional(iso_date),
}
Expand Down Expand Up @@ -95,7 +95,7 @@ def check_front_matter(self, fn, front):
status = front.get("status")
if "replaced_by" in front and status not in ("Deprecated", "Rejected"):
self.emit(f"in {fn}: replaced_by is set, but status does not match")
if status == "Deprecated" and "obsoleted_at" not in front:
if status == "Deprecated" and "deprecated_at" not in front:
self.emit(f"in {fn}: status is Deprecated, but deprecated_at date is missing")
if status in ("Stable", "Deprecated") and "stabilized_at" not in front:
self.emit(f"in {fn}: status is Stable or Deprecated, but stabilized_at date is missing")
Expand Down
6 changes: 3 additions & 3 deletions Tests/scs-compatible-iaas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ versions:
args: "./iaas/scs-0104-v1-images.yaml"
- version: v3
stabilized_at: 2023-06-15
obsoleted_at: 2024-04-30
deprecated_at: 2024-04-30
standards:
- name: Flavor naming
url: https://raw.githubusercontent.com/SovereignCloudStack/standards/main/Standards/scs-0100-v3-flavor-naming.md
Expand All @@ -49,7 +49,7 @@ versions:
url: https://opendev.org/openinfra/interop/src/branch/master/guidelines/2022.11.json
- version: v2
stabilized_at: 2023-03-23
obsoleted_at: 2023-11-30
deprecated_at: 2023-11-30
standards:
- name: Flavor naming
url: https://raw.githubusercontent.com/SovereignCloudStack/standards/main/Standards/scs-0100-v2-flavor-naming.md
Expand All @@ -64,7 +64,7 @@ versions:
url: https://opendev.org/openinfra/interop/src/branch/master/guidelines/2022.11.json
- version: v1
stabilized_at: 2021-01-01
obsoleted_at: 2023-10-31
deprecated_at: 2023-10-31
standards:
- name: Flavor naming
url: https://raw.githubusercontent.com/SovereignCloudStack/standards/main/Standards/scs-0100-v1-flavor-naming.md
Expand Down
4 changes: 2 additions & 2 deletions Tests/scs-compliance-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# valid keywords for various parts of the spec, to be checked using `check_keywords`
KEYWORDS = {
'spec': ('name', 'url', 'versions', 'prerequisite'),
'version': ('version', 'standards', 'stabilized_at', 'obsoleted_at'),
'version': ('version', 'standards', 'stabilized_at', 'deprecated_at'),
'standard': ('check_tools', 'url', 'name', 'condition'),
'checktool': ('executable', 'args', 'condition', 'classification'),
}
Expand Down Expand Up @@ -229,7 +229,7 @@ def main(argv):
for vd in spec["versions"]:
check_keywords('version', vd)
stb_date = vd.get("stabilized_at")
obs_date = vd.get("obsoleted_at")
obs_date = vd.get("deprecated_at")
futuristic = not stb_date or config.checkdate < stb_date
outdated = obs_date and obs_date < config.checkdate
vr = vrs[vd["version"]] = {
Expand Down
6 changes: 3 additions & 3 deletions Tests/testing/scs-compatible-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ versions:
# Unfortunately, no wrapper to run refstack yet, needs to be added
- version: v3
stabilized_at: 2023-06-15
obsoleted_at: 2024-04-30
deprecated_at: 2024-04-30
standards:
- name: Flavor naming
url: https://raw.githubusercontent.com/SovereignCloudStack/standards/main/Standards/scs-0100-v3-flavor-naming.md
Expand All @@ -48,7 +48,7 @@ versions:
# Unfortunately, no wrapper to run refstack yet, needs to be added
- version: v2
stabilized_at: 2023-03-20
obsoleted_at: 2024-04-30
deprecated_at: 2024-04-30
standards:
- name: Flavor naming
url: https://github.com/SovereignCloudStack/standards/blob/main/Standards/scs-0100-v2-flavor-naming.md
Expand All @@ -64,7 +64,7 @@ versions:
condition: mandatory
- version: v1
stabilized_at: 2021-01-01
obsoleted_at: 2023-10-30
deprecated_at: 2023-10-30
standards:
- name: Flavor naming
url: https://github.com/SovereignCloudStack/standards/blob/main/Standards/scs-0100-v2-flavor-naming.md
Expand Down

0 comments on commit 7578dc1

Please sign in to comment.