fix(ci): don't fail e2e job when dev server already exited#4054
Draft
aterga wants to merge 1 commit into
Draft
Conversation
The e2e-playwright matrix' "Stop dev server" cleanup step ran `kill <dev_server_pid>` under `bash -e`. The dev server is launched as a backgrounded `npm run dev | tee` pipeline, whose `$!` PID is frequently already reaped by the time cleanup runs — so `kill` exits non-zero with "No such process" and fails the whole job even though every test passed. This produced spurious red shards (e.g. desktop/mobile 2_6) on unrelated PRs. Make the cleanup non-fatal: `kill ... 2>/dev/null || true`. Anything still alive is reaped by the runner's orphan-process cleanup, so kill semantics are unchanged — the step just no longer turns a green run red. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CGvgPmEVcgyUP2mAnwnDcj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
e2e-playwrightmatrix' "Stop dev server" cleanup step runs:under
bash -e. The dev server is started as a backgroundednpm run dev | tee … &pipeline, and the captured$!PID is frequently already reaped by the time this cleanup step runs.killthen exits non-zero (kill: (NNNN) - No such process), and because the step runs underbash -e, the whole job fails — after every test has already passed.This produces spurious red e2e shards (observed repeatedly on
desktop, 2_6andmobile, 2_6) on PRs that don't touch any test or app code, e.g. a docs/scripts-only change. Example log tail:Fix
Make the cleanup non-fatal:
Kill semantics are unchanged — anything still alive is reaped by the runner's orphan-process cleanup (visible as
Terminate orphan process: …at job end). The step simply no longer turns a green run red. This is the onlykill-based cleanup step in the workflows (verified), so one edit covers all e2e shards.Testing
yaml.safe_loadparses the workflow.🤖 Generated with Claude Code
https://claude.ai/code/session_01CGvgPmEVcgyUP2mAnwnDcj
Generated by Claude Code