Repository navigation
fix: close all pipeline components even when an earlier close raises - #13845
Open
TejasLamba2006 wants to merge 1 commit into
Open
TejasLamba2006 wants to merge 1 commit into
TejasLamba2006 wants to merge 1 commit into
Conversation
TejasLamba2006
requested review from
bogdankostic
and removed request for
a team
November 20, 2026 18:15
Contributor
|
@TejasLamba2006 is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||
This branch has not been deployed
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.
Related Issues
Proposed Changes:
PipelineBase.close()andPipelineBase.close_async()previously iterated overself.graph.nodeswithout isolating per-component errors. If an earlier component raised during cleanup (for example aLinkContentFetcherwhose keep-alive client belonged to a closed event loop), the loop exited immediately and skipped closing all remaining components in the pipeline.This PR wraps each component's
close()/close_async()call intry ... except Exception(leavingBaseExceptionsubclasses such asasyncio.CancelledErrorandKeyboardInterruptuntouched), logs a warning for each failure, continues closing the remaining components, and re-raises the first exception once all components have been attempted.How did you test it?
test/core/pipeline/test_pipeline_lifecycle.pycovering bothPipeline.close()andPipeline.close_async()(including async components, sync-fallback components, and multi-component failures).pytest test/core/pipeline/test_pipeline_lifecycle.py,ruff check,ruff format --check, andmypy.Notes for the reviewer
Only
Exceptioninstances are caught inside the loop so task cancellation (asyncio.CancelledError) still propagates immediately.Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.