- Notifications
You must be signed in to change notification settings - Fork 349
Fix Playground CLI boot from native dirs on Windows #2642
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
Conversation
expect(recreateRuntimeSpy).toHaveBeenCalledTimes(1); | ||
| ||
// Confirm the local NODEFS mount is lost | ||
// Confirm the local NODEFS mount is not lost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unrelated but looked like an incorrect comment to me based on the goal of the test.
NICE! |
We are getting this failure for Windows:
It looks like it has to do with our custom module loader. Looking. |
Because it is important Playground CLI run well on Windows, I installed Windows on a VM, set up a basic dev environment, and debugged the loader issues in Windows. It was difficult getting Now the loader is no longer complaining, but WP boot is failing with the following error:
@adamziel I am worried this could be a new issue in Windows after #2446 landed. Will check and follow up here. |
Side-note: I can reproduce the test runner error locally in Windows, so hopefully it will not be too hard to fix. |
@adamziel I tested and confirmed: I plan to focus on debugging this in the morning, but I wanted to let you know in case you want to revert or at least avoid tagging a new release until we fix the issue. |
I was able to fix the vitest config so the tests can run in Windows. After that, they start running into the sqlite connection error. |
OK, it looks like the
If I move I am considering what we should do here in the short term. I don't yet know the root cause, but we could remove the package dependency entirely until we know more. It would basically mean that the SQLite database wouldn't appear to be locked for external programs, but multi-worker Playground CLI would still coordinate locking to avoid corrupting the database via multiple workers. cc @adamziel |
79ab1da
to 666a3b0
Compare The easiest solution seems to be removing fs-ext from dependencies and opening a long-term pr to re-add it. |
...unless it's installed globally. Dang. Okay, can we use fs-ext based on an env variable or a cli flag? So it won't be loaded unless explicitly requested |
@adamziel, for now, I just updated the run-cli logic to avoid loading fs-ext when Does this sound OK? |
When running the full test suite in Windows, I (and I believe CI as well) were encountering failures to allocate new memory. It seemed to have something to do with the test count rather than with specific tests. I wonder if allocations of previous runCLI() calls are not being GC'd somehow during test. As a compromise in order to get some Windows tests in, I just added a condition to run a single run-cli test for auto-mounting a WordPress dir. Then, if we have time later, we can attempt to address the issue and expand the tests that are run for Windows. I also ended up disabling the tests for macOS because they were running into |
@adamziel this PR morphed into a bug-fix PR. I think it is ready for review and merge if you're good with the approach. |
Yay! Good find and thank you Brandon! |
Motivation for the change, related issues
I began this PR to run the Playground CLI tests on Windows:
But once we started running those tests, we found a bug that prevented Playground CLI boot in Windows when mount a native
/wordpress
directory. Since #2446 landed, every Playground CLI instance mounts a native directory to/wordress
. This is an important fix.So this PR became a bug-fixing PR that also enables some Playground CLI tests for Windows.
Implementation details
fs-ext
package for file locking in Windows because related "RESOURCE BUSY" errors were interfering with boot.Testing Instructions (or ideally a Blueprint)