-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
fix: Make Mealie Alpha Migrations More Fault Tolerant #3170
fix: Make Mealie Alpha Migrations More Fault Tolerant #3170
Conversation
@@ -109,6 +111,7 @@ def _save_all_entries(self) -> None: | |||
if not is_success and not is_failure: | |||
self.report.status = ReportSummaryStatus.partial | |||
|
|||
self.report.entries = new_entries |
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.
I don't know why this used to work. Since we're saving the report again without updating the report's entry list, it should delete all the report entries that we just created. It's doing that now, but I don't know why it wasn't doing that before
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.
LGTM
What type of PR is this?
(REQUIRED)
What this PR does / why we need it:
(REQUIRED)
This adds some additional
try except
logic when migrating from Mealie alpha, so bad recipes don't cause the entire migration to fail. It also restores some broken report functionality (probably broken from the Pydantic upgrade, but who knows) and updates the migration tests to catch if it breaks again.Which issue(s) this PR fixes:
(REQUIRED)
Fixes #3073
Testing
(fill-in or delete this section)
Added a test for bad data handling, and also updated the existing tests to verify the report entries are actually being generated