Optimizing yarn memory usage because REASONS.
Some checks failed
Tests / Build and Push CICD Image (push) Failing after 9m50s
Tests / Trailing Whitespace Check (push) Has been skipped
Tests / End of File Check (push) Has been skipped
Tests / YAML Syntax Check (push) Has been skipped
Tests / TOML Syntax Check (push) Has been skipped
Tests / Mixed Line Ending Check (push) Has been skipped
Tests / TOML Formatting Check (push) Has been skipped
Tests / Ruff Linting (push) Has been skipped
Tests / Ruff Format Check (push) Has been skipped
Tests / Pyright Type Check (push) Has been skipped
Tests / Darglint Docstring Check (push) Has been skipped
Tests / No Docstring Types Check (push) Has been skipped
Tests / ESLint Check (push) Has been skipped
Tests / Prettier Format Check (push) Has been skipped
Tests / TypeScript Type Check (push) Has been skipped
Tests / TSDoc Lint Check (push) Has been skipped
Tests / Backend Tests (push) Has been skipped
Tests / Frontend Tests (push) Has been skipped
Tests / Backend Doctests (push) Has been skipped
Tests / Integration Tests (push) Has been skipped
Tests / End-to-End Tests (push) Has been skipped

Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
2025-10-29 10:26:11 -04:00
parent b5170cc39a
commit 4f92e261c1

View File

@@ -150,18 +150,21 @@ RUN echo "# CI optimizations" >> .yarnrc.yml && \
echo "httpTimeout: 60000" >> .yarnrc.yml && \
echo "enableGlobalCache: false" >> .yarnrc.yml && \
echo "compressionLevel: 0" >> .yarnrc.yml && \
echo "nmMode: hardlinks-local" >> .yarnrc.yml
echo "nmMode: hardlinks-local" >> .yarnrc.yml && \
echo "httpRetry: 3" >> .yarnrc.yml && \
echo "networkConcurrency: 2" >> .yarnrc.yml
# Install frontend dependencies with memory optimizations and retry logic
RUN export NODE_OPTIONS="--max-old-space-size=2048" && \
# Install frontend dependencies with aggressive memory management
RUN export NODE_OPTIONS="--max-old-space-size=1536 --max-semi-space-size=128" && \
ulimit -v 2097152 2>/dev/null || true && \
for i in 1 2 3; do \
echo "Attempt $i: Installing frontend dependencies..." && \
yarn install --immutable \
timeout 1800 yarn install --immutable \
&& break || \
(echo "Attempt $i failed, cleaning up and retrying..." && \
rm -rf node_modules .yarn/cache .yarn/install-state.gz && \
yarn cache clean --all 2>/dev/null || true && \
sleep 15); \
sleep 30); \
done && \
rm -rf .yarn/cache && \
swapoff /tmp/swapfile 2>/dev/null || true && \