|
92 | 92 | get_step_predefined_variable_connections,
|
93 | 93 | get_step_prior_step_connections,
|
94 | 94 | get_step_workflow_variable_connections,
|
| 95 | + is_workflow_input_variable, |
95 | 96 | is_workflow_output_variable,
|
96 | 97 | )
|
97 | 98 |
|
@@ -120,6 +121,7 @@ class StepPreparationResponse:
|
120 | 121 | replica_values: list[str] | None = None
|
121 | 122 | dependent_instances: set[str] | None = None
|
122 | 123 | outputs: set[str] | None = None
|
| 124 | + inputs: set[str] | None = None |
123 | 125 | error_num: int = 0
|
124 | 126 | error_msg: str | None = None
|
125 | 127 |
|
@@ -545,6 +547,9 @@ def _prepare_step(
|
545 | 547 | # (and all the dependent instances have completed successfully).
|
546 | 548 | # We can now compile a set of variables for it.
|
547 | 549 |
|
| 550 | + # Outputs - a list of step files that are workflow inputs. |
| 551 | + # These are project files that are copied into the step instance. |
| 552 | + inputs: set[str] = set() |
548 | 553 | # Outputs - a list of step files that are workflow outputs.
|
549 | 554 | # Any step can write files to the Project directory
|
550 | 555 | # but this only consists of job outputs that are also workflow outputs.
|
@@ -575,6 +580,8 @@ def _prepare_step(
|
575 | 580 | prime_variables[connector.out] = rwf_variables[connector.in_]
|
576 | 581 | if is_workflow_output_variable(wf, connector.in_):
|
577 | 582 | outputs.add(rwf_variables[connector.in_])
|
| 583 | + elif is_workflow_input_variable(wf, connector.in_): |
| 584 | + inputs.add(rwf_variables[connector.in_]) |
578 | 585 |
|
579 | 586 | # Add any pre-defined variables used in the step's "plumbing"
|
580 | 587 | for connector in get_step_predefined_variable_connections(
|
@@ -705,6 +712,7 @@ def _prepare_step(
|
705 | 712 | replica_values=iter_values,
|
706 | 713 | dependent_instances=dependent_instances,
|
707 | 714 | outputs=outputs,
|
| 715 | + inputs=inputs, |
708 | 716 | )
|
709 | 717 |
|
710 | 718 | def _launch(
|
@@ -780,6 +788,8 @@ def _launch(
|
780 | 788 | step_replication_number=replica,
|
781 | 789 | total_number_of_replicas=total_replicas,
|
782 | 790 | step_dependent_instances=step_preparation_response.dependent_instances,
|
| 791 | + step_project_inputs=step_preparation_response.inputs, |
| 792 | + step_project_outputs=step_preparation_response.outputs, |
783 | 793 | )
|
784 | 794 | lr: LaunchResult = self._instance_launcher.launch(launch_parameters=lp)
|
785 | 795 | rwfs_id = lr.running_workflow_step_id
|
|
0 commit comments