feat(delivery): expose cd runner queue readback
This commit is contained in:
@@ -143,6 +143,15 @@ def build_delivery_closure_workbench(
|
||||
"latest_visible_cd_run_id": str(
|
||||
production_deploy_readback.get("latest_visible_cd_run_id") or ""
|
||||
),
|
||||
"latest_visible_cd_run_status": str(
|
||||
production_deploy_readback.get("latest_visible_cd_run_status")
|
||||
or ""
|
||||
),
|
||||
"latest_visible_cd_run_jobs_total_count": _int(
|
||||
production_deploy_readback.get(
|
||||
"latest_visible_cd_run_jobs_total_count"
|
||||
)
|
||||
),
|
||||
},
|
||||
"href": "/deployments",
|
||||
"next_action": _first_string(production_deploy.get("next_actions")),
|
||||
@@ -331,6 +340,14 @@ def build_delivery_closure_workbench(
|
||||
"production_deploy_latest_visible_cd_run_id": str(
|
||||
production_deploy_readback.get("latest_visible_cd_run_id") or ""
|
||||
),
|
||||
"production_deploy_latest_visible_cd_run_status": str(
|
||||
production_deploy_readback.get("latest_visible_cd_run_status") or ""
|
||||
),
|
||||
"production_deploy_latest_visible_cd_run_jobs_total_count": _int(
|
||||
production_deploy_readback.get(
|
||||
"latest_visible_cd_run_jobs_total_count"
|
||||
)
|
||||
),
|
||||
"github_write_channel_ready": github_preflight.get(
|
||||
"github_write_channel_ready"
|
||||
)
|
||||
|
||||
@@ -36,6 +36,13 @@ def test_delivery_closure_workbench_endpoint_returns_product_summary():
|
||||
)
|
||||
assert data["summary"]["production_deploy_hard_blocker_count"] == 2
|
||||
assert data["summary"]["production_deploy_latest_visible_cd_run_id"] == "3853"
|
||||
assert data["summary"]["production_deploy_latest_visible_cd_run_status"] == (
|
||||
"Waiting"
|
||||
)
|
||||
assert (
|
||||
data["summary"]["production_deploy_latest_visible_cd_run_jobs_total_count"]
|
||||
== 0
|
||||
)
|
||||
assert data["summary"]["github_write_channel_ready"] is False
|
||||
assert data["summary"]["github_account_status"] == "suspended"
|
||||
assert data["summary"]["github_account_suspended"] is True
|
||||
@@ -79,7 +86,7 @@ def test_delivery_closure_workbench_endpoint_returns_product_summary():
|
||||
assert lanes["production_deploy"]["blocker_count"] == 2
|
||||
assert lanes["production_deploy"]["metric"][
|
||||
"observed_source_control_main_short_sha"
|
||||
] == "3900b0b7a779"
|
||||
] == "5f20d654d4dc"
|
||||
assert lanes["production_deploy"]["metric"][
|
||||
"production_image_tag_short_sha"
|
||||
] == "af45811e87"
|
||||
@@ -93,6 +100,16 @@ def test_delivery_closure_workbench_endpoint_returns_product_summary():
|
||||
is False
|
||||
)
|
||||
assert lanes["production_deploy"]["metric"]["latest_visible_cd_run_id"] == "3853"
|
||||
assert (
|
||||
lanes["production_deploy"]["metric"]["latest_visible_cd_run_status"]
|
||||
== "Waiting"
|
||||
)
|
||||
assert (
|
||||
lanes["production_deploy"]["metric"][
|
||||
"latest_visible_cd_run_jobs_total_count"
|
||||
]
|
||||
== 0
|
||||
)
|
||||
assert lanes["github"]["metric"]["kind"] == "private_backup_verified"
|
||||
assert lanes["gitea"]["metric"]["kind"] == "workflow_count"
|
||||
assert lanes["runtime"]["metric"]["kind"] == "surface_count"
|
||||
|
||||
Reference in New Issue
Block a user