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 is flaky #4888

Closed
2 tasks done
Uzlopak opened this issue Jul 8, 2023 · 5 comments · Fixed by #4841
Closed
2 tasks done

ci is flaky #4888

Uzlopak opened this issue Jul 8, 2023 · 5 comments · Fixed by #4841

Comments

@Uzlopak
Copy link
Contributor

Uzlopak commented Jul 8, 2023

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

CI is annoyingly flaky.

But somehow it is everytime some other place where it fails.

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Jul 8, 2023

https://github.com/fastify/fastify/actions/runs/5496464439/jobs/10016529451

# Subtest: test/serial/logger.1.test.js
...   
        # Subtest: file option
            1..6
            ok 1 - expect truthy value
            not ok 2 - ENOENT: no such file or directory, open '/tmp/sonic-boom-3492-204,605947142-0'
              ---
              errno: -2
              code: ENOENT
              syscall: open
              path: /tmp/sonic-boom-3492-204,605947142-0
              tapCaught: uncaughtException
              test: file option
              ...

Why it fails is not clear. In other runs it works without any issue.

We could write a touch equivalent to potentially avoid it again. Like createTempFile in logger.1.test.js changed to this:

function createTempFile () {
  const file = path.join(os.tmpdir(), `sonic-boom-${process.pid}-${process.hrtime().toString()}-${count++}`)

  try {
    fs.utimesSync(file, new Date(), new Date());
  } catch (e) {
      let fd = fs.openSync(file, 'a');
      fs.closeSync(fd);
  }

  function cleanup () {
    try {
      fs.unlinkSync(file)
    } catch { }
  }
  return { file, cleanup }
}

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Jul 8, 2023

In https://github.com/fastify/fastify/actions/runs/5495909672/jobs/10015589787 the same test fails:

        # Subtest: file option
            1..6
            ok 1 - expect truthy value
            ok 2 - should match pattern provided
            not ok 3 - timeout!
              ---
              signal: SIGTERM
              handles:
                - type: Server
                  events:
                    - request
                    - connection
                    - clientError
                  connectionKey: 6:::1:0
              expired: TAP
              stack: >
                emit
                (node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js:105:13)
              
                process.listener (node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js:123:9)
              
                process.emit (node_modules/.pnpm/source-map-support@0.5.21/node_modules/source-map-support/source-map-support.js:516:21)
              test: file option
              ...

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Jul 9, 2023

again
https://github.com/fastify/fastify/actions/runs/5500549397/jobs/10023532410

       # Subtest: file option
            1..6
            ok 1 - expect truthy value
            ok 2 - should match pattern provided
            not ok 3 - timeout!
              ---
              signal: SIGTERM
              handles:
                - type: Server
                  events:
                    - request
                    - connection
                    - clientError
                  connectionKey: 6:::1:0
              expired: TAP
              stack: >
                emit
                (node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js:105:13)
              
                process.listener (node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js:123:9)
              
                process.emit (node_modules/.pnpm/source-map-support@0.5.21/node_modules/source-map-support/source-map-support.js:516:21)
              test: file option

@metcoder95
Copy link
Member

All of them are within pnpm, is there pnpm doing something extra while running or has problems with Node v20?

@mcollina
Copy link
Member

There are still a few bugs in Node.js v20 to fix. I think #4841 would give us more stable runs.

@Uzlopak Uzlopak linked a pull request Jul 12, 2023 that will close this issue
2 tasks
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

Successfully merging a pull request may close this issue.

3 participants