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

click-odoo-update: new CLI option to control files that are part of the modules hash #83

Open
yassinelachgar opened this issue Nov 4, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@yassinelachgar
Copy link

As far as I know, changes in .py files does not imply a module update for the changes to work. Would it not be optimal to detect changes only in XML files ?

The problem here is that a simple change in .py file triggers the module updates which takes additional time when running the server.

@sbidoul
Copy link
Member

sbidoul commented Nov 4, 2020

Yes it is necessary because python files contain model and field definitions that need a database upgrade when changed.

@sbidoul sbidoul added the question Further information is requested label Nov 4, 2020
@yassinelachgar
Copy link
Author

yassinelachgar commented Nov 4, 2020

Oh right, I totally missed that. But it would be nice if there was an option --ignore-py in case of minor changes that dont contain models or fields definition, don't you think ?

@sbidoul
Copy link
Member

sbidoul commented Nov 4, 2020

There is already a system parameter in the database to control which files are part of the hash:

PARAM_EXCLUDE_PATTERNS = "module_auto_update.exclude_patterns"
DEFAULT_EXCLUDE_PATTERNS = "*.pyc,*.pyo,i18n/*.pot,i18n_extra/*.pot,static/*"

It could be interesting to control it with a CLI option too -- although it is a potential footgun :).

@yassinelachgar
Copy link
Author

Merci stéphane 👍

@sbidoul sbidoul changed the title click-odoo-update: is checksum change detection in *.py necessary ? click-odoo-update: new CLI option to control files that are part of the modules hash Nov 4, 2020
@sbidoul sbidoul added enhancement New feature or request and removed question Further information is requested labels Nov 4, 2020
@yassinelachgar
Copy link
Author

If it's okay I'll work on a PR for this feature.

@sbidoul
Copy link
Member

sbidoul commented Nov 4, 2020

If it's okay I'll work on a PR for this feature.

@yassinelachgar that is very welcome, thank you. I might be interesting to discuss the CLI option first (i.e. update the documentation in the README before coding). Also, when it comes to it, don't forget tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants