@@ -76,27 +76,24 @@ def launch(self, launch_parameters: LaunchParameters) -> LaunchResult:
76
76
77
77
os .makedirs (EXECUTION_DIRECTORY , exist_ok = True )
78
78
79
- # We're passed a RunningWorkflowStep ID but a record is expected to have been
80
- # created bt the caller, we simply create instance records.
81
- response , _ = self ._api_adapter .get_running_workflow_step (
82
- running_workflow_step_id = launch_parameters .running_workflow_step_id
83
- )
84
- # Now simulate the creation of a Task and Instance record
79
+ # Create an Instance record (and dummy Task ID)
85
80
response = self ._api_adapter .create_instance (
86
81
running_workflow_step_id = launch_parameters .running_workflow_step_id
87
82
)
88
83
instance_id = response ["id" ]
89
84
task_id = "task-00000000-0000-0000-0000-000000000001"
90
85
91
- # Apply variables to the step's Job command.
86
+ # Get the job defitnion.
87
+ # This is expected to exist in the tests/job-definitions directory.
92
88
job , _ = self ._api_adapter .get_job (
93
89
collection = launch_parameters .specification ["collection" ],
94
90
job = launch_parameters .specification ["job" ],
95
91
version = "do-not-care" ,
96
92
)
97
93
assert job
98
94
99
- # Now apply the variables to the command
95
+ # Now apply the provided variables to the command.
96
+ # The command may not need any, but we do the decoding anyway.
100
97
decoded_command , status = job_decoder .decode (
101
98
job ["command" ],
102
99
launch_parameters .specification_variables ,
0 commit comments