Prepare RC.6 with an approved strict-unavailable gate
This commit is contained in:
1 parent
ed86796d6b
commit
6cfdd811b4
11 files changed
+112
-49
No files matched your search
@@ -7,10 +7,9 @@ does not query CI and cannot turn an UNVERIFIED gate into a release.
|
||||
|
||||
The `rc` profile requires every gate on the target SHA. For a Linux-only RC,
|
||||
Windows and macOS must be explicitly UNSUPPORTED; the stable profile requires
|
||||
both to PASS. Strict VM, extension, clean install, version compatibility and
|
||||
performance require PASS. RC can record a shared-node performance WARN only
|
||||
with an explicit maintainer approval reference. The historical beta profile
|
||||
retains its own scoped exceptions.
|
||||
both to PASS. An RC can record strict as UNSUPPORTED with same-SHA fail-closed
|
||||
evidence and can record a measured shared-node performance WARN. Each
|
||||
exception requires an explicit maintainer approval reference.
|
||||
|
||||
Gate spec: `name=STATE:tested_sha:run_url` (url may contain colons).
|
||||
|
||||
@@ -106,6 +105,7 @@ def build_manifest(
|
||||
gates: list[str],
|
||||
profile: str = "stable",
|
||||
rc_shared_performance_approval: str = "",
|
||||
rc_strict_unsupported_approval: str = "",
|
||||
) -> dict:
|
||||
if not SHA_RE.fullmatch(target_sha):
|
||||
raise ValueError(f"target SHA must be 40 lowercase hex characters: {target_sha!r}")
|
||||
@@ -114,10 +114,13 @@ def build_manifest(
|
||||
except KeyError:
|
||||
raise ValueError(f"unknown profile {profile!r}; expected {sorted(PROFILES)}") from None
|
||||
approval = rc_shared_performance_approval.strip()
|
||||
if approval and profile != "rc":
|
||||
raise ValueError("shared-node approval is supported only by the rc profile")
|
||||
strict_approval = rc_strict_unsupported_approval.strip()
|
||||
if (approval or strict_approval) and profile != "rc":
|
||||
raise ValueError("RC exception approvals are supported only by the rc profile")
|
||||
if approval:
|
||||
accepted_states = {**accepted_states, "performance": {"PASS", "WARN"}}
|
||||
if strict_approval:
|
||||
accepted_states = {**accepted_states, "strict_vm": {"PASS", "UNSUPPORTED"}}
|
||||
parsed = {}
|
||||
for spec in gates:
|
||||
name, gate = parse_gate(spec)
|
||||
@@ -150,6 +153,8 @@ def build_manifest(
|
||||
recorded = utc_now()
|
||||
if approval and parsed["performance"]["state"] == "WARN":
|
||||
parsed["performance"]["rc_shared_node_approval"] = approval
|
||||
if strict_approval and parsed["strict_vm"]["state"] == "UNSUPPORTED":
|
||||
parsed["strict_vm"]["rc_unsupported_approval"] = strict_approval
|
||||
return {
|
||||
"schema": SCHEMA,
|
||||
"profile": profile,
|
||||
@@ -178,6 +183,11 @@ def main(argv: list[str]) -> int:
|
||||
default="",
|
||||
help="maintainer approval reference for the measured shared-node RC performance WARN",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--rc-strict-unsupported-approval",
|
||||
default="",
|
||||
help="maintainer approval reference for same-SHA fail-closed strict evidence on an RC",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--require-release",
|
||||
action="store_true",
|
||||
@@ -186,7 +196,8 @@ def main(argv: list[str]) -> int:
|
||||
args = parser.parse_args(argv)
|
||||
try:
|
||||
manifest = build_manifest(
|
||||
args.target_sha, args.gate, args.profile, args.rc_shared_performance_approval
|
||||
args.target_sha, args.gate, args.profile, args.rc_shared_performance_approval,
|
||||
args.rc_strict_unsupported_approval,
|
||||
)
|
||||
except ValueError as error:
|
||||
print(f"error: {error}", file=sys.stderr)
|
||||
|
||||
@@ -95,6 +95,34 @@ class ReleaseEvidenceTests(unittest.TestCase):
|
||||
with self.assertRaises(ValueError):
|
||||
release_evidence.build_manifest(SHA, inputs, "stable", approval)
|
||||
|
||||
def test_rc_strict_unsupported_requires_same_sha_evidence_and_approval(self) -> None:
|
||||
approval = "release notes: maintainer approved strict unsupported for this RC"
|
||||
inputs = [spec for spec in self.rc_gates() if not spec.startswith("strict_vm=")]
|
||||
manifest = release_evidence.build_manifest(
|
||||
SHA, inputs + [gate("strict_vm", "UNSUPPORTED")], "rc",
|
||||
rc_strict_unsupported_approval=approval,
|
||||
)
|
||||
self.assertEqual(manifest["release_decision"], "RC_RELEASE_CANDIDATE")
|
||||
self.assertEqual(manifest["gates"]["strict_vm"]["state"], "UNSUPPORTED")
|
||||
self.assertEqual(manifest["gates"]["strict_vm"]["rc_unsupported_approval"], approval)
|
||||
for entry in (gate("strict_vm", "UNSUPPORTED", OTHER),
|
||||
gate("strict_vm", "UNSUPPORTED", url=""),
|
||||
gate("strict_vm", "FAIL"), gate("strict_vm", "UNVERIFIED")):
|
||||
with self.subTest(entry=entry):
|
||||
result = release_evidence.build_manifest(
|
||||
SHA, inputs + [entry], "rc", rc_strict_unsupported_approval=approval,
|
||||
)
|
||||
self.assertEqual(result["release_decision"], "DO_NOT_RELEASE")
|
||||
|
||||
def test_stable_rejects_rc_strict_exception(self) -> None:
|
||||
inputs = [gate(name, "UNSUPPORTED" if name == "strict_vm" else "PASS")
|
||||
for name in release_evidence.GATES]
|
||||
result = release_evidence.build_manifest(SHA, inputs)
|
||||
self.assertEqual(result["release_decision"], "DO_NOT_RELEASE")
|
||||
with self.assertRaises(ValueError):
|
||||
release_evidence.build_manifest(SHA, inputs,
|
||||
rc_strict_unsupported_approval="RC approval")
|
||||
|
||||
def test_stable_requires_extension_install_version_and_performance(self) -> None:
|
||||
names = ("extension", "clean_install", "version_compat", "performance")
|
||||
for name in names:
|
||||
|
||||
Reference in new issue
Block a user