fix(recovery): classify harbor repair cross-workflow jobs
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 35s
CD Pipeline / build-and-deploy (push) Failing after 2m38s
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 0s
CD Pipeline / post-deploy-checks (push) Has been skipped
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Has been cancelled

This commit is contained in:
Your Name
2026-07-01 07:37:59 +08:00
parent 57df8602f5
commit 77f9bb0417
4 changed files with 205 additions and 0 deletions

View File

@@ -170,6 +170,12 @@ def validate_harbor_registry_controlled_recovery_receipt(
"gitea_queue_harbor_110_jobs_stale_or_mismatched": gitea_queue[
"harbor_110_repair_jobs_stale_or_mismatched"
],
"gitea_queue_harbor_110_jobs_cross_workflow_mismatch": gitea_queue[
"harbor_110_repair_jobs_cross_workflow_mismatch"
],
"gitea_queue_harbor_110_jobs_payload_classifier": gitea_queue[
"harbor_110_repair_jobs_payload_classifier"
],
"gitea_queue_latest_cd_run_status": gitea_queue[
"latest_visible_cd_run_status"
],
@@ -535,6 +541,9 @@ def _gitea_queue_readback(value: Any) -> dict[str, Any]:
"harbor_110_repair_waiting": False,
"harbor_110_repair_blocked": False,
"harbor_110_repair_jobs_stale_or_mismatched": False,
"harbor_110_repair_jobs_cross_workflow_mismatch": False,
"harbor_110_repair_jobs_payload_classifier": "",
"harbor_110_repair_jobs_expected_names": [],
"harbor_110_repair_jobs_unexpected_names": [],
"harbor_110_repair_jobs_labels": [],
"harbor_110_repair_jobs_runner_names": [],
@@ -558,6 +567,10 @@ def _gitea_queue_readback(value: Any) -> dict[str, Any]:
rollups.get("harbor_110_repair_jobs_stale_or_mismatched") is True
or readback.get("harbor_110_repair_jobs_stale_or_mismatched") is True
)
jobs_cross_workflow = bool(
rollups.get("harbor_110_repair_jobs_cross_workflow_mismatch") is True
or readback.get("harbor_110_repair_jobs_cross_workflow_mismatch") is True
)
waiting = bool(
rollups.get("harbor_110_repair_waiting") is True
or readback.get("latest_visible_harbor_110_repair_waiting") is True
@@ -598,6 +611,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,
jobs_cross_workflow=jobs_cross_workflow,
current_cd_harbor_retrying=current_cd_harbor_retrying,
blocked=blocked,
boundary_violation=boundary_violation,
@@ -629,6 +643,15 @@ def _gitea_queue_readback(value: Any) -> dict[str, Any]:
"harbor_110_repair_waiting": waiting,
"harbor_110_repair_blocked": blocked,
"harbor_110_repair_jobs_stale_or_mismatched": jobs_stale,
"harbor_110_repair_jobs_cross_workflow_mismatch": jobs_cross_workflow,
"harbor_110_repair_jobs_payload_classifier": str(
rollups.get("harbor_110_repair_jobs_payload_classifier")
or readback.get("harbor_110_repair_jobs_payload_classifier")
or ""
),
"harbor_110_repair_jobs_expected_names": _strings(
readback.get("harbor_110_repair_jobs_expected_names")
),
"harbor_110_repair_jobs_unexpected_names": _strings(
readback.get("harbor_110_repair_jobs_unexpected_names")
),
@@ -651,6 +674,7 @@ def _gitea_queue_blockers(
*,
no_matching_runner: bool,
jobs_stale: bool,
jobs_cross_workflow: bool,
current_cd_harbor_retrying: bool,
blocked: bool,
boundary_violation: bool,
@@ -662,6 +686,8 @@ def _gitea_queue_blockers(
blockers.append("gitea_queue_harbor_110_repair_no_matching_runner")
elif blocked:
blockers.append("gitea_queue_harbor_110_repair_blocked")
if jobs_cross_workflow:
blockers.append("gitea_queue_harbor_110_repair_jobs_cross_workflow_mismatch")
if jobs_stale:
blockers.append("gitea_queue_harbor_110_repair_jobs_stale_or_mismatched")
if boundary_violation: