-
Notifications
You must be signed in to change notification settings - Fork 0
How the test launcher runs Jobs
Alan B. Christie edited this page Aug 15, 2025
·
6 revisions
The test InstanceLauncher is responsible for a number of actions when the engine under test calls launch()
. The launch()
method…
- Gets the RunningWorkflowStep that the engine will have created, and whose UUID is provided. This provides the launcher with the details of the Job the step is expected to run.
- Creates a simulated Instance database record and sets its
running_workflow_id
to the RunningWorkflowStep ID. This is done because it is important for the engine, which will expect to find an instance UUID in the corresponding PodMessage that it expects to receive. - The step’s Job definitions is retrieved using the workflow API.
- The variables provided in the ``launch()a can are applied to the Job’s command. This ensures any variables expected in the command are expanded using the values the engine expects.
- The Job command is expected to represent a Python module (or a shell script) that is located in the
tests/jobs
directory - The decoded command is executed using
subprocess.run()
. The launcher does not not pay any attention to the command exit code.