Add auto lock renewal for azure service bus channel#2446
Add auto lock renewal for azure service bus channel#2446tuschla wants to merge 20 commits intocelery:mainfrom
Conversation
for more information, see https://pre-commit.ci
|
thanks for reviving it |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2446 +/- ##
==========================================
+ Coverage 82.37% 82.51% +0.13%
==========================================
Files 79 79
Lines 10116 10133 +17
Branches 1159 1162 +3
==========================================
+ Hits 8333 8361 +28
+ Misses 1580 1570 -10
+ Partials 203 202 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Pull request overview
This pull request adds automatic lock renewal functionality for Azure Service Bus channels, which helps prevent messages from being re-queued when processing takes longer than the lock timeout.
Changes:
- Added support for automatic lock renewal via the Azure SDK's AutoLockRenewer class
- Introduced two new transport options:
use_lock_renewalandmax_lock_renewal_duration - Added comprehensive tests for the new functionality
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| kombu/transport/azureservicebus.py | Added AutoLockRenewer import, new transport options with defaults, renewer lifecycle management in _get_asb_receiver and close methods, and cached properties for configuration |
| t/unit/transport/test_azureservicebus.py | Added three new tests: config initialization, receiver logic with renewer creation/reuse, and safe channel closure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This was already proposed here but never finalized. I added some tests as requested previously. Please let me know if you still require me to change something, so we can get this merged quicker this time around.
closing #1788