Refine Python tools task interface
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 39s
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 53s
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 1m17s

This commit is contained in:
ajp_anton
2026-08-18 04:21:11 +00:00
parent b256147d28
commit 7e6dea8b24
11 changed files with 311 additions and 95 deletions
+20 -9
View File
@@ -210,15 +210,26 @@ def create_app(settings: Settings | None = None) -> Flask:
run = store.get(run_id)
if run is None:
abort(404)
return {
"artifacts": [
{
"name": name,
"url": url_for("download_artifact", run_id=run.id, filename=name),
}
for name in manager.artifacts(run.id)
]
}
artifacts = []
for name in manager.artifacts(run.id):
artifact = {
"name": name,
"url": url_for("download_artifact", run_id=run.id, filename=name),
}
if name.casefold().endswith(".json"):
artifact["view_url"] = url_for("view_artifact", run_id=run.id, filename=name)
artifacts.append(artifact)
return {"artifacts": artifacts}
@app.get("/runs/<int:run_id>/artifacts/<filename>/view")
def view_artifact(run_id: int, filename: str):
run = store.get(run_id)
if run is None or run.status != "succeeded" or not filename.casefold().endswith(".json"):
abort(404)
artifact = manager.artifact_path(run.id, filename)
if artifact is None:
abort(404)
return send_file(artifact, mimetype="application/json", as_attachment=False, conditional=False)
@app.get("/runs/<int:run_id>/artifacts/<filename>")
def download_artifact(run_id: int, filename: str):