Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/mcpx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,13 @@ jobs:
fi
if [ -n "$e2e" ]; then
echo "e2e package (-count=3): $e2e"
# One e2e pass is about five minutes of real-time waits, and
# -count=3 runs every pass inside one test binary, so go
# test's default 10m timeout cannot hold it (#10489). The
# explicit timeout sits under the job's 30m, so a hang still
# panics with goroutine dumps instead of a runner kill.
# shellcheck disable=SC2086
go test $e2e -race -shuffle=$seed -count=3
go test $e2e -race -shuffle=$seed -count=3 -timeout 25m
fi

- name: Upload runtime feature coverage ledger
Expand Down Expand Up @@ -632,8 +637,13 @@ jobs:
seed=$(python3 -c 'import hashlib, os; root = hashlib.sha256(b"mcpx-test-seed/v1\x00" + os.environ["MCPX_TEST_SEED"].encode()).digest(); print(int.from_bytes(hashlib.sha256(root + b"shuffle").digest()[:8], "big") & (2**63 - 1))')
echo "SHUFFLE_SEED=$seed" >> "$GITHUB_ENV"
echo "shuffle seed: $seed (run seed: $MCPX_TEST_SEED; reproduce with: MCPX_TEST_SEED=$MCPX_TEST_SEED pkgs/mcpx/scripts/test.sh ./... -race -count=3)"
# -timeout: the e2e package's three passes run in one test
# binary and take well over go test's default 10m under
# -race (#10489). 50m stays under the job's 60m, so a real
# hang still panics with goroutine dumps before the runner
# kills the job.
# shellcheck disable=SC2086
go test ./... -race -shuffle=$seed -count=3
go test ./... -race -shuffle=$seed -count=3 -timeout 50m

- name: Open or update the nightly failure issue
if: failure() && github.event_name == 'schedule'
Expand All @@ -644,7 +654,7 @@ jobs:
body="The nightly flake-policy stress run failed on ${{ matrix.os }} (shuffle seed: $SHUFFLE_SEED).

Run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
Reproduce: \`go test ./... -race -shuffle=$SHUFFLE_SEED -count=3\` in pkgs/mcpx.
Reproduce: \`go test ./... -race -shuffle=$SHUFFLE_SEED -count=3 -timeout 50m\` in pkgs/mcpx.

Policy: #1973 — fix the flake; quarantine only via testsupport.Quarantine with an issue link and an expiry."
existing=$(gh issue list --repo "$GITHUB_REPOSITORY" --search "$title in:title" --state open --json number --jq '.[0].number // empty')
Expand Down
6 changes: 6 additions & 0 deletions pkgs/mcpx/docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ off the critical path, never by retrying a failure away:
`-race -shuffle=<seed> -count=3` on `ubuntu-latest` **and** `macos-latest`.
On failure it opens or updates the single "mcpx nightly stress failure"
issue; it never blocks a PR.
- **Explicit timeouts.** `-count=3` runs every pass of a package inside one
test binary, and one `internal/e2e` pass is about five minutes of
real-time waits, so go test's default 10m timeout cannot hold it (#10489).
The e2e stress run passes `-timeout 25m` and the nightly passes
`-timeout 50m`, each under its job's own limit, so a real hang still
panics with goroutine dumps instead of being killed by the runner.
- **Fix first.** A flake the stress jobs surface is a bug: fix it. Only when
a fix genuinely cannot land yet, quarantine the test with
`testsupport.Quarantine(t, "<issue URL>", "YYYY-MM-DD")` from
Expand Down