Skip to content

Conversation

@tomerqodo
Copy link

Benchmark PR langgenius#30251

Type: Clean (correct implementation)

Original PR Title: fix: workflow incorrectly marked as completed while nodes are still executing
Original PR Description:

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Fixes langgenius#30195
Fixes langgenius#29316

Summary

When the last upstream node is skipped, the downstream node is added only to _ready_queue and not to _executing_nodes.
After the worker thread consumes _ready_queue, both _ready_queue and _executing_nodes become empty.
As a result, the _dispatcher_loop exits the while loop incorrectly.

Can reproduct use thie DSL: CheckSkip.yml

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Original PR URL: langgenius#30251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants