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

WIP : Introduce multi-stage caching #117

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebastienbeau
Copy link
Contributor

The idea is to install first core addons (with cache) then install additionnal addons.
This allow a better reuse of caching and also solve some installation cache (sometime we need first to install all core module)

I will battle test it.

@@ -65,9 +66,15 @@ def _db_storage(self):
IrAttachment._storage = orig


def odoo_createdb(dbname, demo, module_names, force_db_storage):
def odoo_createdb(dbcache, dbname, demo, module_names, force_db_storage):
core_module_names = set(module_names).intersection(core_addons[odoo.release.series])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For getting all core module needed we should be smarter and search from dependency of module_names

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sebastienbeau You can look at https://pypi.org/project/manifestoo/

@sbidoul I don't know if this is scheduled to integrate it here ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#114 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback I am going to look at it

@codecov-commenter
Copy link

codecov-commenter commented Jul 31, 2022

Codecov Report

Merging #117 (615318c) into master (478983c) will decrease coverage by 0.37%.
The diff coverage is 77.77%.

@@            Coverage Diff             @@
##           master     #117      +/-   ##
==========================================
- Coverage   93.16%   92.78%   -0.38%     
==========================================
  Files          14       14              
  Lines         892      901       +9     
  Branches      157      159       +2     
==========================================
+ Hits          831      836       +5     
- Misses         43       45       +2     
- Partials       18       20       +2     
Impacted Files Coverage Δ
click_odoo_contrib/initdb.py 95.14% <77.77%> (-1.81%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us.

@voronind
Copy link
Contributor

I think about multi-stage caching. It's be better to install modules in few stages.
Install subset of needed modules without files changed for last month(it's core and staled modules). Cache it. Then for last week. Cache it. Then for a day. Cache it. And then other modules.

@sbidoul sbidoul added the WIP label Sep 2, 2023
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.

5 participants