Repository navigation
Download E2E WordPress dependencies once and share them with all shards - #4089
Closed
vahidkay-meta wants to merge 3 commits into
Closed
vahidkay-meta wants to merge 3 commits into
vahidkay-meta wants to merge 3 commits into
Conversation
Contributor
📦 Latest Plugin BuildBuilt at: 2026-11-06T15:14:07Z Download: Click here to download the plugin To download: Click the link above → Scroll to bottom → Download "facebook-for-woocommerce" artifact |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4089 +/- ##
=======================================
Coverage ? 11.12%
Complexity ? 6127
=======================================
Files ? 235
Lines ? 20778
Branches ? 0
=======================================
Hits ? 2311
Misses ? 18467
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vahidkay-meta
force-pushed
the
ci/e2e-download-dependencies-once
branch
from
November 5, 2026 09:59
ab0dda3 to
36f79de
Compare
|
@vahidkay-meta has imported this pull request. If you are a Meta employee, you can view this in D130203198. |
Every E2E shard downloaded WordPress core, WooCommerce, Storefront, Twenty Twenty-Five, WPC Composite Products and WP-CLI on its own, about 60 external downloads per run. A single DNS hiccup on one runner failed that shard with misleading errors, such as WordPress's "A valid URL was not provided." when downloads.wordpress.org did not resolve. A new prepare-dependencies job resolves versions on api.wordpress.org and downloads everything in one step, trying each download 3 times 5 seconds apart, checks the archives and uploads them as an artifact. The shards need that job, so they are skipped when it fails, and install from the artifact instead of the network.
The events classic-theme project switches to twentythirteen, which WordPress no longer bundles, so the test helper installed it from WordPress.org mid-run. A failed connection there logged a themes_api() warning that failed the PHP debug-log check. Download it in prepare-dependencies and install it during setup like the other themes.
vahidkay-meta
force-pushed
the
ci/e2e-download-dependencies-once
branch
2 times, most recently
from
November 6, 2026 15:11
431ae82 to
93cfa29
Compare
Every shard ran `playwright install --with-deps`, downloading the browsers from Playwright's CDN and about 80 MB of system packages from the Ubuntu mirror. On PR 4085 the mirror was slow enough that the step hit its 15-minute timeout and the shard failed before any test ran. - prepare-dependencies installs every browser the shards use once, with one retry. The browsers are saved to the Actions cache, keyed on the @playwright/test version from package-lock.json, and the shards restore them instead of downloading. - The system packages that install fetched stay in apt's cache and ship in the wp-dependencies artifact, with the Xvfb and Opera helper packages. The shards seed apt's cache with them, so apt installs from disk and only fetches a package that has since moved to a newer version. - Both jobs make apt retry dropped downloads and treat 30 seconds without data as a failure to retry, so one stalled package cannot hold a step until its timeout.
|
@vahidkay-meta merged this pull request in bd1faa2. |
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.
Description
Each of the 12 E2E shards downloaded WordPress core, WooCommerce, Storefront, Twenty Twenty-Five, WPC Composite Products and WP-CLI on its own, about 60 external downloads per run. A single DNS hiccup on one runner failed that shard with misleading errors. On the 3.7.8 release PR (#4088), for example,
downloads.wordpress.orgdid not resolve on two runners:product-categoryfailed in setup withDownload failed. "A valid URL was not provided."WordPress'swp_http_validate_url()resolves the host withgethostbyname(), and when that failsWP_Http::request()reports this generic message.variable-product-depthpassed all tests, then failed the PHP log check on awp_update_plugins()warning that WordPress could not reach WordPress.org.The other shards in the same run installed the same packages fine, so the failures were transient and per runner.
This PR adds a
prepare-dependenciesjob that:use-marketplace-versionis settar -t/unzip -t) and the WP-CLI pharwp-dependenciesartifactThe shards now
needthis job, so they are skipped when it fails instead of each failing mid-setup. They install from the artifact (wp theme install <zip>,wp plugin install <zip>) instead of the network. Version resolution is unchanged: the supported WooCommercemajor.minorresolves to its newest patch release, and a full version such as11.1.1falls back to that exact version.Twenty Twenty-Five is installed only when missing, because recent WordPress releases bundle it and installing a zip over an existing theme fails. This matches the previous behaviour, where
wp theme install twentytwentyfiveleft the bundled copy in place.Not in this PR: the test site still makes its own update-check requests to api.wordpress.org at runtime (the source of the
wp_update_plugins()warning). Stopping those, for example with an mu-plugin that short-circuitspre_http_requestfor api.wordpress.org, would be a follow-up.Type of change
Checklist
Changelog entry
Dev - Download E2E test dependencies once per run and share them with all shards.
Test Plan
bash -non the new download script.