From c4be9854b7817fd6d8b03f06e33948d861e9721a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelizaveta=20Leme=C5=A1eva?= Date: Thu, 17 Oct 2024 13:20:08 +0200 Subject: [PATCH] feat(rest): add `live_logs_enabled` property in logs output (#705) --- AUTHORS.md | 1 + docs/openapi.json | 4 ++++ reana_server/rest/workflows.py | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index d8feda56..ef3d8bd3 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -14,6 +14,7 @@ The list of contributors in alphabetical order: - [Giuseppe Steduto](https://orcid.org/0009-0002-1258-8553) - [Harri Hirvonsalo](https://orcid.org/0000-0002-5503-510X) - [Jan Okraska](https://orcid.org/0000-0002-1416-3244) +- [Jelizaveta Lemeševa](https://orcid.org/0009-0003-6606-9270) - [Leticia Wanderley](https://orcid.org/0000-0003-4649-6630) - [Marco Donadoni](https://orcid.org/0000-0003-2922-5505) - [Marco Vidal](https://orcid.org/0000-0002-9363-4971) diff --git a/docs/openapi.json b/docs/openapi.json index d7444d3a..e3500970 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -2637,6 +2637,7 @@ "description": "Request succeeded. Info about a workflow, including the status is returned.", "examples": { "application/json": { + "live_logs_enabled": true, "logs": "", "user": "00000000-0000-0000-0000-000000000000", "workflow_id": "256b25f4-4cfb-4684-b7a8-73872ef455a1", @@ -2645,6 +2646,9 @@ }, "schema": { "properties": { + "live_logs_enabled": { + "type": "boolean" + }, "logs": { "type": "string" }, diff --git a/reana_server/rest/workflows.py b/reana_server/rest/workflows.py index fad86ecf..5ae2aa8b 100644 --- a/reana_server/rest/workflows.py +++ b/reana_server/rest/workflows.py @@ -883,13 +883,16 @@ def get_workflow_logs(workflow_id_or_name, user, **kwargs): # noqa type: string user: type: string + live_logs_enabled: + type: boolean examples: application/json: { "workflow_id": "256b25f4-4cfb-4684-b7a8-73872ef455a1", "workflow_name": "mytest.1", "logs": "", - "user": "00000000-0000-0000-0000-000000000000" + "user": "00000000-0000-0000-0000-000000000000", + "live_logs_enabled": true } 400: description: >-