[Client] Use wordpressInstallMode for Playground boot#3599
Conversation
|
Thank you! We should also completely remove any trace of |
| if ( | ||
| (shouldInstallWordPress === true || shouldBootWordPress === true) && | ||
| declarativeOptOut | ||
| wordpressWasRequestedExplicitly({ |
There was a problem hiding this comment.
we don't need a helper method, this could be just a const
There was a problem hiding this comment.
I tend agree but more for the reason that the helper method has the same complex boolean expression that could have been inserted here. What about we keep the helper method but change the boolean expression to simple ones with return statements.?
There was a problem hiding this comment.
Let's see what that expression looks like once there's no more shouldBootWordPress – I feel like it complicates the data flow.
There was a problem hiding this comment.
That seems not great and not terrible now. I'll go ahead and merge. We can keep iterating in a follow-up but I want to get rid of shouldBootWordPress before people start to use it.
|
From my perspective we can make this ready for review. |
|
@akirk we're already reviewing it anyway :-) |
|
@ashfame poke |
87b310e to
a658572
Compare
a658572 to
ea1b0f0
Compare
What it does
Uses
wordpressInstallModeas the single boot control for WordPress installation and PHP-only Playground sessions.Breaking change:
shouldBootWordPressis removed from the client and worker boot options. UsewordpressInstallMode: 'do-not-attempt-installing'to skip WordPress boot setup.Rationale
shouldInstallWordPressandshouldBootWordPresssplit one decision across two booleans and make PHP-only boot paths harder to reason about.wordpressInstallModealready names the behavior directly:download-and-installfor fresh WordPress installsinstall-from-existing-files-if-neededfor saved or mounted WordPress filesdo-not-attempt-installingfor PHP-only sessionsImplementation
The Blueprints v1 client resolves a concrete
wordpressInstallModebefore booting the remote worker. Inline Blueprints withpreferredVersions.wp: falseresolve todo-not-attempt-installingunless the caller explicitly requested WordPress, in which case the handler throws a conflict error.Website and Personal WP boot clients now pass
wordpressInstallModedirectly. The remote worker uses that mode to decide whether to download WordPress, run WordPress setup, or stop after mounting a PHP-only runtime.shouldInstallWordPressremains accepted for compatibility, but is deprecated and translated intowordpressInstallMode.Testing instructions