graphql-nexus/nexus-prisma

e2e tests are failing randomly on dependencies installation part

rostislav-simonik opened this issue · 1 comments

Each e2e test is installing dependencies on its own. Which from time to time results in failure. The Windows runner with node 18 is affected the most. Wasn't able to investigate the root problem.

Currently, we are installing dependencies with npm packager. I have tried with yarn it gets a better ratio but the problem is still there. pnpm gets even better results, my guess is it's somehow related to network connectivity failures.

E2E tests also take too much to execute, the major part of its installation of dependencies.

Unless we identify the root issue I'm recommending introducing the following changes

  • short-term: replace with yarn packager -> shorter installation time, decreases rates of failure.
    • it's low complexity, it requires just replacing npm run install with yarn install
  • medium-term: replace with pnpm packager -> it reduces installation even more than yarn, and also decreases rates of failure.
    • it requires a little bit of refactoring of tests, to fix output for prisma and nexus-prisma and to fix post-install script for prisma@4.0.0 version.

By adding more logs in #578 I have narrowed the issue to the installation of dependencies, added logic to kill installation if it crosses the expected period, and added retry logic (max up to 3 retries)