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

fix: handle SSL errors in client handler #551

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Conversation

abc3
Copy link
Member

@abc3 abc3 commented Jan 17, 2025

No description provided.

@abc3 abc3 requested a review from a team as a code owner January 17, 2025 15:13

assert {:stop, {:shutdown, :ssl_error}} =
ClientHandler.handle_event(:info, error, nil, data)
end
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure if it is the proper way to test it. I do not even think that it is path that should be tested at all.

Copy link
Member Author

Choose a reason for hiding this comment

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

The client handler has many cases, and with this test, we can ensure that the function returns the proper response to incoming messages.

Copy link
Member

Choose a reason for hiding this comment

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

I still think it is improper way to handle it. I will probably merge it, but I think that this test should be scrapped in favour of doing real TLS connection that is killed before finishing handshake or killing the connection without proper exit messages.


assert {:stop, {:shutdown, :ssl_error}} =
ClientHandler.handle_event(:info, error, nil, data)
end
Copy link
Member

Choose a reason for hiding this comment

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

I still think it is improper way to handle it. I will probably merge it, but I think that this test should be scrapped in favour of doing real TLS connection that is killed before finishing handshake or killing the connection without proper exit messages.

@hauleth hauleth merged commit f073c3b into main Jan 20, 2025
7 checks passed
@hauleth hauleth deleted the fix/handle_ssl_error branch January 20, 2025 12:20
@blechatellier
Copy link

@hauleth since this was pushed live 8 hours ago in ap-southeast-2 we are running into Uncaught Exception: error: {:shutdown, :db_termination}

@hauleth
Copy link
Member

hauleth commented Jan 21, 2025

@blechatellier it got reverted to previous behaviour, but that particular region got reverted to previous release in general, so that issue should be gone. We are going to investigate the issue, because from what we have seen so far, it happens only with Node's pg and TLS-enabled connections, but only in ap-southeast-2 (other regions didn't report such problems). I will create separate issue to track work on this one.

@blechatellier
Copy link

Thanks @hauleth - happy to give you as much information as needed to help debug.

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