Repository navigation
Conversation
…efore it starts The end-of-stream marker was sent from a `finally` inside the pipeline task, which never runs when the task is cancelled before its first step, so a consumer of the handle waited forever. Send it from a done callback instead. Fixes deepset-ai#13700
|
@prassu017 is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @prassu017, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
|
Hi @prassu017, just a friendly reminder: this PR is still in draft because the Contributor License Agreement (CLA) hasn't been signed yet. We'd love to review your contribution! Please sign the CLA via the link in the |
|
Hi @prassu017, this PR is still waiting for the Contributor License Agreement (CLA) to be signed. Please note that if the CLA isn't signed within the next 24 hours, this PR will be automatically closed. Signing only takes a minute via the link in the |
|
Thanks for signing the CLA, @prassu017! 🎉 This PR is now ready for review again and the reviewer has been re-assigned. |
Related Issues
Proposed Changes:
Pipeline.stream()sent the end-of-stream marker from afinallyinside the pipeline task. Whenaclose()cancels that task before its first step, thefinallynever runs, so a consumer of the handle waits forever. The marker is now sent from a done callback on the task, which fires on every completion, including cancellation before start; the consumer then gets the cancellation.How did you test it?
test_aclose_before_pipeline_starts_ends_iteration: fails on mainbbe4efe(TimeoutError), passes with the fix.Reader still waiting after close: Trueon main,Falseafter.test/core/pipeline/test_async_pipeline_stream.py,test_async_pipeline.py,test_pipeline.py: 72 passed.ruff check,ruff format --checkandmypyon the changed files: clean. Full suite andhatch run test:typesnot run.Notes for the reviewer
The marker now arrives one loop iteration after the task finishes instead of just before; consumers already await the finished task on it, so ordering of chunks is unchanged.
Checklist
fix:).AI-assisted; tests run locally.