Skip to content

Commit

Permalink
Fixed the path of the config file stored in the DataManager. Before…
Browse files Browse the repository at this point in the history
… this commit, it was saved the path defined in the `StreamFlow file`, which can be a relative path
  • Loading branch information
LanderOtto committed Dec 28, 2024
1 parent 5c0201e commit 59eea37
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
9 changes: 8 additions & 1 deletion streamflow/cwl/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import urllib.parse
from collections.abc import MutableMapping, MutableSequence
from enum import Enum
from pathlib import PurePosixPath
from pathlib import Path, PurePosixPath
from types import ModuleType
from typing import Any, cast, get_args

Expand Down Expand Up @@ -1411,6 +1411,13 @@ def __init__(
| cwl_utils.parser.Workflow
) = cwl_definition
self.cwl_inputs: MutableMapping[str, Any] = cwl_inputs

if cwl_inputs_path is not None:
uri = urllib.parse.urlparse(cwl_inputs_path)
if not uri.scheme or uri.scheme == "file":
cwl_inputs_path = _get_path(
Path(urllib.parse.unquote_plus(uri.path)).resolve().as_uri()
)
self.cwl_inputs_path: str | None = cwl_inputs_path
self.default_map: MutableMapping[str, Any] = {}
self.deployment_map: MutableMapping[str, DeployStep] = {}
Expand Down
2 changes: 1 addition & 1 deletion streamflow/cwl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ def process_inner_element(
context: MutableMapping[str, Any],
):
run_command = cwl_element.run
inner_context = {**context}
inner_context = dict(context)
if cwl_utils.parser.is_process(run_command):
run_command.cwlVersion = context["version"]
cwl_utils.parser.utils.convert_stdstreams_to_files(run_command)
Expand Down
6 changes: 6 additions & 0 deletions streamflow/data/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,12 @@ async def transfer_data(
).resolve()
) is None:
logger.info(f"Remote file system: {repr(self.path_mapper)}")

src_res, _ = await src_connector.run(src_location, ["ls", "-lhaR", "/tmp"])
logger.info(f"src_res: {src_res}")
dst_res = await dst_connector.run(dst_locations[0], ["ls", "-lhaR", "/tmp"])
logger.info(f"dst_res: {dst_res}")

raise WorkflowExecutionException(
f"Error retrieving realpath for {src_path} on location {src_location} "
f"while transferring it to {dst_path} on deployment {dst_connector.deployment_name}"
Expand Down

0 comments on commit 59eea37

Please sign in to comment.