Attempt to fix inconsistent error#1152
Conversation
|
I think we'd still want the fast fail logic, to be able to quickly surface an error to all waiting clients. But we'd want want that error to contain the original error message too, in addition to the error about the fast failure being triggered. |
|
Yeah I think that makes sense. Will figure out how to make that happen. |
|
Just pushed a new commit that restores the fast fail logic but saves the previous error message to present to clients. Let me know if this is more in the right direction. Also not sure why this is failing on freebsd and one of the Linux test sets. Will look into this. |
JelteF
left a comment
There was a problem hiding this comment.
I think this is good overall. For the FreeBSD failure, feel free to just get it to pass by skipping the test. The error reporting on FreeBSD to the client is known to be bad/broken in the test suite.
Co-authored-by: Jelte Fennema-Nio <github-tech@jeltef.nl>
Co-authored-by: Jelte Fennema-Nio <github-tech@jeltef.nl>
Changed the test so that it skips FreeBSD. I'm still seeing FreeBSD fail with the message |
|
Indeed. I asked Cirrus Labs about the FreeBSD image and it seems we are using an EOL image. I created ande merged the PR #1183 to fix it. Revert the skip and fix the other tests. |
Can confirm that the image update fixed #1138 and #1137. Still seeing some flakiness on some of the test runs in this PR though. |
|
@JelteF I believe that I was able to get the tests to work on test/test_auth.py::{test_change_server_password_reconnect,test_change_server_password_server_lifetime} by adding a sleep statement at the end. Possibly that test needed more time in order for the final error message to hit the log before the Either way let me know if this needs more work or it looks good to you. |
The new error message test introduced by pgbouncer#1152 is failing on Windows. This slipped past CI, because Windows CI was broken completely before pgbouncer#1216. For now this disables the test on Windows to make CI green, but it might be nice to actually fix the behaviour.
This changes `server_login_retry` to also cache the error message. This makes it much easier to debug an authentication problem between PgBouncer and Postgres, because now the client always sees the message, not just the first time. Before you'd have to check the PgBouncer logs to find the actual error message. Fixes pgbouncer#1149
The new error message test introduced by pgbouncer#1152 is failing on Windows. This slipped past CI, because Windows CI was broken completely before pgbouncer#1216. For now this disables the test on Windows to make CI green, but it might be nice to actually fix the behaviour.
This changes
server_login_retryto also cache the error message. This makes it much easier to debug an authentication problem between PgBouncer and Postgres, because now the client always sees the message, not just the first time. Before you'd have to check the PgBouncer logs to find the actual error message.Fixes #1149