-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Handle UnpicklingError in persistent scheduler initialization #9952
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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9952 +/- ##
=======================================
Coverage 78.67% 78.67%
=======================================
Files 153 153
Lines 19304 19305 +1
Branches 2212 2212
=======================================
+ Hits 15188 15189 +1
Misses 3817 3817
Partials 299 299
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
7839b23 to
23f8d45
Compare
auvipy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please check why the failing unit tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds handling for pickle.UnpicklingError during persistent scheduler initialization and introduces a unit test to validate the behavior. This ensures corrupted pickled entries in the beat schedule do not crash initialization and are handled similarly to other corruption cases.
- Catch pickle.UnpicklingError when reading/initializing schedule entries in PersistentScheduler._create_schedule
- Add unit test to verify UnpicklingError triggers store cleanup via _destroy_open_corrupted_schedule
- Minor test import addition for pickle
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| t/unit/app/test_beat.py | Adds a test covering UnpicklingError handling during schedule creation; imports pickle for test exceptions |
| celery/beat.py | Extends exception handling in _create_schedule to include UnpicklingError and adjusts except clause to include dbm.error explicitly |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
85b1529 to
babdb98
Compare
|
now integration tests are failing, can you look into them? |
@auvipy I ran the integration tests in the master branch locally and they fail too. Also, I can't imagine how the failing tests are related to celery beat changes, as they call a task with |
yes, that failures were related to a newer version of dependency which is not related |
|
thanks! |
Fixes #9951