Skip to content

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…

  1. 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.
  2. 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.
  3. The step’s Job definitions is retrieved using the workflow API.
  4. 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.
  5. The Job command is expected to represent a Python module (or a shell script) that is located in the tests/jobs directory
  6. The decoded command is executed using subprocess.run(). The launcher does not not pay any attention to the command exit code.
Clone this wiki locally