You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix E2E tests on macOS when STUDIO_RUNTIME=native-php (#3301)
## Related issues
<!--
Link a related issue to this PR. If the PR does not immediately resolve
the issue,
for example, it requires a separate deployment to production, avoid
using the "Fixes" keyword and use "Related to" instead.
-->
- Fixes RSM-1725
## How AI was used in this PR
<!--
Help reviewers understand what to look for and verify that you've
reviewed the code yourself.
-->
Primarily to help me debug the problem. I alternated between Claude and
Codex.
## Proposed Changes
While working on #3271,
@bcotrim discovered that the E2E tests were failing when run with
`STUDIO_RUNTIME=native-php`. This PR fixes that by implementing the
following fixes:
- When Studio clones a site, explicitly update the site URL. Playground
can handle this internally, but the native PHP runtime obviously cannot.
- On Posix platforms, spawn process daemon children with `detached:
true` to assign them to a new process group. This is so we can pass a
negative PID to `process.kill` to terminate the entire process group
(the Node.js process and the associated PHP process). This approach
isn't bulletproof, but it's alright, and it works for the purpose of the
E2E tests.
- Favor SIGTERM over SIGKILL when killing child processes to give them a
chance to clean up.
## Testing Instructions
<!--
Add as many details as possible to help others reproduce the issue and
test the fix.
"Before / After" screenshots can also be very helpful when the change is
visual.
-->
Run the E2E tests locally on macOS by following these steps:
1. `npm run package`
2. `STUDIO_RUNTIME=native-php npm run e2e`
3. Ensure that they pass successfully
## Pre-merge Checklist
<!--
Complete applicable items on this checklist **before** merging into
trunk. Inapplicable items can be left unchecked.
Both the PR author and reviewer are responsible for ensuring the
checklist is completed.
-->
- [ ] Have you checked for TypeScript, React or other console errors?
0 commit comments