fix(recovery): expose reboot slo machine readback
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 33s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 33s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -42,9 +42,10 @@ def _build_payload(scorecard: dict[str, Any], path: Path) -> dict[str, Any]:
|
||||
host_boot_detection = _dict(scorecard.get("host_boot_detection"))
|
||||
post_reboot_readiness = _dict(scorecard.get("post_reboot_readiness"))
|
||||
stockplatform = _dict(scorecard.get("stockplatform_data_freshness"))
|
||||
source_controls = _dict(scorecard.get("source_controls"))
|
||||
active_blockers = _strings(scorecard.get("active_blockers"))
|
||||
required_checks = {
|
||||
"source_controls_present": all(_dict(scorecard.get("source_controls")).values()),
|
||||
"source_controls_present": all(source_controls.values()),
|
||||
"required_hosts_observed": not _strings(host_boot_detection.get("missing_hosts")),
|
||||
"required_hosts_reachable": not _strings(host_boot_detection.get("unreachable_hosts")),
|
||||
"service_green": post_reboot_readiness.get("service_green") is True,
|
||||
@@ -66,6 +67,8 @@ def _build_payload(scorecard: dict[str, Any], path: Path) -> dict[str, Any]:
|
||||
can_claim_slo = (
|
||||
scorecard.get("can_claim_all_services_recovered_within_target") is True
|
||||
)
|
||||
if can_claim_slo and not active_blockers:
|
||||
readiness_percent = 100
|
||||
latest_verify_metric = _dict(scorecard.get("latest_verify_only_metric"))
|
||||
active_blocker_count = len(active_blockers)
|
||||
observed_host_count = len(_strings(host_boot_detection.get("observed_hosts")))
|
||||
@@ -174,6 +177,7 @@ def _build_payload(scorecard: dict[str, Any], path: Path) -> dict[str, Any]:
|
||||
"host_boot_detection": host_boot_detection,
|
||||
"post_reboot_readiness": post_reboot_readiness,
|
||||
"stockplatform_data_freshness": stockplatform,
|
||||
"source_controls": source_controls,
|
||||
"active_blockers": active_blockers,
|
||||
"required_checks": required_checks,
|
||||
"rollups": rollups,
|
||||
|
||||
Reference in New Issue
Block a user