Skip to content

Commit 58d100c

Browse files
author
Alan Christie
committed
docs: Better debug
1 parent 77a95e6 commit 58d100c

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

workflow/workflow_engine.py

+28-8
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,11 @@ def _validate_step_command(
303303
collection=job_collection, job=job_job, version=job_version
304304
)
305305
_LOGGER.debug(
306-
"API.get_job(%s, %s, %s) returned: -\n%s",
306+
"API.get_job(%s, %s, %s) for %s returned: -\n%s",
307307
job_collection,
308308
job_job,
309309
job_version,
310+
running_workflow_step_id,
310311
str(job),
311312
)
312313

@@ -356,23 +357,37 @@ def _validate_step_command(
356357
)
357358

358359
# We must always process the current step's variables
359-
_LOGGER.debug("Validating step %s", step)
360+
_LOGGER.debug("Validating step %s (%s)", step, running_workflow_step_id)
360361
inputs = step.get("inputs", [])
361362
outputs = step.get("outputs", [])
362363
previous_step_outputs = []
363364
our_index: int = wf_step_data["caller_step_index"]
364365
assert our_index >= 0
365-
_LOGGER.debug("We are at workflow step index %d", our_index)
366+
_LOGGER.debug(
367+
"We are at workflow step index %d (%s)", our_index, running_workflow_step_id
368+
)
366369

367370
if our_index > 0:
368371
previous_step = wf_step_data["steps"][our_index - 1]
369372
previous_step_outputs = previous_step.get("outputs", [])
370373

371-
_LOGGER.debug("Index %s workflow_variables=%s", our_index, all_variables)
372-
_LOGGER.debug("Index %s inputs=%s", our_index, inputs)
373-
_LOGGER.debug("Index %s outputs=%s", our_index, outputs)
374374
_LOGGER.debug(
375-
"Index %s previous_step_outputs=%s", our_index, previous_step_outputs
375+
"Index %s (%s) workflow_variables=%s",
376+
our_index,
377+
running_workflow_step_id,
378+
all_variables,
379+
)
380+
_LOGGER.debug(
381+
"Index %s (%s) inputs=%s", our_index, running_workflow_step_id, inputs
382+
)
383+
_LOGGER.debug(
384+
"Index %s (%s) outputs=%s", our_index, running_workflow_step_id, outputs
385+
)
386+
_LOGGER.debug(
387+
"Index %s (%s) previous_step_outputs=%s",
388+
our_index,
389+
running_workflow_step_id,
390+
previous_step_outputs,
376391
)
377392
step_vars = self._set_step_variables(
378393
workflow_variables=all_variables,
@@ -381,7 +396,12 @@ def _validate_step_command(
381396
previous_step_outputs=previous_step_outputs,
382397
)
383398
all_variables |= step_vars
384-
_LOGGER.debug("Index %s all_variables=%s", our_index, previous_step_outputs)
399+
_LOGGER.debug(
400+
"Index %s (%s) all_variables=%s",
401+
our_index,
402+
running_workflow_step_id,
403+
all_variables,
404+
)
385405

386406
# Set the variables for this step (so they can be inspected on error)
387407
self._wapi_adapter.set_running_workflow_step_variables(

0 commit comments

Comments
 (0)