Repository navigation
fix: attempt remaining pipeline cleanup after component errors - #13520
DiadkoShmek wants to merge 2 commits into
Conversation
|
@DiadkoShmek is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @DiadkoShmek, 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 |
|
Thanks for signing the CLA, @DiadkoShmek! 🎉 This PR is now ready for review again and the reviewer has been re-assigned. |
|
@davidsbatista The CLA now passes and the bot has restored the review request. The fork’s 16 workflows still await maintainer approval, and Vercel is waiting for deepset-team authorization before any preview deployment. Could a team member approve the test workflows and authorize the preview when reviewing? No code has changed since |
|
Thanks for the PR, @DiadkoShmek! We're going to close this one for now:
If you run into this in practice, please open an issue with the scenario and we'll revisit. |
Related Issues
No linked issue. Reproduced through public Pipeline resource-lifecycle calls with actual local file resources; the related tool-batch cancellation work in #12796 concerns a different owner.
Proposed Changes:
If one component's
close()raises, pipeline cleanup currently exits before visiting later components. Repeating cleanup can encounter the same error and leave those later resources open again.Attempt all remaining cleanup hooks after an ordinary
Exception, then re-raise the first exception object. Preserve component order, native async cleanup preference and sync fallback. Cancellation and otherBaseExceptionsubclasses still interrupt immediately; the pipeline cannot repair resources inside a component whose own cleanup fails. The pipeline guide and Reno release note describe that behavior.How did you test it?
EFBIGcleanup error; later files remain open on base and close after the patch, while the same error propagates.EBADF, exception identity/cause/traceback, repeated calls, mixed async/sync cleanup and real task cancellation. The base misses later cleanup in 12 cases; the patch passes.The main test command in the focused Hatch development environment was:
Notes for the reviewer
The existing exception type remains catchable, but arrives after later ordinary cleanup attempts. Secondary ordinary errors do not replace it; an intervening cancellation still propagates immediately.
This PR was fully generated with OpenAI Codex. Codex reviewed the changes, ran the relevant local tests and obtained a separate agent review; no human code review is claimed.
Checklist