feat(runner): expose ordered non110 closure progress [skip ci]

This commit is contained in:
Your Name
2026-06-29 11:07:59 +08:00
parent f3634db184
commit 1ca806fd5d
8 changed files with 419 additions and 65 deletions

View File

@@ -244,6 +244,48 @@ def build_delivery_closure_workbench(
"non110_runner_cd_closure_required"
)
is True,
"non110_runner_cd_closure_ordered_step_count": _int(
production_deploy_readback.get(
"non110_runner_cd_closure_ordered_step_count"
)
),
"non110_runner_cd_closure_ordered_completed_prefix_count": _int(
production_deploy_readback.get(
"non110_runner_cd_closure_ordered_completed_prefix_count"
)
),
"non110_runner_cd_closure_evidence_completed_step_count": _int(
production_deploy_readback.get(
"non110_runner_cd_closure_evidence_completed_step_count"
)
),
"non110_runner_cd_closure_ordered_completion_percent": _int(
production_deploy_readback.get(
"non110_runner_cd_closure_ordered_completion_percent"
)
),
"non110_runner_cd_closure_evidence_completion_percent": _int(
production_deploy_readback.get(
"non110_runner_cd_closure_evidence_completion_percent"
)
),
"non110_runner_cd_closure_next_blocked_step_index": _int(
production_deploy_readback.get(
"non110_runner_cd_closure_next_blocked_step_index"
)
),
"non110_runner_cd_closure_next_blocked_step_id": str(
production_deploy_readback.get(
"non110_runner_cd_closure_next_blocked_step_id"
)
or ""
),
"non110_runner_cd_closure_next_blocked_step_action": str(
production_deploy_readback.get(
"non110_runner_cd_closure_next_blocked_step_action"
)
or ""
),
"non110_runner_ready": production_deploy_readback.get(
"non110_runner_ready"
)
@@ -633,6 +675,48 @@ def build_delivery_closure_workbench(
production_deploy_readback.get("non110_runner_cd_closure_required")
is True
),
"production_deploy_non110_runner_cd_closure_ordered_step_count": _int(
production_deploy_readback.get(
"non110_runner_cd_closure_ordered_step_count"
)
),
"production_deploy_non110_runner_cd_closure_ordered_completed_prefix_count": _int(
production_deploy_readback.get(
"non110_runner_cd_closure_ordered_completed_prefix_count"
)
),
"production_deploy_non110_runner_cd_closure_evidence_completed_step_count": _int(
production_deploy_readback.get(
"non110_runner_cd_closure_evidence_completed_step_count"
)
),
"production_deploy_non110_runner_cd_closure_ordered_completion_percent": _int(
production_deploy_readback.get(
"non110_runner_cd_closure_ordered_completion_percent"
)
),
"production_deploy_non110_runner_cd_closure_evidence_completion_percent": _int(
production_deploy_readback.get(
"non110_runner_cd_closure_evidence_completion_percent"
)
),
"production_deploy_non110_runner_cd_closure_next_blocked_step_index": _int(
production_deploy_readback.get(
"non110_runner_cd_closure_next_blocked_step_index"
)
),
"production_deploy_non110_runner_cd_closure_next_blocked_step_id": str(
production_deploy_readback.get(
"non110_runner_cd_closure_next_blocked_step_id"
)
or ""
),
"production_deploy_non110_runner_cd_closure_next_blocked_step_action": str(
production_deploy_readback.get(
"non110_runner_cd_closure_next_blocked_step_action"
)
or ""
),
"production_deploy_non110_runner_ready": production_deploy_readback.get(
"non110_runner_ready"
)

View File

@@ -44,7 +44,7 @@ def test_delivery_closure_workbench_endpoint_returns_product_summary():
data["summary"]["production_deploy_dispatch_without_token_message"]
== "token is required"
)
assert data["summary"]["production_deploy_hard_blocker_count"] == 4
assert data["summary"]["production_deploy_hard_blocker_count"] == 3
assert data["summary"]["production_deploy_latest_visible_cd_run_id"] == "3853"
assert data["summary"]["production_deploy_latest_visible_cd_run_status"] == (
"Waiting"
@@ -65,23 +65,23 @@ def test_delivery_closure_workbench_endpoint_returns_product_summary():
)
assert (
data["summary"]["production_deploy_latest_visible_waiting_runner_run_id"]
== "3857"
== ""
)
assert (
data["summary"]["production_deploy_latest_visible_waiting_runner_workflow"]
== "ai-technology-watch.yaml"
== ""
)
assert (
data["summary"]["production_deploy_latest_visible_waiting_runner_kind"]
== "Scheduled"
== ""
)
assert (
data["summary"]["production_deploy_latest_visible_waiting_runner_status"]
== "No matching online runner with label: awoooi-non110-ubuntu"
== ""
)
assert (
data["summary"]["production_deploy_latest_visible_waiting_runner_label"]
== "awoooi-non110-ubuntu"
== ""
)
assert (
data["summary"][
@@ -111,6 +111,53 @@ def test_delivery_closure_workbench_endpoint_returns_product_summary():
"ops/runner/verify-awoooi-non110-cd-closure.py"
in data["summary"]["production_deploy_non110_runner_cd_closure_verifier"]
)
assert (
data["summary"][
"production_deploy_non110_runner_cd_closure_ordered_step_count"
]
== 6
)
assert (
data["summary"][
"production_deploy_non110_runner_cd_closure_ordered_completed_prefix_count"
]
== 0
)
assert (
data["summary"][
"production_deploy_non110_runner_cd_closure_evidence_completed_step_count"
]
== 2
)
assert (
data["summary"][
"production_deploy_non110_runner_cd_closure_ordered_completion_percent"
]
== 0
)
assert (
data["summary"][
"production_deploy_non110_runner_cd_closure_evidence_completion_percent"
]
== 33
)
assert (
data["summary"][
"production_deploy_non110_runner_cd_closure_next_blocked_step_index"
]
== 1
)
assert (
data["summary"][
"production_deploy_non110_runner_cd_closure_next_blocked_step_id"
]
== "non110_runner_registration_metadata"
)
assert data["summary"][
"production_deploy_non110_runner_cd_closure_next_blocked_step_action"
] == (
"run_register_awoooi_non110_runner_script_without_printing_token_then_autostart_path_will_enable_service_and_rerun_this_verifier"
)
assert data["summary"]["production_deploy_non110_runner_ready"] is False
assert (
data["summary"][
@@ -243,10 +290,10 @@ def test_delivery_closure_workbench_endpoint_returns_product_summary():
assert lanes["production_deploy"]["status"] == (
"blocked_waiting_authorized_gitea_workflow_dispatch_and_runner_queue"
)
assert lanes["production_deploy"]["blocker_count"] == 4
assert lanes["production_deploy"]["blocker_count"] == 3
assert lanes["production_deploy"]["metric"][
"observed_source_control_main_short_sha"
] == "7191193c71e"
] == "f3634db18477"
assert lanes["production_deploy"]["metric"][
"production_image_tag_short_sha"
] == "af45811e87"
@@ -296,27 +343,27 @@ def test_delivery_closure_workbench_endpoint_returns_product_summary():
)
assert (
lanes["production_deploy"]["metric"]["latest_visible_waiting_runner_run_id"]
== "3857"
== ""
)
assert (
lanes["production_deploy"]["metric"][
"latest_visible_waiting_runner_workflow"
]
== "ai-technology-watch.yaml"
== ""
)
assert (
lanes["production_deploy"]["metric"]["latest_visible_waiting_runner_kind"]
== "Scheduled"
== ""
)
assert (
lanes["production_deploy"]["metric"][
"latest_visible_waiting_runner_status"
]
== "No matching online runner with label: awoooi-non110-ubuntu"
== ""
)
assert (
lanes["production_deploy"]["metric"]["latest_visible_waiting_runner_label"]
== "awoooi-non110-ubuntu"
== ""
)
assert (
lanes["production_deploy"]["metric"][
@@ -346,6 +393,53 @@ def test_delivery_closure_workbench_endpoint_returns_product_summary():
"ops/runner/verify-awoooi-non110-cd-closure.py"
in lanes["production_deploy"]["metric"]["non110_runner_cd_closure_verifier"]
)
assert (
lanes["production_deploy"]["metric"][
"non110_runner_cd_closure_ordered_step_count"
]
== 6
)
assert (
lanes["production_deploy"]["metric"][
"non110_runner_cd_closure_ordered_completed_prefix_count"
]
== 0
)
assert (
lanes["production_deploy"]["metric"][
"non110_runner_cd_closure_evidence_completed_step_count"
]
== 2
)
assert (
lanes["production_deploy"]["metric"][
"non110_runner_cd_closure_ordered_completion_percent"
]
== 0
)
assert (
lanes["production_deploy"]["metric"][
"non110_runner_cd_closure_evidence_completion_percent"
]
== 33
)
assert (
lanes["production_deploy"]["metric"][
"non110_runner_cd_closure_next_blocked_step_index"
]
== 1
)
assert (
lanes["production_deploy"]["metric"][
"non110_runner_cd_closure_next_blocked_step_id"
]
== "non110_runner_registration_metadata"
)
assert lanes["production_deploy"]["metric"][
"non110_runner_cd_closure_next_blocked_step_action"
] == (
"run_register_awoooi_non110_runner_script_without_printing_token_then_autostart_path_will_enable_service_and_rerun_this_verifier"
)
assert lanes["production_deploy"]["metric"]["non110_runner_ready"] is False
assert (
lanes["production_deploy"]["metric"][