Skip to content

Commit

Permalink
Fixed optional input when the input type is list or record
Browse files Browse the repository at this point in the history
  • Loading branch information
LanderOtto committed Jan 3, 2025
1 parent c2a08e2 commit 7840d0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions streamflow/cwl/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ def _create_token_processor(
force_deep_listing=force_deep_listing,
only_propagate_secondary_files=only_propagate_secondary_files,
),
optional=optional,
)
# Enum type: -> create output processor
elif isinstance(port_type, get_args(cwl_utils.parser.EnumSchema)):
Expand Down Expand Up @@ -684,6 +685,7 @@ def _create_token_processor(
)
for port_type in port_type.fields
},
optional=optional,
)
elif isinstance(port_type, MutableSequence):
optional = "null" in port_type
Expand Down
9 changes: 7 additions & 2 deletions streamflow/deployment/connector/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -1803,13 +1803,15 @@ async def _populate_instance(self, name: str) -> None:
for line in stdout.splitlines()
if line.split(" - ")[1].split()[0] not in FS_TYPES_TO_SKIP
}
if logger.isEnabledFor(logging.DEBUG):
logger.debug(f"Host mount points: {fs_mounts}")
else:
raise WorkflowExecutionException(
f"FAILED retrieving volume mounts from `/proc/1/mountinfo` "
f"in deployment {self.connector.deployment_name}: [{returncode}]: {stdout}"
)
if logger.isEnabledFor(logging.DEBUG):
logger.debug(
f"Host (local: {self._wraps_local()}) mount points: {fs_mounts}"
)
# Get the list of bind mounts for the container instance
stdout, returncode = await self.run(
location=location,
Expand Down Expand Up @@ -1843,6 +1845,9 @@ async def _populate_instance(self, name: str) -> None:
else None
)
if host_mount is not None:
if dst == os.path.join(os.sep, "tmp", "streamflow"): # fixme
logger.debug(f"HARDCODED: replaced {host_mount} with {dst}")
host_mount = dst
binds[dst] = host_mount
if logger.isEnabledFor(logging.DEBUG):
logger.debug(f"Container binds: {binds}")
Expand Down

0 comments on commit 7840d0b

Please sign in to comment.