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

feat(migrations): introduce long-running migration system using Celery TASK-1394 #5379

Merged
merged 13 commits into from
Dec 18, 2024

Conversation

noliveleger
Copy link
Contributor

@noliveleger noliveleger commented Dec 18, 2024

📣 Summary

Added a new system for handling long-running migrations using Celery.

📖 Description

A new long-running migration system has been implemented, leveraging Celery to process migrations in the background. This system is designed to handle large-scale data updates that would otherwise cause require significant downtime with regular Django migrations

💭 Notes

This long-running migration system leverages Celery for asynchronous task processing. However, a similar (and likely more robust) feature is being developed in Django, as detailed in DEP 14 - Background Workers. Once Django officially releases its built-in background worker system, this custom solution will be phased out in favor of the native implementation to better align with the Django ecosystem.

@noliveleger noliveleger requested a review from Guitlle December 18, 2024 18:00
@noliveleger noliveleger mentioned this pull request Dec 18, 2024
9 tasks
kobo/apps/long_running_migrations/models.py Show resolved Hide resolved
kobo/apps/long_running_migrations/tasks.py Show resolved Hide resolved
kobo/apps/long_running_migrations/tasks.py Outdated Show resolved Hide resolved
@noliveleger noliveleger force-pushed the long-running-migrations branch from d40c568 to 658d953 Compare December 18, 2024 21:34
@noliveleger noliveleger changed the title Long running migrations feat(migrations): introduce long-running migration system using Celery Dec 18, 2024
…s is correct for transferred projects TASK-1352 (#5385)

### 📣 Summary
Extended the bug fix from #5365 to address issues in existing projects. 


### 📖 Description
This update addresses the issue where OpenRosa media file paths were not
updated correctly during project ownership transfers for existing
projects. This misalignment led to 404 errors when users attempted to
access transferred projects in Collect due to missing media files.

### Notes 
The fix leverages the new long-running migration flow to address the
issue in the background.
@noliveleger noliveleger self-assigned this Dec 18, 2024
@noliveleger noliveleger merged commit c71dde8 into release/2.024.33 Dec 18, 2024
6 checks passed
@noliveleger noliveleger deleted the long-running-migrations branch December 18, 2024 23:45
Copy link

@noliveleger noliveleger changed the title feat(migrations): introduce long-running migration system using Celery feat(migrations): introduce long-running migration system using Celery TASK-1394 Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants