Implement missing _delete() method of filesystem.Channel#2470
Implement missing _delete() method of filesystem.Channel#2470WojciechMigda wants to merge 13 commits intocelery:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Implements the missing filesystem transport Channel._delete() behavior so that deleting a queue also removes its binding from the exchange’s persisted routing table (control files), preventing bindings from leaking across test cases and runs.
Changes:
- Add
Channel._delete()to updatecontrol_folder/<exchange>.exchangewhen queues are deleted. - Expand filesystem transport unit tests to validate exchange-table updates after
Queue.delete(). - Isolate tests via per-test temporary
control_folderand explicit cleanup of temp folders/bindings.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
kombu/transport/filesystem.py |
Adds _delete() to remove bindings from the persisted exchange routing table file. |
t/unit/transport/test_filesystem.py |
Adds assertions around binding-table contents and improves test isolation/cleanup for filesystem transport. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
I'll take care of this. |
Duplicated temporary folder removal code was extracted to WithJanitorMixin class. Safe queue deletion was taken care of by creating managed_consumer function, decorated with contextlib.contextmanager.
for more information, see https://pre-commit.ci
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2470 +/- ##
==========================================
- Coverage 82.23% 82.21% -0.02%
==========================================
Files 79 79
Lines 10080 10103 +23
Branches 1151 1154 +3
==========================================
+ Hits 8289 8306 +17
- Misses 1589 1591 +2
- Partials 202 206 +4 ☔ View full report in Codecov by Sentry. |
auvipy
left a comment
There was a problem hiding this comment.
would you mind improving the test coverage, Please?
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 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>
Sure thing. |
As of now, Channel class of filesystem transport does not have a _delete method. It prevents queues from being removed from an associated exchange. This PR intents to remedy that.