fix(agent): surface harbor cd retry receipt blocker
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 36s
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 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 36s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -146,6 +146,15 @@ def validate_harbor_registry_controlled_recovery_receipt(
|
||||
"gitea_queue_harbor_110_repair_run_status": gitea_queue[
|
||||
"latest_visible_harbor_110_repair_run_status"
|
||||
],
|
||||
"gitea_queue_current_cd_inflight_classifier": gitea_queue[
|
||||
"current_cd_inflight_classifier"
|
||||
],
|
||||
"gitea_queue_current_cd_harbor_latest_registry_v2_status": (
|
||||
gitea_queue["current_cd_harbor_latest_registry_v2_status"]
|
||||
),
|
||||
"gitea_queue_current_cd_harbor_retrying_unavailable": gitea_queue[
|
||||
"current_cd_harbor_retrying_unavailable"
|
||||
],
|
||||
"deploy_marker_readback_seen": deploy_marker["receipt_seen"],
|
||||
"deploy_marker_verified": deploy_marker["deploy_marker_verified"],
|
||||
"deploy_marker_blocker_count": deploy_marker["blocker_count"],
|
||||
@@ -372,6 +381,9 @@ def _gitea_queue_readback(value: Any) -> dict[str, Any]:
|
||||
"latest_visible_cd_run_id": "",
|
||||
"latest_visible_cd_run_status": "",
|
||||
"latest_visible_cd_run_commit_sha": "",
|
||||
"current_cd_inflight_classifier": "",
|
||||
"current_cd_harbor_latest_registry_v2_status": "",
|
||||
"current_cd_harbor_retrying_unavailable": False,
|
||||
"latest_visible_harbor_110_repair_run_id": "",
|
||||
"latest_visible_harbor_110_repair_run_status": "",
|
||||
"harbor_110_repair_no_matching_runner_label": "",
|
||||
@@ -410,6 +422,24 @@ def _gitea_queue_readback(value: Any) -> dict[str, Any]:
|
||||
rollups.get("harbor_110_repair_blocked") is True
|
||||
or readback.get("latest_visible_harbor_110_repair_blocked") is True
|
||||
)
|
||||
current_cd_inflight_classifier = str(
|
||||
rollups.get("current_main_cd_inflight_classifier")
|
||||
or readback.get("latest_visible_cd_inflight_classifier")
|
||||
or ""
|
||||
)
|
||||
current_cd_latest_registry_status = str(
|
||||
rollups.get("current_main_cd_harbor_latest_registry_v2_status")
|
||||
or readback.get("latest_visible_cd_harbor_latest_registry_v2_status")
|
||||
or ""
|
||||
)
|
||||
current_cd_harbor_retrying = bool(
|
||||
rollups.get("current_main_cd_harbor_public_route_retrying_unavailable")
|
||||
is True
|
||||
or readback.get("latest_visible_cd_harbor_public_route_retrying_unavailable")
|
||||
is True
|
||||
or current_cd_inflight_classifier
|
||||
== "harbor_registry_public_route_unavailable_pending_retry"
|
||||
)
|
||||
boundary_violation = any(
|
||||
operation_boundaries.get(flag) is True
|
||||
for flag in (
|
||||
@@ -424,6 +454,7 @@ def _gitea_queue_readback(value: Any) -> dict[str, Any]:
|
||||
blockers = _gitea_queue_blockers(
|
||||
no_matching_runner=bool(no_matching_label),
|
||||
jobs_stale=jobs_stale,
|
||||
current_cd_harbor_retrying=current_cd_harbor_retrying,
|
||||
blocked=blocked,
|
||||
boundary_violation=boundary_violation,
|
||||
)
|
||||
@@ -438,6 +469,11 @@ def _gitea_queue_readback(value: Any) -> dict[str, Any]:
|
||||
"latest_visible_cd_run_commit_sha": str(
|
||||
readback.get("latest_visible_cd_run_commit_sha") or ""
|
||||
),
|
||||
"current_cd_inflight_classifier": current_cd_inflight_classifier,
|
||||
"current_cd_harbor_latest_registry_v2_status": (
|
||||
current_cd_latest_registry_status
|
||||
),
|
||||
"current_cd_harbor_retrying_unavailable": current_cd_harbor_retrying,
|
||||
"latest_visible_harbor_110_repair_run_id": str(
|
||||
readback.get("latest_visible_harbor_110_repair_run_id") or ""
|
||||
),
|
||||
@@ -471,10 +507,13 @@ def _gitea_queue_blockers(
|
||||
*,
|
||||
no_matching_runner: bool,
|
||||
jobs_stale: bool,
|
||||
current_cd_harbor_retrying: bool,
|
||||
blocked: bool,
|
||||
boundary_violation: bool,
|
||||
) -> list[str]:
|
||||
blockers: list[str] = []
|
||||
if current_cd_harbor_retrying:
|
||||
blockers.append("gitea_queue_current_cd_harbor_retrying_unavailable")
|
||||
if no_matching_runner:
|
||||
blockers.append("gitea_queue_harbor_110_repair_no_matching_runner")
|
||||
elif blocked:
|
||||
|
||||
Reference in New Issue
Block a user