HyukjinKwon opened a new pull request, #912:
URL: https://github.com/apache/spark-connect-rust/pull/912

   ### What changes were proposed in this pull request?
   
   The tests remove the temporary directories that they make:
   - The subprocesses of `python/tests/test_arrow_handoff.py` give the 
`protocol` fixture a factory of their own. Its `mktemp` made a directory with 
`tempfile.mkdtemp`, and nothing removed it, so each case left an 88 KB 
`/tmp/connect-proto<random>/connect.pb` behind. Eight of these scripts now make 
the factory's directories in a `tempfile.TemporaryDirectory` for the call of 
the fixture, as the allocator cases of the same file already do.
   - `_ml_unbound_cases.outcomes` saves into a `tempfile.TemporaryDirectory` of 
its own.
   - The live ML tests save their models into pytest's `tmp_path`, which pytest 
cleans up, rather than into directories of `tempfile.mkdtemp`.
   
   ### Why are the changes needed?
   
   A development machine that runs the offline suite often fills its temporary 
directory. One of ours held 164,000 of these directories (14 GB) after a few 
days.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. Tests only.
   
   ### How was this patch tested?
   
   - `python/tests/test_arrow_handoff.py` with a `TMPDIR` of its own, and with 
`-W error::ResourceWarning`: 1234 passed, and no directory of its cases is 
left. On master, 198 of its cases leave 172.
   - The 11 changed live ML files against a Spark Connect 4.3.0 server: 312 
passed, and no directory is left outside pytest's.
   - Ruff.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code
   
   This pull request and its description were written by Isaac.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to