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.
This commit is contained in:
Abdessamad Derraz committed 2026-10-23 19:19:49 +02:00
1 parent b714d9628c
commit 6a13eda370
2 files changed
+13 -1

No files matched your search

+4 -1
View File
@@ -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)
+9
View File
@@ -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)