fix(reboot): promote windows99 nested runtime 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 1m3s
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 1m3s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -678,12 +678,25 @@ def _apply_prometheus_windows99_vmware_readback(
|
||||
metric_readback.get("windows99_windows_update_no_auto_reboot_ready") is True
|
||||
)
|
||||
windows99 = _dict(payload.setdefault("windows99_vmware_autostart", {}))
|
||||
source_service_blockers = _strings(windows99.get("service_blockers"))
|
||||
source_policy_blockers = _strings(windows99.get("policy_blockers"))
|
||||
source_task = _dict(windows99.get("autostart_task"))
|
||||
source_config_blocked = bool(source_service_blockers) or (
|
||||
bool(source_task) and source_task.get("ok") is not True
|
||||
)
|
||||
if source_config_blocked:
|
||||
windows99_blockers.append("windows99_vmware_autostart_config_not_ready")
|
||||
if source_policy_blockers:
|
||||
windows99_blockers.append("windows99_update_no_auto_reboot_policy_not_ready")
|
||||
update_ready = False
|
||||
windows99_blockers = _unique_strings(windows99_blockers)
|
||||
config_ready = not missing_vmx_aliases and not source_config_blocked
|
||||
windows99.update(
|
||||
{
|
||||
"readback_present": True,
|
||||
"verify_ready": verify_ready,
|
||||
"vmrun_present": True,
|
||||
"config_ready": not missing_vmx_aliases,
|
||||
"config_ready": config_ready,
|
||||
"power_ready": not powered_off_aliases,
|
||||
"windows_update_no_auto_reboot_ready": update_ready,
|
||||
"missing_vmx_aliases": missing_vmx_aliases,
|
||||
@@ -705,7 +718,7 @@ def _apply_prometheus_windows99_vmware_readback(
|
||||
readback["windows99_vmware_readback_present"] = True
|
||||
readback["windows99_vmware_verify_ready"] = verify_ready
|
||||
readback["windows99_vmrun_present"] = True
|
||||
readback["windows99_vmware_config_ready"] = not missing_vmx_aliases
|
||||
readback["windows99_vmware_config_ready"] = config_ready
|
||||
readback["windows99_vmware_power_ready"] = not powered_off_aliases
|
||||
readback["windows99_update_no_auto_reboot_ready"] = update_ready
|
||||
readback["windows99_runtime_metric_overlay_applied"] = True
|
||||
@@ -736,7 +749,7 @@ def _apply_prometheus_windows99_vmware_readback(
|
||||
rollups = _dict(payload.setdefault("rollups", {}))
|
||||
rollups["windows99_vmware_readback_present"] = True
|
||||
rollups["windows99_vmrun_present"] = True
|
||||
rollups["windows99_vmware_config_ready"] = not missing_vmx_aliases
|
||||
rollups["windows99_vmware_config_ready"] = config_ready
|
||||
rollups["windows99_vmware_power_ready"] = not powered_off_aliases
|
||||
rollups["windows99_vmware_verify_ready"] = verify_ready
|
||||
rollups["windows99_update_no_auto_reboot_ready"] = update_ready
|
||||
@@ -849,12 +862,19 @@ def _add_runtime_readback_active_blockers_missing_from_metric(
|
||||
) -> list[str]:
|
||||
service_backup = _dict(payload.get("controlled_service_data_backup_readback"))
|
||||
blocking_fields = _strings(service_backup.get("blocking_fields"))
|
||||
windows99 = _dict(payload.get("windows99_vmware_autostart"))
|
||||
windows99_blockers = _strings(windows99.get("blockers"))
|
||||
added = _unique_strings(
|
||||
[
|
||||
_SERVICE_DATA_BACKUP_BLOCKING_FIELD_BLOCKERS[field]
|
||||
for field in blocking_fields
|
||||
if field in _SERVICE_DATA_BACKUP_BLOCKING_FIELD_BLOCKERS
|
||||
]
|
||||
+ [
|
||||
blocker
|
||||
for blocker in windows99_blockers
|
||||
if blocker.startswith("windows99_")
|
||||
]
|
||||
)
|
||||
if not added:
|
||||
return _unique_strings(active_blockers)
|
||||
|
||||
Reference in New Issue
Block a user