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
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:
@@ -225,6 +225,42 @@ def test_harbor_recovery_receipt_surfaces_gitea_queue_blockers() -> None:
|
||||
}
|
||||
|
||||
|
||||
def test_harbor_recovery_receipt_surfaces_cross_workflow_queue_payload() -> None:
|
||||
payload = validate_harbor_registry_controlled_recovery_receipt(
|
||||
{
|
||||
"watchdog_check_output": _watchdog_check_output(
|
||||
ready=True,
|
||||
status=401,
|
||||
),
|
||||
"public_registry_v2_http_status": 401,
|
||||
"internal_registry_v2_http_status": 401,
|
||||
"gitea_actions_queue_readback": _gitea_queue_cross_workflow_jobs(),
|
||||
}
|
||||
)
|
||||
|
||||
assert "gitea_queue_harbor_110_repair_jobs_cross_workflow_mismatch" in payload[
|
||||
"active_blockers"
|
||||
]
|
||||
assert "gitea_queue_harbor_110_repair_jobs_stale_or_mismatched" in payload[
|
||||
"active_blockers"
|
||||
]
|
||||
queue = payload["readback"]["gitea_actions_queue"]
|
||||
assert queue["harbor_110_repair_jobs_cross_workflow_mismatch"] is True
|
||||
assert queue["harbor_110_repair_jobs_payload_classifier"] == (
|
||||
"cd_workflow_jobs_returned_for_harbor_110_repair_run"
|
||||
)
|
||||
assert queue["harbor_110_repair_jobs_expected_names"] == [
|
||||
"harbor-110-local-repair",
|
||||
"workflow-shape",
|
||||
]
|
||||
assert payload["rollups"][
|
||||
"gitea_queue_harbor_110_jobs_cross_workflow_mismatch"
|
||||
] is True
|
||||
assert payload["rollups"]["gitea_queue_harbor_110_jobs_payload_classifier"] == (
|
||||
"cd_workflow_jobs_returned_for_harbor_110_repair_run"
|
||||
)
|
||||
|
||||
|
||||
def test_harbor_recovery_receipt_waits_for_deploy_marker_readback() -> None:
|
||||
payload = validate_harbor_registry_controlled_recovery_receipt(
|
||||
{
|
||||
@@ -464,6 +500,37 @@ def _gitea_queue_no_matching_runner() -> dict:
|
||||
}
|
||||
|
||||
|
||||
def _gitea_queue_cross_workflow_jobs() -> dict:
|
||||
payload = _gitea_queue_no_matching_runner()
|
||||
payload["readback"].update(
|
||||
{
|
||||
"harbor_110_repair_jobs_cross_workflow_mismatch": True,
|
||||
"harbor_110_repair_jobs_payload_classifier": (
|
||||
"cd_workflow_jobs_returned_for_harbor_110_repair_run"
|
||||
),
|
||||
"harbor_110_repair_jobs_expected_names": [
|
||||
"harbor-110-local-repair",
|
||||
"workflow-shape",
|
||||
],
|
||||
"harbor_110_repair_jobs_unexpected_names": [
|
||||
"build-and-deploy",
|
||||
"post-deploy-checks",
|
||||
"tests",
|
||||
],
|
||||
"harbor_110_repair_jobs_labels": ["awoooi-host"],
|
||||
}
|
||||
)
|
||||
payload["rollups"].update(
|
||||
{
|
||||
"harbor_110_repair_jobs_cross_workflow_mismatch": True,
|
||||
"harbor_110_repair_jobs_payload_classifier": (
|
||||
"cd_workflow_jobs_returned_for_harbor_110_repair_run"
|
||||
),
|
||||
}
|
||||
)
|
||||
return payload
|
||||
|
||||
|
||||
def _deploy_marker_verified() -> dict:
|
||||
return {
|
||||
"schema_version": "awoooi_production_deploy_readback_blocker_v1",
|
||||
|
||||
Reference in New Issue
Block a user