fix(reboot): reconcile green runtime metric blockers
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 1m5s
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 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m5s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -62,6 +62,12 @@ _PUBLIC_MAINTENANCE_BLOCKERS = {
|
||||
"public_route_raw_5xx_without_maintenance_fallback",
|
||||
"public_route_unreachable_without_external_l1_fallback",
|
||||
}
|
||||
_RUNTIME_BOOLEAN_READY_BLOCKERS = {
|
||||
"backup_core_green_not_1": "backup_core_green",
|
||||
"host_188_service_green_not_1": "host_188_service_green",
|
||||
"product_data_green_not_1": "product_data_green",
|
||||
"service_green_not_1": "service_green",
|
||||
}
|
||||
_PROMETHEUS_SOURCE_CONTROLLED_BLOCKERS = {
|
||||
"conversation_event_hot_path_index_migration_source_missing": (
|
||||
"conversation_event_hot_path_index_migration_source_present"
|
||||
@@ -572,6 +578,7 @@ def _reconcile_prometheus_metric_active_blockers_with_runtime_readbacks(
|
||||
payload: dict[str, Any],
|
||||
active_blockers: list[str],
|
||||
) -> list[str]:
|
||||
runtime_ready_blockers: set[str] = set()
|
||||
public_maintenance = _dict(payload.get("public_maintenance_fallback"))
|
||||
public_maintenance_ready = (
|
||||
public_maintenance.get("runtime_readback_present") is True
|
||||
@@ -582,9 +589,19 @@ def _reconcile_prometheus_metric_active_blockers_with_runtime_readbacks(
|
||||
)
|
||||
== 0
|
||||
)
|
||||
runtime_ready_blockers = (
|
||||
_PUBLIC_MAINTENANCE_BLOCKERS if public_maintenance_ready else set()
|
||||
)
|
||||
if public_maintenance_ready:
|
||||
runtime_ready_blockers.update(_PUBLIC_MAINTENANCE_BLOCKERS)
|
||||
|
||||
service_backup = _dict(payload.get("controlled_service_data_backup_readback"))
|
||||
rollups = _dict(payload.get("rollups"))
|
||||
for blocker, ready_key in _RUNTIME_BOOLEAN_READY_BLOCKERS.items():
|
||||
if (
|
||||
payload.get(ready_key) is True
|
||||
or service_backup.get(ready_key) is True
|
||||
or rollups.get(ready_key) is True
|
||||
):
|
||||
runtime_ready_blockers.add(blocker)
|
||||
|
||||
if not runtime_ready_blockers:
|
||||
return _unique_strings(active_blockers)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user