mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-17 16:47:05 +00:00
test(ci): remove the silent-ELIFECYCLE flake investigation scaffolding (#7868)
* test(ci): remove the silent-ELIFECYCLE investigation scaffolding The Windows backend flake is root-caused (server.ts handler gate for the in-process process.exit path; Windows pinned to Node 24.16.0 for the libuv TCP-connect overrun, tracked upstream as nodejs/node#63620). Remove the temporary diagnostics added while hunting it: - delete src/tests/backend/diagnostics.ts (per-test heartbeat + node-report snapshots) and its `--require` from the backend `test` script; - drop the `--report-on-fatalerror`/`-on-signal`/`-uncaught-exception` `NODE_OPTIONS` and the "Upload Node diagnostic reports" steps; - drop the Windows OS-level netstat/tasklist sidecar watcher. Kept: the real fixes — the log-only unhandledRejection guard in tests/backend/common.ts, the lowerCasePadIds socket-teardown tracking (comment de-referenced from the deleted file), and `pnpm test -- --exit` on Windows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test: drop the obsolete report-on-fatalerror NODE_OPTIONS guard assertion The backend-tests-flake-mitigation source-lint guard required every backend step to keep the --report-on-fatalerror NODE_OPTIONS + node-report upload. Those diagnostics are removed in this PR now that the flake is root-caused, so drop that assertion. Retain the Windows-only `--exit` checks (still a live invariant) and reframe the file around the resolved root cause. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d582398826
commit
d3074e3707
5 changed files with 25 additions and 440 deletions
147
.github/workflows/backend-tests.yml
vendored
147
.github/workflows/backend-tests.yml
vendored
|
|
@ -66,24 +66,7 @@ jobs:
|
|||
run: pnpm build
|
||||
-
|
||||
name: Run the backend tests
|
||||
env:
|
||||
# --report-on-fatalerror and friends write a Node diagnostic report
|
||||
# (V8 stack, libuv handles, OS info) on fatal errors that bypass JS
|
||||
# handlers — the failure mode we've been chasing on Windows + Node
|
||||
# 24 since PR #7663. Reports land in node-report/ and are uploaded
|
||||
# as an artifact if the step fails.
|
||||
NODE_OPTIONS: "--report-on-fatalerror --report-uncaught-exception --report-on-signal --report-compact --report-directory=${{ github.workspace }}/node-report"
|
||||
run: |
|
||||
mkdir -p "${{ github.workspace }}/node-report"
|
||||
pnpm test
|
||||
- name: Upload Node diagnostic reports on failure
|
||||
if: ${{ failure() }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: node-diagnostic-report-${{ runner.os }}-node${{ matrix.node }}-${{ github.job }}
|
||||
path: node-report/
|
||||
if-no-files-found: ignore
|
||||
retention-days: 7
|
||||
run: pnpm test
|
||||
- name: Run the new vitest tests
|
||||
working-directory: src
|
||||
run: pnpm run test:vitest
|
||||
|
|
@ -153,19 +136,7 @@ jobs:
|
|||
ep_table_of_contents
|
||||
-
|
||||
name: Run the backend tests
|
||||
env:
|
||||
NODE_OPTIONS: "--report-on-fatalerror --report-uncaught-exception --report-on-signal --report-compact --report-directory=${{ github.workspace }}/node-report"
|
||||
run: |
|
||||
mkdir -p "${{ github.workspace }}/node-report"
|
||||
pnpm test
|
||||
- name: Upload Node diagnostic reports on failure
|
||||
if: ${{ failure() }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: node-diagnostic-report-${{ runner.os }}-node${{ matrix.node }}-${{ github.job }}
|
||||
path: node-report/
|
||||
if-no-files-found: ignore
|
||||
retention-days: 7
|
||||
run: pnpm test
|
||||
- name: Run the new vitest tests
|
||||
working-directory: src
|
||||
run: pnpm run test:vitest
|
||||
|
|
@ -229,60 +200,9 @@ jobs:
|
|||
name: Run the backend tests
|
||||
shell: bash
|
||||
working-directory: src
|
||||
env:
|
||||
NODE_OPTIONS: "--report-on-fatalerror --report-uncaught-exception --report-on-signal --report-compact --report-directory=${{ github.workspace }}/node-report"
|
||||
run: |
|
||||
mkdir -p "${{ github.workspace }}/node-report"
|
||||
OUT="${{ github.workspace }}/node-report"
|
||||
# Out-of-process OS-level watcher for the silent-ELIFECYCLE flake.
|
||||
# In-process diagnostics (diagnostics.ts heartbeat + node-report
|
||||
# snapshots) showed that during the death window the V8 main
|
||||
# isolate is starved — heartbeat stops firing entirely, then the
|
||||
# process is externally terminated, bypassing all JS handlers and
|
||||
# Node's --report-on-fatalerror. To capture state during that
|
||||
# starvation we need a process that doesn't depend on the dying
|
||||
# process's event loop. A bash background loop polling Windows
|
||||
# OS state every 500 ms gives us that:
|
||||
# - netstat.log: localhost TCP socket states over time
|
||||
# (TIME_WAIT/CLOSE_WAIT accumulation, handle exhaustion)
|
||||
# - tasklist.log: node.exe process handle count, working set,
|
||||
# CPU time — captured by the OS independent of V8.
|
||||
# Both logs are appended to node-report/ which already gets
|
||||
# uploaded as an artifact on failure.
|
||||
(
|
||||
while true; do
|
||||
ts=$(date '+%H:%M:%S.%3N')
|
||||
{
|
||||
echo "=== $ts ==="
|
||||
netstat -an 2>/dev/null | grep -E "TCP\s+(127\.0\.0\.1|\[::1\])" || true
|
||||
} >> "$OUT/netstat.log"
|
||||
{
|
||||
echo "=== $ts ==="
|
||||
tasklist /v /fi "imagename eq node.exe" /fo csv 2>/dev/null || true
|
||||
} >> "$OUT/tasklist.log"
|
||||
sleep 0.5
|
||||
done
|
||||
) &
|
||||
WATCHER_PID=$!
|
||||
# --exit forces process.exit(failures) after the suite completes,
|
||||
# closing the post-suite event-loop drain window where Windows +
|
||||
# Node 24 hard-kills the process. Scoped to Windows so Linux/local
|
||||
# runs still surface real handle leaks via natural drain.
|
||||
set +e
|
||||
pnpm test -- --exit
|
||||
EXIT=$?
|
||||
set -e
|
||||
kill "$WATCHER_PID" 2>/dev/null || true
|
||||
wait "$WATCHER_PID" 2>/dev/null || true
|
||||
exit $EXIT
|
||||
- name: Upload Node diagnostic reports on failure
|
||||
if: ${{ failure() }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: node-diagnostic-report-${{ runner.os }}-node${{ matrix.node }}-${{ github.job }}
|
||||
path: node-report/
|
||||
if-no-files-found: ignore
|
||||
retention-days: 7
|
||||
# --exit makes mocha call process.exit() after the run so a leaked handle
|
||||
# cannot hang the job on Windows.
|
||||
run: pnpm test -- --exit
|
||||
- name: Run the new vitest tests
|
||||
working-directory: src
|
||||
run: pnpm run test:vitest
|
||||
|
|
@ -374,60 +294,9 @@ jobs:
|
|||
name: Run the backend tests
|
||||
shell: bash
|
||||
working-directory: src
|
||||
env:
|
||||
NODE_OPTIONS: "--report-on-fatalerror --report-uncaught-exception --report-on-signal --report-compact --report-directory=${{ github.workspace }}/node-report"
|
||||
run: |
|
||||
mkdir -p "${{ github.workspace }}/node-report"
|
||||
OUT="${{ github.workspace }}/node-report"
|
||||
# Out-of-process OS-level watcher for the silent-ELIFECYCLE flake.
|
||||
# In-process diagnostics (diagnostics.ts heartbeat + node-report
|
||||
# snapshots) showed that during the death window the V8 main
|
||||
# isolate is starved — heartbeat stops firing entirely, then the
|
||||
# process is externally terminated, bypassing all JS handlers and
|
||||
# Node's --report-on-fatalerror. To capture state during that
|
||||
# starvation we need a process that doesn't depend on the dying
|
||||
# process's event loop. A bash background loop polling Windows
|
||||
# OS state every 500 ms gives us that:
|
||||
# - netstat.log: localhost TCP socket states over time
|
||||
# (TIME_WAIT/CLOSE_WAIT accumulation, handle exhaustion)
|
||||
# - tasklist.log: node.exe process handle count, working set,
|
||||
# CPU time — captured by the OS independent of V8.
|
||||
# Both logs are appended to node-report/ which already gets
|
||||
# uploaded as an artifact on failure.
|
||||
(
|
||||
while true; do
|
||||
ts=$(date '+%H:%M:%S.%3N')
|
||||
{
|
||||
echo "=== $ts ==="
|
||||
netstat -an 2>/dev/null | grep -E "TCP\s+(127\.0\.0\.1|\[::1\])" || true
|
||||
} >> "$OUT/netstat.log"
|
||||
{
|
||||
echo "=== $ts ==="
|
||||
tasklist /v /fi "imagename eq node.exe" /fo csv 2>/dev/null || true
|
||||
} >> "$OUT/tasklist.log"
|
||||
sleep 0.5
|
||||
done
|
||||
) &
|
||||
WATCHER_PID=$!
|
||||
# --exit forces process.exit(failures) after the suite completes,
|
||||
# closing the post-suite event-loop drain window where Windows +
|
||||
# Node 24 hard-kills the process. Scoped to Windows so Linux/local
|
||||
# runs still surface real handle leaks via natural drain.
|
||||
set +e
|
||||
pnpm test -- --exit
|
||||
EXIT=$?
|
||||
set -e
|
||||
kill "$WATCHER_PID" 2>/dev/null || true
|
||||
wait "$WATCHER_PID" 2>/dev/null || true
|
||||
exit $EXIT
|
||||
- name: Upload Node diagnostic reports on failure
|
||||
if: ${{ failure() }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: node-diagnostic-report-${{ runner.os }}-node${{ matrix.node }}-${{ github.job }}
|
||||
path: node-report/
|
||||
if-no-files-found: ignore
|
||||
retention-days: 7
|
||||
# --exit makes mocha call process.exit() after the run so a leaked handle
|
||||
# cannot hang the job on Windows.
|
||||
run: pnpm test -- --exit
|
||||
- name: Run the new vitest tests
|
||||
working-directory: src
|
||||
run: pnpm run test:vitest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue