-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Cleanup: Logging and some more #447
base: main
Are you sure you want to change the base?
Conversation
@@ -563,8 +563,8 @@ final class PostgresChannelHandler: ChannelDuplexHandler { | |||
_ cleanup: ConnectionStateMachine.ConnectionAction.CleanUpContext, | |||
context: ChannelHandlerContext | |||
) { | |||
self.logger.debug("Cleaning up and closing connection.", metadata: [.error: "\(cleanup.error)"]) | |||
|
|||
self.logger.debug("Cleaning up and closing connection.", metadata: [.error: "\(String(reflecting: cleanup.error))"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -280,7 +280,7 @@ final class PSQLRowStream: @unchecked Sendable { | |||
precondition(!newRows.isEmpty, "Expected to get rows!") | |||
self.eventLoop.preconditionInEventLoop() | |||
self.logger.trace("Row stream received rows", metadata: [ | |||
"row_count": "\(newRows.count)" | |||
.rowCount: "\(newRows.count)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inconsistency with all other log statements.
@@ -803,7 +803,7 @@ final class ConnectionPoolTests: XCTestCase { | |||
|
|||
pool.connectionReceivedNewMaxStreamSetting(connection, newMaxStreamSetting: 21) | |||
|
|||
for (index, request) in requests.enumerated() { | |||
for (_, request) in requests.enumerated() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning for unused variable.
@@ -22,7 +22,6 @@ extension PostgresJSONDecoder { | |||
} | |||
} | |||
|
|||
//@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 9.0, *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some Sendable warning for these 2 JSON-Coder conformances. I didn't try to solve them because someone (Fabian probably?) tried to solve them but apparently stopped at some point (judging by the comment).
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #447 +/- ##
==========================================
+ Coverage 62.18% 62.20% +0.02%
==========================================
Files 124 124
Lines 9936 9936
==========================================
+ Hits 6179 6181 +2
+ Misses 3757 3755 -2
|
Related #411. |
Logging as well as Errors currently suck in PostgresNIO. I'm allowed to say that, as I was the one who implemented those. We should come up with a better logging and error plan first. Sadly I'm currently extremely low on time. @MahdiBM would you be interested in moving this forward? |
@fabianfett sure, but I don't have a plan of myself. How should we proceed? |
<code-ql action is broken everywhere for now> |
No description provided.