apache / apache/beam

Don't leave temp files laying around after tests.

Open
#18,272 0 comments 0 reactions 0 assignees View on GitHub
bug core P3 python
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

As noted in https://issues.apache.org/jira/browse/BEAM-2224 , we can't use NamedTemporaryFile the "right" way on Windows, so in most places we're just getting its name and neglecting to remove the file when we're done with it.

We should go through the SDK and fix this, likely with our own context that just works on all platforms.

Imported from Jira [BEAM-2226](https://issues.apache.org/jira/browse/BEAM-2226). Original Jira may contain additional context.
Reported by: robertwb.

Contributor guide

Open the contributing guide

Research direction

Search the SDK for uses of NamedTemporaryFile that obtain a name without removing the file, and read the linked BEAM-2224 context for the Windows constraint. Review the affected test paths and define a shared cross-platform cleanup approach; done means temporary files created during tests are removed reliably on all supported platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.