Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ssg race condition #3521

Merged
merged 11 commits into from
Jan 9, 2025
Merged

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented Jan 8, 2025

Instead of a constant 1 second initial boot delay and 10 ssg rendering second delay, this PR tries to connect to the server every second for up to 5 seconds and waits until all routes are fully rendered before finishing ssg.

  • Fix implemented and tested on both reproduction and docsite
  • Playwright regression test

Fixes #3518
Stacked on #3488

@ealmloff ealmloff added bug Something isn't working cli Related to the dioxus-cli program static-generation labels Jan 8, 2025
@ealmloff ealmloff marked this pull request as ready for review January 8, 2025 17:29
@ealmloff ealmloff requested a review from jkelleyrtp January 8, 2025 17:41
Copy link
Member

@jkelleyrtp jkelleyrtp left a comment

Choose a reason for hiding this comment

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

Looks good! I didn't realize we just needed to await the .text() stream.

@jkelleyrtp jkelleyrtp merged commit 5b5e3d3 into DioxusLabs:main Jan 9, 2025
30 checks passed
pull bot pushed a commit to yzkee/dioxus that referenced this pull request Jan 9, 2025
* Fix server crash logging and opening fullstack apps

* Fix race condition during SSG

* move route prerendering into a separate stage

* Fix static site generation with dx serve

* only proxy the fullstack server if ssg is disabled

* test nested-suspense with ssg in playwright
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the dioxus-cli program static-generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static site generation race condition
2 participants