Files
Christian Byrneandguill 0698f6d7c2 Return execution_meta in the job detail (#17397)
* test: job detail returns each node's execution meta

* Return execution_meta in the job detail

GET /api/jobs/{job_id} documents execution_meta but never filled it. The
history record already stores each node's meta, including the display_node
an expanded node is shown on. Return it so a client that reloads a finished
job's outputs (for example after a websocket reconnect) can send each output
to the node the live executed message would have used.

* test: a cached output keeps its own node's execution meta

Two identical previews share an output cache entry. The second one
replays the entry with the first node's meta, so the job detail points
its output at the wrong node.

* Record the current node's meta for a cached output

emit_cached_output stored the meta of whichever node wrote the cache
entry. Pass the current node's meta from both callers instead.

* Pass the node meta to emit_cached_output instead of the display id

Both callers now always pass the current node's meta, so the optional
parameter and the separate display id go away; the executed message
reads display_node from the meta. The test fixture's real_node_id now
matches get_real_node_id (the top-level node).

* test: an expanded node's execution meta names the node that expanded it

---------

Co-authored-by: guill <jacob.e.segal@gmail.com>
2026-10-31 17:00:16 -07:00
..
2023-09-18 23:18:06 -04:00
2023-09-18 23:18:06 -04:00

Automated Testing

Running tests locally

Additional requirements for running tests:

pip install pytest
pip install websocket-client==1.6.1
opencv-python==4.6.0.66
scikit-image==0.21.0

Run inference tests:

pytest tests/inference

Quality regression test

Compares images in 2 directories to ensure they are the same

  1. Run an inference test to save a directory of "ground truth" images
    pytest tests/inference --output_dir tests/inference/baseline
  1. Make code edits

  2. Run inference and quality comparison tests

pytest