fix: prevent stuck distributed job completion - #90
Draft
robertvoy wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BaseExceptionsubclasses410 job_closedresponse while genuinely unknown jobs remain404job_closedas a terminal acknowledgement on workers, preventing a late callback from becoming a node exception/promptresponse cannot keep the master collector alive indefinitelyWhy
Issue #89 reports a worker receiving
404from/distributed/job_completewhile the master remains stuck inRunningand cannot be cancelled.Current ComfyUI defines
InterruptProcessingExceptionas a directBaseExceptionsubclass. The bridge inutils/async_helpers.pycaught onlyException, so the interrupt could terminate the wrapper without being returned to the calling execution thread. In parallel, the collector allowed unlimited timeout extensions whenever a worker continued to reportqueue_remaining > 0.Behaviour
200, result queued).410withcode: job_closed; worker logs and stops sending remaining payloads.404) so configuration and routing mistakes remain visible.COMFYUI_MAX_COLLECTOR_BUSY_GRACE_PERIODS.COMFYUI_CLOSED_JOB_TTL_SECONDS.Verification
python -m pytest -q— 263 passedpython -m unittest discover -s tests— 194 passedpython -m compileall -q api nodes utils tests— passedgit diff --check— passedInterruptProcessingExceptionis aBaseException, not anExceptionReporter validation requested
@maxnbk, could you test this branch on both the master and runners?
Please check:
/distributed/job_completefailure;Runningwithout restarting the master;job_closed, busy-grace, or callback errors from both logs.Fixes #89