mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-15 11:37:32 +08:00
The previous commit cleared server.last_workflow_id in PromptExecutor's finally block to prevent racing progress callbacks from leaking stale ids. That fix introduced a new bug: prompt_worker in main.py reads server.last_workflow_id *after* e.execute() returns to populate the terminal 'executing' (node=None) message that tells the client a prompt is done. Because the executor has already cleared the field by then, this message always emitted workflow_id=None. Capture the workflow id from extra_data into a local variable before calling e.execute(), and use that local in the send_sync() call so the per-prompt id is preserved through the executor's finally cleanup. Adds an AST-based regression test asserting that prompt_worker extracts workflow_id locally and that the terminal 'executing' send_sync never reads server.last_workflow_id. Verified the test fails on the buggy revision and passes after the fix. |
||
|---|---|---|
| .. | ||
| app_test | ||
| assets_test | ||
| comfy_api_test | ||
| comfy_extras_test | ||
| comfy_quant | ||
| comfy_test | ||
| execution_test | ||
| folder_paths_test | ||
| prompt_server_test | ||
| seeder_test | ||
| server/utils | ||
| server_test | ||
| utils | ||
| feature_flags_test.py | ||
| README.md | ||
| requirements.txt | ||
| websocket_feature_flags_test.py | ||
Pytest Unit Tests
Install test dependencies
pip install -r tests-unit/requirements.txt
Run tests
pytest tests-unit/