8000 fix: Fix cancellation flow in python component graph by pankajroark · Pull Request #765 · ai-dynamo/dynamo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: Fix cancellation flow in python component graph #765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

pankajroark
Copy link
Contributor

Overview:

My understanding is that cancellation flow works in a daisy chain way. When downstream service can't send response to upstream service it realizes the request is stopped. This was broken for python component flow though it seems. Say the Processor is reading response from Worker with an async iterator. If Processor observes cancellation from frontend via context being stopped it can exist out of for loop reading Worker responses. But Worker doesn't know about it right now, it keeps continuing and sending responses. There result in a lot of Failed to send response: messages in logs but no cancellation on Worker. By existing out of the process_stream loop on this error downstream gets to know of the cancellation and it then works properly.

Details:

Added the break out of process_stream on encountering an error.

Where should the reviewer start?

It's a one line change.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

Copy link
copy-pr-bot bot commented Apr 21, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Copy link

👋 Hi pankajroark! Thank you for contributing to ai-dynamo/dynamo.

Just a reminder: The NVIDIA Test Github Validation CI runs an essential subset of the testing framework to quickly catch errors.Your PR reviewers may elect to test the changes comprehensively before approving your changes.

🚀

@github-actions github-actions bot added the external-contribution Pull request is from an external contributor label Apr 21, 2025
@pankajroark pankajroark changed the title Fix cancellation flow in python component graph fix: Fix cancellation flow in python component graph Apr 21, 2025
Copy link
Contributor
@grahamking grahamking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@grahamking grahamking merged commit 420b7a8 into ai-dynamo:main Apr 21, 2025
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contribution Pull request is from an external contributor size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0