Skip to content

Stabilize legacy WordPress boot CI#3609

Open
JanJakes wants to merge 6 commits into
trunkfrom
fix/legacy-wp-ci-stability
Open

Stabilize legacy WordPress boot CI#3609
JanJakes wants to merge 6 commits into
trunkfrom
fix/legacy-wp-ci-stability

Conversation

@JanJakes
Copy link
Copy Markdown
Member

@JanJakes JanJakes commented May 7, 2026

What changed

  • Cache legacy WordPress ZIP downloads in GitHub Actions and serve them locally during the boot test.
  • Keep wp=4.9 style query values so Playground still uses the normal dotted-version resolver.
  • Retry Playwright browser installation and tolerate Actions cache-save races.
  • Keep the plugin activation timeout at 60 seconds, then do one URL-bar recheck before failing with diagnostics.
  • Group the legacy boot helpers under packages/playground/wordpress/tests/legacy-wp-version-boot/.

Why

The legacy boot job was frequently failing on transient infrastructure issues: WordPress.org download throttling, occasional Playwright install/network failures, and rare plugin activation timing races. The cache removes most WordPress.org traffic without changing the runtime code path under test.

Validation

  • Local focused run: WP_ONLY=6.2,4.9 node packages/playground/wordpress/tests/legacy-wp-version-boot/test.mjs
  • Local helper checks: node --check, Prettier, filtered ZIP download, and ZIP server smoke tests.
  • GitHub Actions is green on the latest commit.
  • test-legacy-wp-version-boot passed on the latest full run and prior targeted reruns.

JanJakes added 3 commits May 8, 2026 12:01
Cache legacy WordPress release ZIPs through Actions cache, serve them locally with CORS during the boot suite, and retry Playwright browser installation to absorb rare apt mirror failures.
Keep the activation wait at 60 seconds, then re-check the plugins page before failing and include the latest frame URL, body excerpt, and recent browser errors in timeout diagnostics.
Do not fail the legacy boot job if another workflow run saves the same WordPress ZIP cache key first.
@akirk akirk force-pushed the fix/legacy-wp-ci-stability branch from 60c688e to 69a94c5 Compare May 8, 2026 10:01
JanJakes added 2 commits May 14, 2026 09:50
Use the existing CORS proxy hook for cached WordPress ZIPs so the test still passes dotted WordPress versions through the normal Playground resolver. This avoids the custom-URL branch that made older versions crawl to the CI timeout.\n\nAlso trims the plugin activation recovery to a URL-bar retry instead of direct scoped-frame URL rewriting.
Move the legacy WordPress boot helper scripts under one test-specific directory, use shorter names inside that directory, and update the workflow/project references.\n\nAlso narrow the local ZIP server back to cached WordPress ZIPs only and make WP_ONLY apply to the downloader so local focused runs do not need the full ZIP cache.
@JanJakes JanJakes marked this pull request as ready for review May 14, 2026 13:51
@JanJakes JanJakes requested review from a team, Copilot and zaerl May 14, 2026 13:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Stabilizes the legacy WordPress boot CI job by reducing external flake sources (WordPress.org throttling, Playwright install hiccups) and improving plugin activation diagnostics/timeouts.

Changes:

  • Add download + local serving of cached WordPress ZIPs for the legacy boot test.
  • Refactor legacy WP version matrix into a shared helper module.
  • Improve CI robustness with Playwright install retries and better plugin-activation timeout reporting.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/playground/wordpress/tests/legacy-wp-version-boot/test.mjs Uses shared matrix helper and improves plugin activation waiting/diagnostics
packages/playground/wordpress/tests/legacy-wp-version-boot/matrix.mjs Introduces shared WP/PHP matrix + download URL normalization helpers
packages/playground/wordpress/tests/legacy-wp-version-boot/download-zips.mjs Adds CLI to pre-download ZIPs with retries for CI caching
packages/playground/wordpress/tests/legacy-wp-version-boot/serve-zips.mjs Adds local HTTP server for serving cached ZIPs in CI
packages/playground/wordpress/src/legacy-wp/legacy-fixes.ts Updates doc reference to the moved legacy boot test path
packages/playground/wordpress/project.json Updates Nx command to new legacy boot test path
.github/workflows/ci.yml Adds ZIP cache restore/save + local ZIP server + Playwright install retries

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +71 to +81
function getProxiedUrl(requestUrl) {
const pathTarget = decodeURIComponent(requestUrl.pathname.slice(1));
if (isHttpUrl(pathTarget)) {
return new URL(`${pathTarget}${requestUrl.search}`);
}
const searchTarget = requestUrl.search.slice(1);
if (isHttpUrl(searchTarget)) {
return new URL(searchTarget);
}
return null;
}
Comment on lines +68 to +69
createReadStream(filePath).pipe(response);
});
Comment on lines +246 to +269
function getPluginActivationTimeoutStatus(
frameBeforeActivation,
latestFrame,
consoleErrors,
consoleStartIndex
) {
const recentErrors = consoleErrors.slice(consoleStartIndex).slice(-3);
const detail = [
`timed out after ${PLUGIN_ACTIVATION_TIMEOUT_S}s`,
`before URL: ${frameBeforeActivation.url}`,
latestFrame ? `latest URL: ${latestFrame.frame.url()}` : null,
recentErrors.length
? `recent console errors: ${recentErrors.join(' | ')}`
: null,
]
.filter(Boolean)
.join('; ');

return {
status: 'TIMEOUT',
detail,
body: latestFrame?.body,
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants