Playwright: pre-build test apps before webServer startup - #5789
Open
nicoburns wants to merge 1 commit into
Open
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Playwright previously started ~20
dx run/cargo runwebServers concurrently, each doing a full build at startup — ~20 cargo invocations racing over CPU and the target-dir lock, a major source of CI slowness and flaky server-startup failures.This extends the existing
_DX_BUILTone-time init block inplaywright.config.js: after buildingdx, it now pre-builds every active test app sequentially (cargo parallelizes internally), so webServer startup is launch-only. The build command is derived from each server's run command:Keeping the remaining flags (
--web,--release,--ssg,--bin,--wasm-split,--profile,--force-sequential) identical means the subsequentdx runhits the same cargo fingerprint and reuses all artifacts. Non-hot-patchdx run/dx servebuilds useBuildMode::Base, same asdx build.webServer timeout drops from 50 min to 10 min for pre-built servers; hot-patch servers (which still do their full fat build at startup) keep 50 min.
Local workflow is unchanged:
activeServersalready filters to the specs passed on the CLI, so a single-spec run only pre-builds that one app.Verification
On Linux, ran
npx playwright test web.spec.js web-routing.spec.js --reporter=linefrom a clean target state:Pre-building web: ... dx build --force-sequential --web, then web-routing).Bundling app/Running WASM bindgen/Build completed successfully in 2.08s, launching app!.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/1ad909911b2445319691f40122f4f2e9
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/1ad909911b2445319691f40122f4f2e9?variant=devin-insiders
Requested by: @nicoburns