-
Notifications
You must be signed in to change notification settings - Fork 6
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
exclude msw from vite dep optimization to fix playwright tests #29
Conversation
Playwright tests were failing, depending on which ones you run and on the number of Playwright workers. A consistent way to reproduce the problem was to run all tests with 3 Playwright workers. This caused the app e2e tests to fail beacuse of a 504 Outdated Optimize Dep response from node_modules/.vite/deps/msw.js. Excluding msw from the vite dep optimization seems to fix this issue. Note that using the --force flag or config option for vite dep optimization, might improve the situation, but didn't solve it.
lgtm, |
more on the pipeline issue with installing playwright: actions/runner-images#9733 temp fix might be to change |
I assume this will be fixed soon, so let's just review this as if the pipeline ran successfully. If it's not fixed by the end of the day/tomorrow morning(?), this fix by a GitHub employee seems like the way to go. |
issue with the Microsoft Ubuntu 22.04 repos was fixed! 🎉 |
exclude msw from vite dep optimization Playwright tests were failing, depending on which ones you run and on the number of Playwright workers. A consistent way to reproduce the problem was to run all tests with 3 Playwright workers. This caused the app e2e tests to fail beacuse of a 504 Outdated Optimize Dep response from node_modules/.vite/deps/msw.js. Excluding msw from the vite dep optimization seems to fix this issue. Note that using the --force flag or config option for vite dep optimization, might improve the situation, but didn't solve it.
exclude msw from vite dep optimization Playwright tests were failing, depending on which ones you run and on the number of Playwright workers. A consistent way to reproduce the problem was to run all tests with 3 Playwright workers. This caused the app e2e tests to fail beacuse of a 504 Outdated Optimize Dep response from node_modules/.vite/deps/msw.js. Excluding msw from the vite dep optimization seems to fix this issue. Note that using the --force flag or config option for vite dep optimization, might improve the situation, but didn't solve it.
analysis and solution
Playwright tests were failing, depending on which ones you run and on the number of Playwright workers. A consistent way to reproduce the problem was to run all tests with 3 Playwright workers. This caused the app e2e tests to fail beacuse of a 504 Outdated Optimize Dep response from node_modules/.vite/deps/msw.js.
Excluding msw from the vite dep optimization seems to fix this issue. Note that using the --force flag or config option for vite dep optimization, might improve the situation, but didn't solve it.
closes #28
notes on testing
npm run e2e -- --workers 3
consistently reproduced the issue, so that's a good start.npm run e2e -- --workers 8
did not reproduce the issue on my machine, so it's a good idea to play around with the number of workers. Note that--workers
also accepts a percentage, e.g.--workers 50%
(percentage of logical CPU cores).npm run e2e
should work, because that's the default way of running.Note that when running on GitHub Actions, number of workers is set to 100% through
playwright.config.ts
, i.e. both of the available cores. Which explains why this issue has not been occurring in our pipeline.