Add robust release update and API health checks

This commit introduces a release update mechanism, including candidate detection, asset pre-downloading, and installation workflows with proper state management. Additionally, it implements API health checks both for successful and failure scenarios and adds related unit and e2e tests for enhanced reliability.
This commit is contained in:
Jeppe Bundgaard
2026-05-27 13:24:15 +02:00
parent 1504f1b116
commit d52ceb8513
11 changed files with 9446 additions and 4826 deletions
@@ -2408,11 +2408,20 @@ class selfserve_wash_flow implements selfserve_wash_flow_i
protected function taskUsesProgramPicker(array $task): bool
{
return in_array(
if (in_array(
'PROGRAM_PICKER',
$this->normalizeServiceNames($this->normalizeJsonArray($task['services'] ?? null)),
true
);
)) {
return true;
}
return in_array('program_picker', $this->normalizeButtonList($task['buttons'] ?? null), true);
}
protected function isProgramNumberButton(mixed $button): bool
{
return is_int($button) && $button >= 0 && $button <= 11;
}
protected function dynamicImageButtonSequenceForTask(array $task): array
@@ -2422,7 +2431,15 @@ class selfserve_wash_flow implements selfserve_wash_flow_i
return $buttons;
}
return $this->normalizeButtonList(array_merge(['program_picker'], $buttons));
$sequence = ['program_picker'];
foreach ($buttons as $button) {
if ($button === 'program_picker' || $this->isProgramNumberButton($button)) {
continue;
}
$sequence[] = $button;
}
return $this->normalizeButtonList($sequence);
}
/**