Please rename TEST_TMPDIR to TMPDIR, and set it for all actions
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the feature request:
Right now we have TEST_TMPDIR. Unfortunately almost no software out there respects that environment variable. Meanwhile a lot of software does respect plain TMPDIR.
In addition to that, we don't set this environment variable for plain build actions. This leads to many people writing actions that write straight into `/tmp`. If an action times out or gets killed, it may not clean up the files it leaves behind. This leads to systems running Bazel gradually running out of disk space.
If Bazel is smart enough to create a temporary directory for test actions, why can't it do it for all actions?
### Which category does this issue belong to?
_No response_
### What underlying problem are you trying to solve with this feature?
Computers running out of disk space.
### Which operating system are you running Bazel on?
macOS
### What is the output of `bazel info release`?
A recent one
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse HEAD` ?
```text
```
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Start by tracing where TEST_TMPDIR is created for test actions and how environments are configured for plain build actions. The work is done when TMPDIR replaces TEST_TMPDIR and is set for all actions, with temporary files isolated from the system /tmp directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100