Skip to content

Commit cde958a

Browse files
author
Alan Christie
committed
fix: Launch parameter sets are now lists
1 parent b788cd0 commit cde958a

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

workflow/workflow_abc.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,20 @@ class LaunchParameters:
100100
# This cannot be less than 1 and must be grater than any value of
101101
# 'step_replication_number' that will be used for the same step.
102102
total_number_of_replicas: int = 1
103-
# A set of dependent (prior step) instance directories that are expected to be
103+
# The dependent (prior step) instance directories that are expected to be
104104
# hard-linked into the instance directory the launcher will create.
105105
# These are required so that the step can access the dependent step's files.
106-
# It is a set of instance UUIDs.
107-
step_dependent_instances: set[str] | None = None
108-
# A set of dependent project files that are expected to be hard-linked
106+
# It is a set of instance UUIDs, not instance directories.
107+
step_dependent_instances: list[str] | None = None
108+
# The dependent Project files that are expected to be hard-linked
109109
# into the instance directory the launcher will create.
110110
# These are required so that the step can access project files.
111-
# It is a set project-relative filenames (or directories).
112-
step_project_inputs: set[str] | None = None
113-
# A set of step instance files that are expected to be hard-linked
114-
# into the surrounding Project directory.
115-
# It is a set instance-relative filenames (or directories).
116-
step_project_outputs: set[str] | None = None
111+
# It is a list of Project-relative filenames (or directories).
112+
step_project_inputs: list[str] | None = None
113+
# The step instance files that are expected to be hard-linked
114+
# into the enclosing Project directory (a step's outputs).
115+
# It is a list of Instance-relative filenames (or directories).
116+
step_project_outputs: list[str] | None = None
117117
# The application ID (a custom resource name)
118118
# used to identify the 'type' of Instance to create.
119119
# For DM Jobs this will be 'datamanagerjobs.squonk.it'

workflow/workflow_engine.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ class StepPreparationResponse:
120120
variables: dict[str, Any] | None = None
121121
replica_variable: str | None = None
122122
replica_values: list[str] | None = None
123-
dependent_instances: set[str] | None = None
124-
outputs: set[str] | None = None
125-
inputs: set[str] | None = None
123+
dependent_instances: set[str] = set()
124+
outputs: set[str] = set()
125+
inputs: set[str] = set()
126126
error_num: int = 0
127127
error_msg: str | None = None
128128

@@ -830,9 +830,11 @@ def _launch(
830830
step_name=step_name,
831831
step_replication_number=replica,
832832
total_number_of_replicas=total_replicas,
833-
step_dependent_instances=step_preparation_response.dependent_instances,
834-
step_project_inputs=step_preparation_response.inputs,
835-
step_project_outputs=step_preparation_response.outputs,
833+
step_dependent_instances=list(
834+
step_preparation_response.dependent_instances
835+
),
836+
step_project_inputs=list(step_preparation_response.inputs),
837+
step_project_outputs=list(step_preparation_response.outputs),
836838
)
837839
lr: LaunchResult = self._instance_launcher.launch(launch_parameters=lp)
838840

0 commit comments

Comments
 (0)