Repository navigation
fix: write extraction bundle to a temp dir so Windows can open it - #95
Merged
Merged
Conversation
NamedTemporaryFile(delete=True) holds the file open and locked on Windows, so the extractor subprocess failed with PermissionError when writing the bundle. Use a TemporaryDirectory and a plain path instead. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
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.
Problem
On Windows,
deploy/validate/runon a.pypipeline fail withPermissionError: [Errno 13].extract_via_subprocessopened aNamedTemporaryFile(delete=True)and passed its name to the extractor subprocess. On Windows that file stays locked while the handle is open, so the child cannot write the JSON bundle to it. POSIX doesn't lock, so it never showed up on macOS/Linux.Fix
Use a
TemporaryDirectoryand write to a plain path inside it, so nothing holds the file open while the subprocess writes. All.pybuild paths go through this one function.Testing
pytest tests/unit/service/test_pipeline_transform.py -k extract_via_subprocess(real subprocess round-trip) passes; mypy clean.haystack-enterprise deploy pipeline.py SVC --dry-run --output out.yaml.🤖 Generated with Claude Code
https://claude.ai/code/session_01LtM12smTaqz8gw7jsc5vGT