-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: add TimeoutError handling in get_connection() #1485
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
Conversation
In get_connection() we can implicitly call read on a connection. This can timeout of the underlying TCP session is gone. With this change we remove it from the connection pool and get a new connection.
Codecov Report
@@ Coverage Diff @@
## master #1485 +/- ##
===========================================
+ Coverage 79.35% 91.99% +12.64%
===========================================
Files 108 108
Lines 27372 27373 +1
===========================================
+ Hits 21720 25183 +3463
+ Misses 5652 2190 -3462
Continue to review full report at Codecov.
|
This pull request is marked stale. It will be closed in 30 days if it is not updated. |
no comments? |
This pull request is marked stale. It will be closed in 30 days if it is not updated. |
guess no |
rebased again |
Hi @donbowman, will you have some time to complete the effort on this PR? I see that the same pattern exists in two more places in the recent master branch -
Can you please add the TimeoutError there as well? |
i guess, will it get looked at this time? i've rebased it several times in the last 4 years. |
@donbowman Yes, I checked if we can merge it, and once we have the requested changes, it will be good to go :) Thank you for your time and patience :) |
Is there any pointers on how to develop on this package? It uses something called hatch? i did 'hatch shell' and then 'pip install -r dev_requirements', and 'hatch test', but it gives errors even on master., e.g. |
The documentation on how to build the lib and run the tests is available in CONTRIBUTING.md |
Unforunately those instructions do not work on clean master. specifically, it has a conflict between redis-5.3.0b5 and redis-5.2.1
fails:
so the dev_requirements redis-entraid is incompatible. I worked around it by editing redis/init.py to say 5.3.0b3. Is it expected that master will build/test? Just trying to baseline before I put work in. |
In get_connection() we can implicitly call read on a connection. This can timeout of the underlying TCP session is gone. With this change we remove it from the connection pool and get a new connection.
ok requested changes made, tests pass locally. I was not sure what to do w/ the init.py, since the tests fail w/o bumping the version. |
In the pipeline, we uninstall the 5.03 dependency brought by entraid - quite uncomfortable for the contributors... I will add a separate PR to automate that and update the contribution guide because it will also be a problem for future relases. But for this change we should not yet increase the library version in init.py - we should keep the last stable version, 5.2.1. |
ok have reverted the version change and manually uninstalled the entraid package. |
Nothing else is needed :) Thank you for your efforts! |
* fix: add TimeoutError handling in get_connection() In get_connection() we can implicitly call read on a connection. This can timeout of the underlying TCP session is gone. With this change we remove it from the connection pool and get a new connection. * fix: add TimeoutError handling in get_connection() sync/async In get_connection() we can implicitly call read on a connection. This can timeout of the underlying TCP session is gone. With this change we remove it from the connection pool and get a new connection. * fix: update version number to match test expectations * fix: revert version number to 5.2.1, manually uninstall entraid
* fix: add TimeoutError handling in get_connection() In get_connection() we can implicitly call read on a connection. This can timeout of the underlying TCP session is gone. With this change we remove it from the connection pool and get a new connection. * fix: add TimeoutError handling in get_connection() sync/async In get_connection() we can implicitly call read on a connection. This can timeout of the underlying TCP session is gone. With this change we remove it from the connection pool and get a new connection. * fix: update version number to match test expectations * fix: revert version number to 5.2.1, manually uninstall entraid
Pull Request check-list
Please make sure to review and check all of these items:
$ tox
pass with this change (including linting)?NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
In get_connection() we can implicitly call read on a connection. This can timeout of the underlying TCP session is gone. With this change we remove it from the connection pool and get a new connection.
Note: I purposely made this fix against the 3.5.3 tag since master is not quite ready to publish.