-
Notifications
You must be signed in to change notification settings - Fork 198
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
redis-py >=4.4.0 breaking changes #348
Comments
Thanks for writing this up @bbrowning918! 🏅 |
I believe I tracked down and fixed the first issue you described. I have a PR ready in redis-py repo redis/redis-py#2607 |
Hi @jajce — I had a quick look at your branch in #353. The GHA workflows didn't complete. Locally it's hanging in
I haven't had a chance to dig more deeply yet, so I appreciate this is quite superficial — but maybe it gives you a breadcrumb… Thanks! |
@carltongibson yeah, unfortunately my PR in redis-py is supposed to fix only |
Ok, investigated a little bit more and will share what I've found so far. Now I am pretty much sure that both of the issues are related to the removal of channels_redis/tests/test_core.py Lines 589 to 591 in 89b29ad
our next receive , which is herechannels_redis/tests/test_core.py Line 594 in 89b29ad
will have to wait for 5 seconds channels_redis/channels_redis/core.py Line 81 in 89b29ad
channels_redis/channels_redis/core.py Lines 422 to 424 in 89b29ad
to pass till we are able to read response from our next redis command. In our case the first command we are sending to redis is our cleanup EVAL script and when we are getting to read response StreamReader waits for 5 seconds to pass till it actually reads response for EVAL command.
So on one hand it is very different behaviour compared to redis v4.3.5 which is an issue, but on the other hand according to the Redis documentation regarding blocking operations it is an intended behaviour and redis client connection is supposed to be blocked till timeout passes or till another client writes something to the list we are trying to pop from. I still need to understand how |
- test_receive_cancel failing with TypeError inside redis-py. - test_message_expiry__group_send__one_channel_expires_message hanging indefinitely. Added pytest-timeout with global timeout of 10s.
- test_receive_cancel failing with TypeError inside redis-py. - test_message_expiry__group_send__one_channel_expires_message hanging indefinitely. Added pytest-timeout with global timeout of 10s.
OK, I've marked the failing tests xfail for now in #356. This allows updating The current Python 3.11 failures are pending the next redis-py release redis/redis-py@4802530 (4.5.4 or greater.) Error in We have questions here:
I'll leave this issue to track. |
As per #358, we're going to skip PY311 tests until the next |
@carltongibson , |
Thanks @DmytroLitvinov. 513f859 |
@carltongibson after upgrading to 4.1.0 I got troubles when testing channel layers. I am using I suspected there was something that is not flushing properly between tests. Indeed, calling
I am trying to reproduce the issue with something simpler but it looks harder than expected. I struggle to understand what is going on under the hood when mixing up |
since the version 4 of channel redis version, the channel layer is not empty after the first read we read it again to empty it maybe it is related to django/channels_redis#348 or to django/channels_redis#366
since the version 4 of channel redis version, the channel layer is not empty after the first read we read it again to empty it maybe it is related to django/channels_redis#348 or to django/channels_redis#366
- test_receive_cancel failing with TypeError inside redis-py. - test_message_expiry__group_send__one_channel_expires_message hanging indefinitely. Added pytest-timeout with global timeout of 10s.
#377 added explicit testing against multiple redis-py versions:
Any of those should work. Please open a new issue if you hit problems with one of those versions. |
This issue is to help with visibility and discussion:
redis-py >=4.4.0 introduces two breaking issues for the test suite and real usage on
test_receive_cancel
in both core and sentinel will fail with "TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'" on the response to ZREMRANGEBYSCORE. In usage it has been noted in redis-py on Asyncio TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' redis/redis-py#2593 affecting normal lookingsend
calls.test_message_expiry__group_send__one_channel_expires_message
can hang indefinitely in the test suiteThese affect both unrelated changes/PRs and 4.0.0 in actual usage. The change log for redis-py 4.4.0 does not seem to have a smoking gun and pinning it to 4.3.5 has the test suite passing better.
The text was updated successfully, but these errors were encountered: