Add cooperative task recovery and persistent live status
Build custom container images / build (map[base_image:php:8-fpm-alpine build_args:PHP_VERSION=8 context:php8-pgsql fingerprint_command:{ apk info -v | LC_ALL=C sort; find /usr/local/lib/php/extensions /usr/local/etc/php/conf.d -type f -exec sha256sum {} + | LC_ALL=C sort; } name:ph… (push) Successful in 40s
Build custom container images / build (map[base_image:postgres:18 build_args:PG_VERSION=18 POSTGIS_VERSION=3 VCHORD_VERSION=0.5.3 context:postgres fingerprint_command:{ dpkg-query -W -f='${binary:Package}=${Version}\n' | LC_ALL=C sort; find /usr/lib/postgresql -type f -exec sha256su… (push) Successful in 49s
Build custom container images / build (map[base_image:python:3 build_args:PYTHON_VERSION=3 context:python-tools fingerprint_command:{ dpkg-query -W -f='${binary:Package}=${Version}\n' | LC_ALL=C sort; pip freeze | LC_ALL=C sort; } name:python-tools oci_labels:org.opencontainers.ima… (push) Successful in 1m37s
Build custom container images / build (map[base_image:python:3.12-slim build_args:PYTHON_VERSION=3.12-slim context:linkki-tiedotus fingerprint_command:{ dpkg-query -W -f='${binary:Package}=${Version}\n' | LC_ALL=C sort; pip freeze | LC_ALL=C sort; } name:linkki-tiedotus oci_labels:… (push) Successful in 36s
Build custom container images / build (map[base_image:python:3.12-slim build_args:PYTHON_VERSION=3.12-slim context:timepoll fingerprint_command:{ dpkg-query -W -f='${binary:Package}=${Version}\n' | LC_ALL=C sort; pip freeze | LC_ALL=C sort; } name:timepoll oci_labels:org.opencontai… (push) Successful in 42s

This commit is contained in:
ajp_anton committed 2026-10-29 22:12:04 +00:00
1 parent 034fecbd51
commit 3bfd199b9c
28 files changed
+2356 -172

No files matched your search

+1
View File
@@ -8,6 +8,7 @@
<li>
<a href="{{ url_for('run_detail', run_id=run.id) }}">Run #{{ run.id }}</a>
· {{ run.status }}
{% if run.recovery_of_run_id is not none %}· recovery of <a href="{{ url_for('run_detail', run_id=run.recovery_of_run_id) }}">#{{ run.recovery_of_run_id }}</a>{% endif %}
· {{ run.created_at|timestamp }}
{% if run.exit_code is not none %}· exit {{ run.exit_code }}{% endif %}
</li>
+17 -7
View File
@@ -1,6 +1,8 @@
{% extends "base.html" %}
{% from "task_status.html" import task_status, live_state_data %}
{% block content %}
<h1>Tasks</h1>
{{ live_state_data(live_states) }}
{% if not groups %}
<p>No task groups found.</p>
{% endif %}
@@ -10,8 +12,12 @@
<div class="group-heading">
<h2>{{ group.display_name }}</h2>
{% if group.can_run_as_group %}
<form method="post" action="{{ url_for('run_group', group_id=group.id) }}">
<button type="submit">Run group</button>
{% set group_state = live_states.groups[group.id] %}
<form method="post" action="{{ url_for('run_group', group_id=group.id) }}" data-group-id="{{ group.id }}">
<fieldset class="task-controls"{% if group_state.active_run or group_state.blocked_by %} disabled{% endif %}>
<button type="submit">Run group</button>
</fieldset>
{{ task_status(group_state) }}
</form>
{% endif %}
</div>
@@ -24,6 +30,8 @@
<ul class="tasks">
{% for task in group.tasks %}
{% set task_run = latest[("task", task.id)] %}
{% set state = live_states.tasks[task.id] %}
{% set busy = state.active_run or state.blocked_by %}
<li class="task">
<div class="task-details">
<h3>{{ task.display_name }}</h3>
@@ -37,9 +45,10 @@
</p>
{% endif %}
</div>
<form class="task-form" method="post" action="{{ url_for('run_task', task_id=task.id) }}" enctype="multipart/form-data"{% if task.wait_for_result %} data-wait-for-result{% endif %}{% if task.download_artifacts %} data-download-artifacts{% endif %}>
<form class="task-form{% if state.active_run %} is-waiting{% endif %}" data-task-id="{{ task.id }}" method="post" action="{{ url_for('run_task', task_id=task.id) }}" enctype="multipart/form-data"{% if task.wait_for_result %} data-wait-for-result{% endif %}{% if task.download_artifacts %} data-download-artifacts{% endif %}>
{% set values = form_values.get(task.id, {}) %}
{% set errors = input_errors.get(task.id, {}) %}
<fieldset class="task-controls"{% if busy %} disabled{% endif %}>
<div class="task-options">
{% for field in task.inputs %}
{% if not task.execution or field.name != task.execution.field.name %}
@@ -101,9 +110,9 @@
<input type="hidden" name="{{ execution.name }}" value="{{ selected }}" data-execution-value>
<button class="split-primary" type="submit">
<span class="button-label">{{ selected_option.label if selected_option else execution.options[0].label }}</span>
{% if task.wait_for_result %}<span class="spinner" aria-hidden="true"></span>{% endif %}
<span class="spinner" aria-hidden="true"></span>
</button>
<details class="split-menu">
<details class="split-menu"{% if busy %} inert{% endif %}>
<summary aria-label="Choose run mode" title="Choose run mode">&#9662;</summary>
<div class="split-menu-options">
{% for option in execution.options %}
@@ -115,11 +124,12 @@
{% else %}
<button type="submit">
<span class="button-label">Run</span>
{% if task.wait_for_result %}<span class="spinner" aria-hidden="true"></span>{% endif %}
<span class="spinner" aria-hidden="true"></span>
</button>
{% endif %}
</div>
{% if task.wait_for_result %}<p class="task-result" aria-live="polite"></p>{% endif %}
</fieldset>
{{ task_status(state) }}
</form>
</li>
{% else %}
+12 -3
View File
@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% from "task_status.html" import task_status, live_state_data %}
{% block title %}Run {{ run.id }} · Server Maintenance{% endblock %}
{% block content %}
<p>
@@ -8,7 +9,10 @@
<h1>{{ run.target_kind|title }} run #{{ run.id }}</h1>
<dl>
<dt>Target</dt><dd>{{ run.target_path }}</dd>
<dt>Status</dt><dd id="run-status" data-state-url="{{ url_for('run_state', run_id=run.id) }}">{{ run.status }}</dd>
<dt>Status</dt><dd id="run-status" data-run-status="{{ run.status }}" data-state-url="{{ url_for('run_state', run_id=run.id) }}">{{ display_status }}</dd>
<dt>Progress</dt><dd id="run-progress" class="run-progress">{{ progress or "—" }}</dd>
{% if run.recovery_of_run_id is not none %}<dt>Recovery of</dt><dd><a href="{{ url_for('run_detail', run_id=run.recovery_of_run_id) }}">Run #{{ run.recovery_of_run_id }}</a></dd>{% endif %}
{% if recovery_run %}<dt>Recovery run</dt><dd><a href="{{ recovery_run.detail_url }}">Run #{{ recovery_run.run_id }}</a> · {{ recovery_run.display_status }}</dd>{% endif %}
<dt>Started</dt><dd>{{ run.started_at|timestamp }}</dd>
<dt>Finished</dt><dd>{{ run.finished_at|timestamp }}</dd>
<dt>Exit code</dt><dd>{{ run.exit_code if run.exit_code is not none else "—" }}</dd>
@@ -20,8 +24,13 @@
</form>
{% endif %}
{% if execution_task %}
<form method="post" action="{{ url_for('execute_dry_run', run_id=run.id) }}">
<button type="submit">{{ execution_task.execution.field.options[1].label }}</button>
{{ live_state_data(live_states) }}
{% set state = live_states.tasks[execution_task.id] %}
<form method="post" action="{{ url_for('execute_dry_run', run_id=run.id) }}" data-task-id="{{ execution_task.id }}">
<fieldset class="task-controls"{% if state.active_run or state.blocked_by %} disabled{% endif %}>
<button type="submit">{{ execution_task.execution.field.options[1].label }}</button>
</fieldset>
{{ task_status(state) }}
</form>
{% endif %}
{% if children %}
+13
View File
@@ -0,0 +1,13 @@
{% macro task_status(state) %}
{% set active = state.active_run %}
{% set blocker = state.blocked_by %}
<p class="task-result {{ 'running' if active else 'blocked' if blocker else '' }}" aria-live="polite"{% if not active and not blocker %} hidden{% endif %}>
<span class="task-message">{% if active %}{{ active.display_status|capitalize }}. <a href="{{ active.detail_url }}">Run #{{ active.run_id }}</a>{% elif blocker %}Blocked by <a href="{{ blocker.detail_url }}">run #{{ blocker.run_id }}</a> ({{ blocker.display_status }}).{% endif %}</span>
<span class="task-progress">{{ state.progress if active else '' }}</span>
</p>
{% endmacro %}
{% macro live_state_data(states) %}
<p id="task-status-error" role="status" hidden></p>
<script id="task-states" type="application/json" data-state-url="{{ url_for('tasks_state') }}">{{ states|tojson }}</script>
{% endmacro %}
+10
View File
@@ -0,0 +1,10 @@
{% extends "base.html" %}
{% block title %}Task unavailable · Server Maintenance{% endblock %}
{% block content %}
<p><a href="{{ url_for('index') }}">Tasks</a></p>
<h1>Task unavailable</h1>
<p>{{ message }}</p>
{% if blocking_run %}
<p><a href="{{ blocking_run.detail_url }}">View run #{{ blocking_run.run_id }}</a></p>
{% endif %}
{% endblock %}