-
Notifications
You must be signed in to change notification settings - Fork 7
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
Lookup migrations tree to find some existing cache #14
Comments
I can't work only with CI caching, because I have to actively lookup if some cache exists. I need an external data store (S3?) to support it. |
Preparing to use external storages the django way.
Preparing to use external storages the django way.
I refactored the file handling to use django storage to make it easy to just implement a custom storage with django-storages or any other storage lib. To make it work with my project, I just defined a S3 storage and configured bucket policies.
|
I changed the migration hashing algorithm to use migrations tree and expected to be able to just remove last migration to look for older caches, but migrations are not time ordered. I can only trust last migration will run after all their dependencies. I'll try to find caches without the last migration for each app. It will not hit a cache if the commit has two migrations. If it works, I can try other algorithms for this search. |
It works! Version 0.3 running on a big project here, with a S3 storage. Reduced our jobs with migrations from 10 min to a few seconds. I'm using |
For big projects, migrations are really slow. This project fixes the problem when there is already a cache, but for every new migration it runs everything again.
I want to provide a way to rebuild the database based on "all except these new migrations I pushed now". After that, migrate the new migrations, should be really fast.
To do that, I have to understand how Django construct their migrations tree. I know django-linear-migrations worked with migrations tree recently.
The text was updated successfully, but these errors were encountered: