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

support redis cluster transport #2204

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

zs-neo
Copy link

@zs-neo zs-neo commented Dec 10, 2024

Attempt to address #1021

Thank you very much for your code, it helps us a lot. @auvipy

We use redis-py instead of redis-py-cluster because redis-py-cluster has been merged into redis-py.
Celery works fine on our cluster with multi producers and multi consumers, when a node goes down, it can automatically switch.

celery==5.4.0
Django==4.1
django-celery-beat==2.7.0
django-celery-results==2.5.1
django-filter==24.3
django-redis==5.4.0
django-split-settings==0.3.0
django-timezone-field==5.1
djangorestframework==3.15.2
gunicorn==22.0.0
pyOpenSSL==21.0.0
redis==5.0.0
requests==2.22.0
uWSGI==2.0.18
app = Celery('celery_test', broker='rediscluster://:myredis@127.0.0.1:7024')

@Nusnus Nusnus self-requested a review December 10, 2024 13:52
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 86.76123% with 56 lines in your changes missing coverage. Please review.

Project coverage is 81.80%. Comparing base (a0175b0) to head (bb5ae45).

Files with missing lines Patch % Lines
kombu/transport/rediscluster.py 86.76% 34 Missing and 22 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2204      +/-   ##
==========================================
+ Coverage   81.50%   81.80%   +0.29%     
==========================================
  Files          77       78       +1     
  Lines        9524     9947     +423     
  Branches     1152     1228      +76     
==========================================
+ Hits         7763     8137     +374     
- Misses       1569     1597      +28     
- Partials      192      213      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zs-neo zs-neo marked this pull request as draft December 13, 2024 09:18
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

lets see if the CI passes

@zs-neo zs-neo force-pushed the feature/support_rediscluster_transport branch 4 times, most recently from dca3e75 to 9983557 Compare December 24, 2024 10:22
@zs-neo zs-neo closed this Dec 24, 2024
@zs-neo zs-neo force-pushed the feature/support_rediscluster_transport branch from f4d275a to f5c7356 Compare December 24, 2024 10:27
@zs-neo zs-neo reopened this Dec 24, 2024
@zs-neo zs-neo force-pushed the feature/support_rediscluster_transport branch from 5351519 to 6c0cadf Compare December 24, 2024 12:56
@zs-neo zs-neo force-pushed the feature/support_rediscluster_transport branch from c87be51 to 6986510 Compare December 25, 2024 06:56
@auvipy
Copy link
Member

auvipy commented Dec 25, 2024

Only one test is failing, due to connection failure

zhousheng06 and others added 3 commits December 25, 2024 15:55
@zs-neo zs-neo marked this pull request as ready for review December 25, 2024 07:58
zhousheng06 added 2 commits December 25, 2024 16:04
@zs-neo
Copy link
Author

zs-neo commented Dec 25, 2024

@auvipy @Nusnus ping :)
I fixed the issues I found recently and now this PR is ready.
I'm not a kombu expert, any suggestions are welcome

@Nusnus
Copy link
Member

Nusnus commented Dec 25, 2024

Check linter error :)

@zs-neo
Copy link
Author

zs-neo commented Dec 25, 2024

Sorry for the failure, I will fix it and improve the test coverage.

@auvipy
Copy link
Member

auvipy commented Dec 25, 2024

I am following it and already had reviewed it twice. Will have an in depth review again tomorrow. No worries. Thanks for picking my work

@Nusnus
Copy link
Member

Nusnus commented Dec 25, 2024

@zs-neo
Copy link
Author

zs-neo commented Dec 26, 2024

https://github.com/celery/kombu/actions/runs/12492830091/job/34860983164?pr=2204 SigmaOS 2024-12-25 14 40 56

Added docs for kombu.transport.rediscluster, now I'm sure there won't be problems anymore

Copy link
Member

@Nusnus Nusnus left a comment

Choose a reason for hiding this comment

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

Finally that everything passes on the CI, we can properly review the code.
That being said, we’re currently in a release phase so we can’t merge it until we complete the release, after the new year holidays.

Good work and thank you for fixing everything.

@lan17
Copy link

lan17 commented Jan 18, 2025

Would this also support Redis cluster for backend?

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.

4 participants