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

exposes faux stdSerializers test fail on node v19.9.0 #1690

Closed
rluvaton opened this issue Apr 11, 2023 · 6 comments · Fixed by #1701
Closed

exposes faux stdSerializers test fail on node v19.9.0 #1690

rluvaton opened this issue Apr 11, 2023 · 6 comments · Fixed by #1701

Comments

@rluvaton
Copy link
Contributor

The tests fail on node v19.9.0 on master:

 FAIL  test/browser.test.js
 ✖ pino.stdSerializers.errWithCause

  test: test/browser.test.js
  operator: ok
  expected: true
  actual: undefined
  at: Test.<anonymous> (/Users/rluvaton/dev/tmp/pino/test/browser.test.js:101:5)
  stack: >-
    Error: pino.stdSerializers.errWithCause
        at Test.assert [as _assert] (/Users/rluvaton/dev/tmp/pino/node_modules/tape/lib/test.js:312:48)
        at Test.bound [as _assert] (/Users/rluvaton/dev/tmp/pino/node_modules/tape/lib/test.js:95:17)
        at Test.assert (/Users/rluvaton/dev/tmp/pino/node_modules/tape/lib/test.js:431:7)
        at bound (/Users/rluvaton/dev/tmp/pino/node_modules/tape/lib/test.js:95:17)
        at Test.<anonymous> (/Users/rluvaton/dev/tmp/pino/test/browser.test.js:101:5)
        at Test.bound [as _cb] (/Users/rluvaton/dev/tmp/pino/node_modules/tape/lib/test.js:95:17)
        at Test.run (/Users/rluvaton/dev/tmp/pino/node_modules/tape/lib/test.js:115:28)
        at Test.bound [as run] (/Users/rluvaton/dev/tmp/pino/node_modules/tape/lib/test.js:95:17)
        at Immediate.next [as _onImmediate] (/Users/rluvaton/dev/tmp/pino/node_modules/tape/lib/results.js:157:7)
        at process.processImmediate (node:internal/timers:478:21)

reproduce:

nvm install 19.9.0
nvm use 19.9.0
npm i
npm test

this cause the CITGM tests in node to fail.

related PR:

@jsumners
Copy link
Member

Evidently, the browser code is tightly coupled to the pino-std-serializers export by defining a function for each of those exports at:

pino/browser.js

Lines 8 to 17 in b9ac6e3

const stdSerializers = {
mapHttpRequest: mock,
mapHttpResponse: mock,
wrapRequestSerializer: passthrough,
wrapResponseSerializer: passthrough,
wrapErrorSerializer: passthrough,
req: mock,
res: mock,
err: asErrValue
}

The tests then attempt to verify that the browser.stdSerializers export provides the same properties as pino.stdSerialzers (a direct = require('pino-std-serializers')) at:

pino/test/browser.test.js

Lines 99 to 102 in b9ac6e3

// make sure faux stdSerializers match pino-std-serializers
for (const serializer in pinoStdSerializers) {
ok(pino.stdSerializers[serializer], `pino.stdSerializers.${serializer}`)
}

@rluvaton
Copy link
Contributor Author

So you say it's https://github.com/pinojs/pino-std-serializers issue?

@jsumners
Copy link
Member

So you say it's https://github.com/pinojs/pino-std-serializers issue?

No. It's an issue here.

@mhdawson
Copy link
Contributor

This also seems to be affecting CITGM in the Node.js testing - https://ci.nodejs.org/job/citgm-smoker/nodes=rhel8-x64/3156/testReport/(root)/citgm/pino_v8_11_0/history/

@jsumners
Copy link
Member

We need someone to dig into the timeouts happening in our test suite #1691 (comment)

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants