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

Pino 7 upgrade #13

Merged
merged 16 commits into from
Oct 6, 2021
Merged

Pino 7 upgrade #13

merged 16 commits into from
Oct 6, 2021

Conversation

Eomm
Copy link
Contributor

@Eomm Eomm commented Sep 24, 2021

Readme.md Outdated Show resolved Hide resolved
app.js Outdated Show resolved Hide resolved
lib/rfc3164.js Show resolved Hide resolved
lib/rfc5424.js Show resolved Hide resolved
Co-authored-by: James Sumners <james@sumners.email>
@jsumners
Copy link
Member

Not sure it matters since this should be a new major, but tests are failing on 12.

@mcollina
Copy link
Member

We are still supporting v12 in pino@7.

@mcollina mcollina mentioned this pull request Sep 27, 2021
13 tasks
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jsumners
Copy link
Member

We are still supporting v12 in pino@7.

Then tests should pass.

lib/transport.js Outdated Show resolved Hide resolved
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to embed pino-socket. This module is supposed to be used with it and transports cannot be piped together.

@jsumners
Copy link
Member

They are independent modules. We don't know what people do with the socket module. It's really, really, generic and can be used for many things even outside of Pino logs. It should remain a standalone module. Instead, we should be able to pipe transports into one another.

@mcollina
Copy link
Member

I meant to add that functionality here, not viceversa as this module is supposed to work with pino-socket.
Anyway, I'll add the concept of a pipeline to the transport system.

@Eomm
Copy link
Contributor Author

Eomm commented Sep 29, 2021

I think this needs to embed pino-socket. This module is supposed to be used with it and transports cannot be piped together.

I will try to integrate it

@Eomm
Copy link
Contributor Author

Eomm commented Sep 30, 2021

Readme.md Show resolved Hide resolved
Readme.md Show resolved Hide resolved
t.teardown(() => {
serverSocket.close()
serverSocket.unref()
transport.end()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add this line to make it works on node12.

I thought it was due the duplexyfy stream, that accepts these two parameters:

      autoDestroy: true,
      destroy: true

But it was not.
Nether the underlining socket.unref() was the issue.

I would like to understand why the transport doesn't close.
I still don not figured it out.

Copy link
Member

@mcollina mcollina Sep 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the problem? why the test did not pass? It might be a bug in my code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tap triggers a timeout error - locally within an infinity timeout, the process does not end without any errors

test/transport.test.js Outdated Show resolved Hide resolved
@mcollina
Copy link
Member

mcollina commented Oct 4, 2021

@Eomm pino@7.0.0-rc.8 is out, you can use update this and use pipeline.

@Eomm
Copy link
Contributor Author

Eomm commented Oct 4, 2021

@Eomm pino@7.0.0-rc.8 is out, you can use update this and use pipeline.

Done

Readme.md Show resolved Hide resolved
Readme.md Outdated Show resolved Hide resolved
@Eomm
Copy link
Contributor Author

Eomm commented Oct 6, 2021

There is something else I can do on this PR?

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina
Copy link
Member

mcollina commented Oct 6, 2021

@jsumners anything left for you?

@mcollina mcollina merged commit cffcb32 into pinojs:master Oct 6, 2021
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 this pull request may close these issues.

3 participants