From 0e508d4bd8f546eb9e4e7711d562f2debb8f20a4 Mon Sep 17 00:00:00 2001 From: Camila Diaz Date: Wed, 18 Aug 2021 13:21:41 -0500 Subject: [PATCH] workflows: extract workspace-root-path from a new top section from .yaml file It passes a workspace_root_path as a parameter to rwc Closes reanahub/reana-client#545 --- reana_server/rest/workflows.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reana_server/rest/workflows.py b/reana_server/rest/workflows.py index e8301808..46c793be 100644 --- a/reana_server/rest/workflows.py +++ b/reana_server/rest/workflows.py @@ -401,10 +401,15 @@ def create_workflow(user): # noqa workflow_dict["operational_options"] = validate_operational_options( workflow_engine, reana_spec_file.get("inputs", {}).get("options", {}) ) + workspace_root_path = reana_spec_file.get("workspace", {}).get( + "root_path", None + ) if git_data: workflow_dict["git_data"] = git_data response, http_response = current_rwc_api_client.api.create_workflow( - workflow=workflow_dict, user=str(user.id_) + workflow=workflow_dict, + user=str(user.id_), + workspace_root_path=workspace_root_path, ).result() if git_data: workflow = _get_workflow_with_uuid_or_name(