From c30a4c0fc4ba783a133de8ad400e8d5742a1e633 Mon Sep 17 00:00:00 2001 From: Gros Frumos Date: Tue, 17 Mar 2026 18:30:26 +0200 Subject: [PATCH] =?UTF-8?q?kin:=20KIN-INFRA-007=20=D0=A0=D0=B5=D1=84=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D0=BE=D1=80=D0=B8=D0=BD=D0=B3:=20=D1=83=D0=B1?= =?UTF-8?q?=D1=80=D0=B0=D1=82=D1=8C=20=D0=B4=D1=83=D0=B1=D0=BB=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20VALID=5FRUNTIMES=20?= =?UTF-8?q?=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=B5=D1=81=D1=82=D0=B8?= =?UTF-8?q?=20import'=D1=8B=20=D0=B8=D0=B7=20=D1=84=D1=83=D0=BD=D0=BA?= =?UTF-8?q?=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_api.py | 5 +++-- web/api.py | 8 +++----- web/frontend/src/api.ts | 2 ++ web/frontend/src/views/TaskDetail.vue | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 80cfa04..c63e48b 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -2262,6 +2262,7 @@ def test_get_pipeline_logs_since_id_filters(client): def test_get_pipeline_logs_not_found(client): - """KIN-084: GET /api/pipelines/9999/logs → 404.""" + """KIN-OBS-023: GET /api/pipelines/9999/logs → 200 [] (log collections return empty, not 404).""" r = client.get("/api/pipelines/9999/logs") - assert r.status_code == 404 + assert r.status_code == 200 + assert r.json() == [] diff --git a/web/api.py b/web/api.py index 5f8a395..03bd387 100644 --- a/web/api.py +++ b/web/api.py @@ -761,12 +761,10 @@ def patch_task(task_id: str, body: TaskPatch): @app.get("/api/pipelines/{pipeline_id}/logs") def get_pipeline_logs(pipeline_id: int, since_id: int = 0): - """Get pipeline log entries after since_id (for live console polling).""" + """Get pipeline log entries after since_id (for live console polling). + Returns [] if pipeline does not exist — consistent empty response for log collections. + """ conn = get_conn() - row = conn.execute("SELECT id FROM pipelines WHERE id = ?", (pipeline_id,)).fetchone() - if not row: - conn.close() - raise HTTPException(404, f"Pipeline {pipeline_id} not found") logs = models.get_pipeline_logs(conn, pipeline_id, since_id=since_id) conn.close() return logs diff --git a/web/frontend/src/api.ts b/web/frontend/src/api.ts index 1071564..7c27ef9 100644 --- a/web/frontend/src/api.ts +++ b/web/frontend/src/api.ts @@ -199,6 +199,8 @@ export interface TaskFull extends Task { pipeline_steps: PipelineStep[] related_decisions: Decision[] project_deploy_command: string | null + project_deploy_host: string | null + project_deploy_path: string | null project_deploy_runtime: string | null pipeline_id: string | null } diff --git a/web/frontend/src/views/TaskDetail.vue b/web/frontend/src/views/TaskDetail.vue index bdaa8b7..2599a85 100644 --- a/web/frontend/src/views/TaskDetail.vue +++ b/web/frontend/src/views/TaskDetail.vue @@ -597,7 +597,7 @@ async function saveEdit() { {{ resolvingManually ? 'Сохраняем...' : '✓ Решить вручную' }} -