diff --git a/scripts/pipeline.py b/scripts/pipeline.py index 738a9a03..5cd4d3c9 100644 --- a/scripts/pipeline.py +++ b/scripts/pipeline.py @@ -182,7 +182,10 @@ def run(cmd: list[str], label: str) -> tuple[bool, str]: lines: list[str] = [] with subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, - cwd=repo_root, env={**os.environ, "PYTHONUNBUFFERED": "1"}, + # Node's compile cache lands in /tmp, a 4 GB tmpfs here: the site + # build filled it to 3.4 GB across a day of pipeline runs. + cwd=repo_root, + env={**os.environ, "PYTHONUNBUFFERED": "1", "NODE_DISABLE_COMPILE_CACHE": "1"}, ) as proc: for line in proc.stdout: lines.append(line) diff --git a/tests/test_audit_regressions.py b/tests/test_audit_regressions.py index 80e23b07..39097b78 100644 --- a/tests/test_audit_regressions.py +++ b/tests/test_audit_regressions.py @@ -6726,3 +6726,12 @@ class NoArchiveRepeatsAMemberName(unittest.TestCase): if __name__ == "__main__": unittest.main() + + +class PipelineChildrenSkipNodeCompileCache(unittest.TestCase): + """The site build's compile cache filled the 4 GB /tmp tmpfs to 3.4 GB: + every child the pipeline starts carries NODE_DISABLE_COMPILE_CACHE.""" + + def test_the_run_helper_sets_it(self): + source = (ROOT / "scripts" / "pipeline.py").read_text(encoding="utf-8") + self.assertIn('"NODE_DISABLE_COMPILE_CACHE": "1"', source)