Skip to content

CI: give PHPUnit Feature's backup MySQL room for the whole suite - #767

Merged
rmcdaniel merged 1 commit into
mainfrom
rust-325-ci-backup-mysql
Oct 25, 2026
Merged

rmcdaniel merged 1 commit into
mainfrom
rust-325-ci-backup-mysql

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Fixes the intermittent PHPUnit Feature failure from #764 (run 40221723442). On attempts 1 and 2, the backup MySQL container died near the end of the suite inside WorkflowTaskRepairRaceTest. Attempt 1 failed with Connection refused; attempt 2 found the container's name no longer resolved. Attempt 3 passed.

Evidence

I ran CI's exact MySQL image, flags and --memory 512m cap locally, against only the six test files that use it, sampling memory every 2 s:

Point in run MySQL memory
Start 305 MiB
After the first files 396–435 MiB
Peak, in the last two race-test files 473 MiB (92% of the cap)

That round wasn't killed. Even so, 92% at the end of the suite matches CI losing the container at exactly that point.

Why it grows: each race test creates and migrates a fresh database, and performance_schema, which the race tests read for lock waits, keeps its instrumentation. WorkerSessionRegistrationRaceTest (#740) added another set of those databases.

Change

  • The backup MySQL container gets --memory 1g --memory-swap 1g, about twice its observed peak. The runner has 16 GB.
  • A new failure-only step, before cleanup, prints each test service's status, oom_killed, exit code and finish time, plus its last 40 log lines. If a service dies again, the log will say why.

PhpunitFeatureWorkflowContractTest and OpenApiDocumentEvolutionTest pass locally, as does the merge-group trigger test.

🤖 Generated with Claude Code

On #764's PHPUnit Feature run, the backup MySQL container died twice in a
row near the end of the suite (connection refused, then its name no longer
resolved) inside WorkflowTaskRepairRaceTest, and the third attempt passed.
Locally, CI's exact MySQL image, flags and 512 MiB cap, running only the six
test files that use it, grew from 305 MiB to 473 MiB (92% of the cap), peaking
in the last two race-test files. Each of those creates and migrates fresh
databases, and performance_schema, which the race tests read for lock waits,
keeps the instrumentation. The suite grew with WorkerSessionRegistrationRaceTest
(#740), which put the run within reach of the cap.

The container now gets 1 GiB. A failed suite also records each test service's
state (OOM-killed, exit code, finish time) and its last 40 log lines before
cleanup, so the next service failure says why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rmcdaniel

Copy link
Copy Markdown
Member Author

Security review accepts exact head b2e00e4f26b9734c0fef148de08c4af9c0dc3b67.

The change only raises the isolated backup-MySQL cgroup ceiling from 512 MiB to 1 GiB and adds a failure-only, 40-line-bounded diagnostic for the three test service containers before their existing cleanup. It does not change workflow permissions, credentials, network publication, product code, or cleanup ownership. The diagnostic reads container state and application logs, not environment/config inspection; these services use only repository-visible fixture authentication (empty/trust database auth and static local S3 fixture values), so it does not add a live-secret disclosure path.

The measured 473 MiB peak at a 512 MiB hard limit is consistent with the observed service death and gives a concrete reason for the bounded increase. This approval is exact-head/source only; the PHPUnit job and remaining hosted checks must still pass before merge.

@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

Independent source review of exact b2e00e4f26b9734c0fef148de08c4af9c0dc3b67: no blocker in this workflow-only change.

The backup MySQL remains bounded: memory and total memory/swap both move from512MiB to1GiB, preserving the no-swap constraint and the existing pinned image/server settings. The new failure diagnostic selects the three run/attempt/job-specific service names, reads only state/OOM/exit/error metadata and40log lines, and runs before their existing unconditional teardown. It adds no workflow permission, runner class or credential inspection.

Scope: reviewed the exact diff and surrounding startup/teardown; no local service or test execution. Repository-contract and analysis checks are green at review time; the hosted PHPUnit Feature result and remaining checks are still required before merge. This does not substitute for the final import/native contract qualification.

@rmcdaniel
rmcdaniel merged commit f63f6c4 into main Oct 25, 2026
22 checks passed
@rmcdaniel
rmcdaniel deleted the rust-325-ci-backup-mysql branch October 25, 2026 20:53
rmcdaniel added a commit that referenced this pull request Oct 25, 2026
rmcdaniel added a commit that referenced this pull request Oct 25, 2026
…-record-local-activity

# Conflicts:
#	.github/workflows/server-parity.yml
rmcdaniel added a commit that referenced this pull request Oct 26, 2026
…st-325-cancellation-scopes

# Conflicts:
#	.github/workflows/server-parity.yml
#	docs/rust-server-port.md
rmcdaniel added a commit that referenced this pull request Oct 26, 2026
…st-325-nexus-operations

# Conflicts:
#	.github/workflows/server-parity.yml
#	docs/rust-server-port.md
#	rust/src/runtime/execution.rs
#	rust/tests/fixtures/unserved-php-routes.v2.11.1.txt
rmcdaniel added a commit that referenced this pull request Oct 26, 2026
…nto rust-325-workflow-stream-writes

The port guide now counts 142 served route methods: stream writes and the
two workflow imports each add two to the base 138.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant