Repository navigation
fix(target-astro): start the render server before the first test - #229
Draft
alexgrozav wants to merge 5 commits into
Draft
alexgrozav wants to merge 5 commits into
alexgrozav wants to merge 5 commits into
Conversation
… browser project Co-authored-by: multica-agent <github@multica.ai>
…geset Co-authored-by: multica-agent <github@multica.ai>
Contributor
Visual report: ✓ passed3 examples on 7 targets. Pixels:
The run uploaded the full report as the |
…-uxf-916 # Conflicts: # packages/target-astro/src/toolchain/browser.ts # packages/target-astro/src/toolchain/index.ts
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.
What changed
The Astro browser project now starts its render server when Vitest configures the project, not on the first render. No other framework's output or tests change.
astroBrowserRef(context)gets the toolchain context fromvite("browser", context). ItsconfigureVitesthook starts the server for that root, with the project's plugins. The first render waits for the same server, so no render starts a second one.hydrate:astrouses the same root, so it shares that server. If the start fails, the first render fails with the start's error, as it did before. Outside Vitest, as in the preview (ADR-0088), the hook never runs. There, the server still starts on the first render.Why
In a full local run, the first test of each Astro spec file in the first wave took 50 to 64 s, and several passed the 60 s timeout. Each one waited in the render queue while the first render started the server.
Inside the busy follower group, the server's
import("astro/container")took 42 to 75 s through Vite's SSR module runner. Run alone, it takes 0.2 s.Where
ufAstroRender's time went, measured onmainwith a local timing probe that this PR doesn't include:browser:vue+browser:astro)boot.createServerboot.importContainerOn this PR, the server finished starting 130 s before the first Astro render, during group 0. No render waited for it.
Three more full local runs on this PR passed every test file. Their slowest Astro tests took 8.7, 11.3 and 9.6 s. Two other runs broke before most Astro tests ran: whole projects failed to import the testing setup file, or a tester page never loaded. A run on
mainbroke the same way, so this PR doesn't cause it.Checklist
feat(web): sell the next framework on the homepage.pnpm format:check,pnpm lint,pnpm check-typesandpnpm testpass.pnpm changeset(see.changeset/README.md).pnpm build, thenpnpm --filter web lighthouse, still scores at least 0.95 in every category.The full repository loop didn't run. These checks did: the tests of
target-astroand every package that depends on it,target-astro's types, lint and format on the changed files, the L7 canary and full local integration runs.