From 6a13eda3705d51a46a82be72bd11dd60327d6223 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 23 Oct 2026 19:19:49 +0200 Subject: [PATCH] fix: run pipeline children without node's cache The render step's npm build wrote Node's compile cache to /tmp, a 4 GB tmpfs on this host, and a day of pipeline runs filled it to 3.4 GB. Every child the pipeline starts now carries NODE_DISABLE_COMPILE_CACHE=1. --- scripts/pipeline.py | 5 ++++- tests/test_audit_regressions.py | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) 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)