Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fix source port resolution in CWL translator
- Fix shell reuse collision across execution locations ([#1045](https://github.com/alpha-unito/streamflow/pull/1045))
- Fix operators in `Hardware` and `Storage` ([#1044](https://github.com/alpha-unito/streamflow/pull/1044))
- Fix Docker Compose NDJSON location parsing ([#1043](https://github.com/alpha-unito/streamflow/pull/1043))
Expand Down
8 changes: 7 additions & 1 deletion streamflow/cwl/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1780,13 +1780,19 @@ def _get_input_port(
return input_port

def _get_source_port(self, workflow: Workflow, source_name: str) -> Port:
if source_name in self.output_ports:
# Return the output port of a previous step.
# If the port has no input step, it means it is the output of the workflow
if (
source_name in self.output_ports
and self.output_ports[source_name].get_input_steps()
):
return self.output_ports[source_name]
if source_name not in self.input_ports:
if source_name not in self.output_ports:
self.output_ports[source_name] = workflow.create_port()
return self.output_ports[source_name]
else:
# The `source_port` is an input of the workflow
return self.input_ports[source_name]

def _handle_default_port(
Expand Down