Preserve task description line breaks and expose run history
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 38s
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 46s
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 1m10s
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 25s
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 33s
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 38s
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 46s
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 1m10s
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 25s
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 33s
This commit is contained in:
1 parent
02af6cef4f
commit
0aa67439fd
5 files changed
+36
-1
No files matched your search
@@ -108,6 +108,8 @@ the main part to use its current mode, or use the arrow to select the other
|
||||
mode. A successful review run can be repeated with its saved inputs in the
|
||||
execution mode from the run-detail page. The task must still revalidate the
|
||||
live filesystem before changing anything.
|
||||
Execution creates a separate run; the original review and its output remain
|
||||
accessible through Run history on either run's detail page.
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
@@ -57,6 +57,10 @@ a {
|
||||
margin: .2rem 0;
|
||||
}
|
||||
|
||||
.task-details > p:not(.run-summary) {
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.task-form {
|
||||
align-items: end;
|
||||
display: grid;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Run {{ run.id }} · Server Maintenance{% endblock %}
|
||||
{% block content %}
|
||||
<p><a href="{{ url_for('index') }}">← Tasks</a></p>
|
||||
<p>
|
||||
<a href="{{ url_for('index') }}">← Tasks</a>
|
||||
· <a href="{{ url_for('history', target_kind=run.target_kind, target_path=run.target_path) }}">Run history</a>
|
||||
</p>
|
||||
<h1>{{ run.target_kind|title }} run #{{ run.id }}</h1>
|
||||
<dl>
|
||||
<dt>Target</dt><dd>{{ run.target_path }}</dd>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import json
|
||||
|
||||
from app.web import create_app
|
||||
from .conftest import write_task
|
||||
|
||||
|
||||
def test_description_line_breaks_are_preserved_and_html_is_escaped(settings):
|
||||
task = write_task(settings.task_root, "example", "inspect.py", 'print("done")\n')
|
||||
manifest = {"version": 1, "tasks": {task.name: {
|
||||
"description": "First line.\nSecond line.\n\n<script>Not HTML</script>",
|
||||
}}}
|
||||
(task.parent / "task-inputs.json").write_text(json.dumps(manifest))
|
||||
client = create_app(settings).test_client()
|
||||
response = client.get("/")
|
||||
assert response.status_code == 200
|
||||
assert b"First line.\nSecond line.\n\n<script>Not HTML</script>" in response.data
|
||||
stylesheet = client.get("/static/style.css")
|
||||
assert b".task-details > p:not(.run-summary) {\n white-space: pre-line;" in stylesheet.data
|
||||
@@ -252,6 +252,14 @@ print(Path(os.environ["SERVER_MAINTENANCE_INPUT"]).read_text())
|
||||
executed = app.extensions["run_store"].get(executed_id)
|
||||
assert executed is not None
|
||||
assert executed.input_json == '{"mode":"apply"}'
|
||||
assert executed_id != run_id
|
||||
assert app.extensions["run_store"].get(run_id).input_json == '{"mode":"report"}'
|
||||
assert '"mode":"report"' in client.get(f"/runs/{run_id}/output").get_json()["output"]
|
||||
executed_detail = client.get(f"/runs/{executed_id}")
|
||||
assert b'href="/history/task/examples/migrate.py"' in executed_detail.data
|
||||
history = client.get("/history/task/examples/migrate.py")
|
||||
assert f"/runs/{run_id}".encode() in history.data
|
||||
assert f"/runs/{executed_id}".encode() in history.data
|
||||
|
||||
|
||||
def test_successful_task_artifact_can_be_downloaded_once(settings) -> None:
|
||||
|
||||
Reference in new issue
Block a user