Skip to content
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

CI: Sporadic failures in example-start running multiple servers #657

Closed
MikeMcC399 opened this issue Dec 10, 2022 · 2 comments
Closed

CI: Sporadic failures in example-start running multiple servers #657

MikeMcC399 opened this issue Dec 10, 2022 · 2 comments

Comments

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Dec 10, 2022

Description

.github/workflows/example-start.yml sometimes fails running jobs with multiple servers activated.

Although different jobs are failing, the log always shows the same information in the case of failure:

> example-start@1.0.0 start
> serve public

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: EEXIST: file already exists, mkdir '/tmp/update-check'] {
  errno: -17,
  code: 'EEXIST',
  syscall: 'mkdir',
  path: '/tmp/update-check'
}

When a job with multiple servers succeeds, the log contains the following snippet, for example from job 6185404477:

> example-start@1.0.0 start2
> serve -p 8000 public


> example-start@1.0.0 start
> serve public

UPDATE AVAILABLE The latest version of `serve` is 14.1.2
UPDATE AVAILABLE The latest version of `serve` is 14.1.2
INFO: Accepting connections at http://localhost:8000
INFO: Accepting connections at http://localhost:3000

Bug history

View workflow logs via https://github.com/cypress-io/github-action/actions/workflows/example-start.yml?query=branch%3Amaster

Job Id Multiple
servers
Failures Failure job
start no no -
start-multiple yes yes 6019775968
start-multiple-commas yes yes 6185404872
start-v10 no no -
start-multiple-v10 yes yes 6151398085
start-multiple-commas-v10 yes yes 6056302589

The workflow has been failing on merges into the master branch on a regular basis since January 2022. Due to log retention policies only recent detailed logs going back 90 days are available. Job 4915627223 from September 14, 2022 is the earliest concrete evidence of the exact same failure.

Steps to reproduce the issue

Open a pull request to trigger a run of .github/workflows/example-start.yml

View the results on https://github.com/cypress-io/github-action/actions/workflows/example-start.yml

Expected behavior

All sub-tests of .github/workflows/example-start.yml should run reliably and succeed.

Analysis

The parallel tests make use of npm module serve 13.0.2, see:

and they invoke:

  • serve public
  • serve -p 8000 public

update-check is a dependency of and invoked by serve. update-check appears not to be thread safe and it seems that two instances of update-check collide when they attempt to create the directory /tmp/update-check.

There is an undocumented environment variable NO_UPDATE_CHECK which can be set to 1 to disable the update check. See PR vercel/serve#457.

Suggested Fix

  1. Disable update-check through environment variable NO_UPDATE_CHECK = 1.
  2. Update serve to the latest version (14.1.2). serve Version 14 requires a minimum of Node.js 14. This is compatible with GHA v5 which removes Node.js 12 support.
@MikeMcC399
Copy link
Collaborator Author

@MikeMcC399
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant