mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-04 22:32:12 +03:00
The `compat-build-26` job in nightly-compat.yml is the only place in the CI
matrix that runs `npm run build` on Node 26 (ci.yml pins CI_NODE_VERSION=24).
It failed every nightly with the runner-reclaimed signature ("The runner has
received a shutdown signal" / "The operation was canceled", no exit code),
always at the same Turbopack compile phase — the classic OOM-kill pattern on
the memory-constrained ubuntu-latest runner.
Root cause: Turbopack's native (Rust, off-V8-heap) allocation is not bounded by
--max-old-space-size and peaks far higher than webpack on OmniRoute's large
module graph (#6409), heavier still under Node 26. Raising the heap does not
help — the codebase's own documented escape hatch for RAM-constrained
environments is the webpack fallback (OMNIROUTE_USE_TURBOPACK=0; see
docs/reference/ENVIRONMENT.md and scripts/build/build-next-isolated.mjs).
Wire that fallback into the Node 26 compat build: it still validates the app
builds on Node 26 (the point of the job) at a much lower memory peak.
Turbopack-on-Node-24 stays covered by ci.yml's build job.
Adds a regression guard (tests/unit/nightly-compat-node26-webpack-8090.test.ts)
asserting the job keeps the webpack fallback so it cannot silently regress.
Class 1 of the triage (shard test failures) was already resolved by #8390,
#8386, #8381, #8383.
Closes #8090
Refs #6949 #6409
140 lines
5.3 KiB
YAML
140 lines
5.3 KiB
YAML
name: Nightly Node Compat
|
||
|
||
# Plano mestre testes+CI (Eixo D2, aprovado 2026-07-04): as matrizes de compatibilidade
|
||
# Node 24/26 custavam ~28% de CADA run do CI pesado (2 execuções completas da suíte por
|
||
# sync da release-PR) para pegar uma classe de quebra que raramente nasce num PR típico.
|
||
# Elas rodam aqui 1×/dia contra o tip da release ativa (mesmo alvo do nightly-release-green)
|
||
# e continuam obrigatórias no gate de release via workflow_dispatch do ci.yml se preciso.
|
||
# fail-fast desligado: numa quebra queremos saber TODAS as versões afetadas de uma vez.
|
||
|
||
on:
|
||
schedule:
|
||
- cron: "47 6 * * *" # 06:47 UTC diário — slot distinto dos demais nightlies
|
||
workflow_dispatch:
|
||
inputs:
|
||
branch:
|
||
description: "Branch to validate (default: highest release/vX.Y.Z)"
|
||
required: false
|
||
type: string
|
||
|
||
permissions:
|
||
contents: read
|
||
issues: write
|
||
|
||
concurrency:
|
||
group: nightly-compat
|
||
cancel-in-progress: true
|
||
|
||
jobs:
|
||
resolve-branch:
|
||
name: Resolve active release branch
|
||
runs-on: ubuntu-latest
|
||
outputs:
|
||
target: ${{ steps.branch.outputs.target }}
|
||
steps:
|
||
- uses: actions/checkout@v7
|
||
with:
|
||
fetch-depth: 0
|
||
persist-credentials: false
|
||
- name: Resolve active release branch
|
||
id: branch
|
||
env:
|
||
INPUT_BRANCH: ${{ github.event.inputs.branch }}
|
||
run: |
|
||
set -euo pipefail
|
||
if [ -n "${INPUT_BRANCH:-}" ]; then
|
||
TARGET="$INPUT_BRANCH"
|
||
else
|
||
TARGET=$(git for-each-ref --format='%(refname:short)' 'refs/remotes/origin/release/v*' \
|
||
| sed 's#origin/##' \
|
||
| sort -t/ -k2 -V \
|
||
| tail -1)
|
||
fi
|
||
case "$TARGET" in
|
||
release/v[0-9]*.[0-9]*.[0-9]*) ;;
|
||
*) echo "Refusing non-canonical branch name: $TARGET"; exit 1 ;;
|
||
esac
|
||
echo "target=$TARGET" >> "$GITHUB_OUTPUT"
|
||
|
||
compat-build-26:
|
||
name: Node 26 Compatibility Build
|
||
runs-on: ubuntu-latest
|
||
timeout-minutes: 25
|
||
needs: resolve-branch
|
||
steps:
|
||
- uses: actions/checkout@v7
|
||
with:
|
||
ref: ${{ needs.resolve-branch.outputs.target }}
|
||
persist-credentials: false
|
||
- uses: actions/setup-node@v7
|
||
with:
|
||
node-version: "26"
|
||
cache: npm
|
||
- uses: ./.github/actions/npm-ci-retry
|
||
# #8090 — this is the ONLY Node 26 build in the whole CI matrix (ci.yml pins
|
||
# CI_NODE_VERSION=24). It failed every nightly with the runner-reclaimed
|
||
# signature ("The runner has received a shutdown signal" / "The operation was
|
||
# canceled", no exit code) always at the same Turbopack compile phase — a
|
||
# classic OOM kill on the memory-constrained ubuntu-latest runner. Turbopack's
|
||
# native (Rust, off-V8-heap) allocation is NOT bounded by --max-old-space-size
|
||
# and peaks far higher than webpack on this large module graph (#6409), and is
|
||
# heavier still under Node 26. Use the documented webpack fallback here: it still
|
||
# validates that the app *builds* on Node 26 (the point of this compat job) at a
|
||
# much lower memory peak. Turbopack-on-Node-24 stays covered by ci.yml's build
|
||
# job. See docs/reference/ENVIRONMENT.md (OMNIROUTE_USE_TURBOPACK) and #6409.
|
||
- run: npm run build
|
||
env:
|
||
OMNIROUTE_USE_TURBOPACK: "0"
|
||
|
||
compat-tests:
|
||
name: Node ${{ matrix.node }} Compat Tests (${{ matrix.shard }}/4)
|
||
runs-on: ubuntu-latest
|
||
timeout-minutes: 25
|
||
needs: resolve-branch
|
||
strategy:
|
||
fail-fast: false
|
||
matrix:
|
||
node: [24, 26]
|
||
shard: [1, 2, 3, 4]
|
||
env:
|
||
JWT_SECRET: ci-nightly-secret-with-sufficient-length-for-validation
|
||
API_KEY_SECRET: ci-nightly-api-key-secret-long
|
||
DISABLE_SQLITE_AUTO_BACKUP: "true"
|
||
TEST_SHARD: ${{ matrix.shard }}/4
|
||
steps:
|
||
- uses: actions/checkout@v7
|
||
with:
|
||
ref: ${{ needs.resolve-branch.outputs.target }}
|
||
persist-credentials: false
|
||
- uses: actions/setup-node@v7
|
||
with:
|
||
node-version: ${{ matrix.node }}
|
||
cache: npm
|
||
- uses: ./.github/actions/npm-ci-retry
|
||
- run: npm run check:node-runtime
|
||
- run: npm run test:unit:ci:shard
|
||
|
||
report:
|
||
name: Open / update tracking issue on failure
|
||
runs-on: ubuntu-latest
|
||
if: ${{ !cancelled() && (needs.compat-tests.result == 'failure' || needs.compat-build-26.result == 'failure') }}
|
||
needs: [resolve-branch, compat-build-26, compat-tests]
|
||
permissions:
|
||
issues: write
|
||
steps:
|
||
- name: Open or update issue
|
||
env:
|
||
GH_TOKEN: ${{ github.token }}
|
||
TARGET: ${{ needs.resolve-branch.outputs.target }}
|
||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||
run: |
|
||
set -euo pipefail
|
||
TITLE="🌙 nightly-compat: Node 24/26 failures on $TARGET"
|
||
EXISTING=$(gh issue list --repo "$GITHUB_REPOSITORY" --state open --search "$TITLE in:title" --json number --jq '.[0].number')
|
||
BODY="Nightly Node-compat run failed on \`$TARGET\`: $RUN_URL — triage which Node version/shard broke (fail-fast off, all versions reported)."
|
||
if [ -n "$EXISTING" ]; then
|
||
gh issue comment "$EXISTING" --repo "$GITHUB_REPOSITORY" --body "$BODY"
|
||
else
|
||
gh issue create --repo "$GITHUB_REPOSITORY" --title "$TITLE" --body "$BODY"
|
||
fi
|