You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Avoid destructor errors after failed worker pool construction - #815
This PR fixes an extra destructor exception when worker pool construction rejects a start method. With this, callers see the original ValueError while partial pool cleanup completes quietly.
The new regression test failed before the fix. 8 focused tests and pre-commit passed. The existing early-close worker test was excluded because it also fails on upstream in this environment.
No actionable comments were generated in the recent review.
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 1736b81d-2134-420c-930f-975822e63e7a
📥 Commits
Reviewing files that changed from the base of the PR and between f48af32 and 003cd5d.
📒 Files selected for processing: 2
fastembed/parallel_processor.py
tests/test_parallel_processor.py
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
Walkthrough
ParallelWorkerPool now initializes processes before ctx. A regression test verifies that an unsupported start method raises the expected ValueError and that garbage collection does not report an unraisable error.
An unsupported start method continues to raise ValueError without an additional destructor exception. No actionable merge-blocking risk remains.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description check
The description directly explains the destructor-error fix, the affected worker-pool construction path, the regression test, and validation results.
Title check
The title clearly and concisely summarizes the main change: preventing destructor errors after failed worker-pool construction.
Linked Issues check
The change addresses issue #814. ParallelWorkerPool.__init__ initializes self.processes before get_context(start_method). An invalid start method can therefore raise the original ValueError wi…
Out of Scope Changes check
The pull request changes only fastembed/parallel_processor.py and tests/test_parallel_processor.py. The production change supports safe cleanup after failed construction. The test directly verifie…
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
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
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.
This PR fixes an extra destructor exception when worker pool construction rejects a start method. With this, callers see the original
ValueErrorwhile partial pool cleanup completes quietly.Fixes #814.
The new regression test failed before the fix. 8 focused tests and pre-commit passed. The existing early-close worker test was excluded because it also fails on upstream in this environment.
Checklist