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

[14.0] ADD upgrade_analysis #1941

Merged
merged 18 commits into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
448d869
[MOVE] openupgrade_records : move module from OCA/OpenUpgrade (branch…
legalsylvain Nov 6, 2020
565e328
[REF] run pre-commit
legalsylvain Nov 6, 2020
6132505
[REF] rename module openupgrade_records into upgrade_analysis
legalsylvain Nov 6, 2020
73b6194
[REF] rename files, apply OCA convention, remove obsolete 6.1 syntax,…
legalsylvain Nov 6, 2020
b341afb
[IMP] upgrade_analysis: improve install wizard to have the possibilit…
legalsylvain Nov 6, 2020
cca6118
[MOVE] Port patches and framework from openupgrade project
legalsylvain Nov 7, 2020
f8f40d3
[REF] rename framework files, adapt to new module names, remove print…
legalsylvain Nov 7, 2020
1566339
[RFR] Improve patchwork
StefanRijnhart Dec 1, 2020
fb96b6d
[IMP] Create records with timestamp; [RFR] No /migration/ level when …
StefanRijnhart Dec 6, 2020
41d604b
[FIX] ImportError;
StefanRijnhart Dec 7, 2020
87422a1
[IMP] various improvment from Yajo.
legalsylvain Dec 7, 2020
51559f7
[IMP] import apriori file of openupgrade_scripts, if available
legalsylvain Dec 7, 2020
0178570
[RFR] upgrade_path not user writable
StefanRijnhart Dec 8, 2020
a5b7345
[ADD] Generate noupdate_changes
StefanRijnhart Dec 11, 2020
5f68aef
[FIX] dataclasses for Python < 3.7
StefanRijnhart Dec 11, 2020
dd23e6f
Update upgrade_analysis/models/ir_module_module.py
legalsylvain Jan 20, 2021
188ed85
[REM] remove obsolete roadmap point
legalsylvain Feb 24, 2021
92c7bca
[IMP] remove pre-commit exception and fix various style in odoo_patch…
legalsylvain Feb 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# generated from manifests external_dependencies
dataclasses
odoorpc
openupgradelib
Copy link
Member

Choose a reason for hiding this comment

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

Don't you need to do a git install from master for openupgradelib? AFAIK the pypi version is always bad...

Copy link
Member

Choose a reason for hiding this comment

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

I confirm it's a bear trap to install openupgrade lib from pypi

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well. Not sure to understand. When executing a migration with openupgrade project, yes we have to have the up to date library, because some function are oftently added / refactored / etc...

But for that module (upgrade_analysis) it is using only a function table_exists here and that function is quite simple & stable.
https://github.com/OCA/openupgradelib/blob/master/openupgradelib/openupgrade_tools.py#L30

But, if you prefer, I can replace openupgradelib by git+https://github.com/OCA/openupgradelib.git@master

Copy link
Member

Choose a reason for hiding this comment

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

It's better to always put the latest one, as we can even patch that method or improve this module using other methods of openupgradelib when needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi. I have a problem with that change. It is making fail the pre-commit process :

Generate requirements.txt for an addons directory........................Failed
- hook id: setuptools-odoo-get-requirements
- files were modified by this hook

Could you say me what to do ?

thanks !

Copy link
Member

Choose a reason for hiding this comment

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

ah... 🤦🏼‍♂️

Could you please try just removing the openupgradelib line from here? I guess that dependency should be present in CIs always... (but I'm not sure)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, I can not remove this line, because pre-commit readd this line ;-)

Generate requirements.txt for an addons directory

I so commited again what pre-commit suggests. (I mean openupgradelib in requirements.txt)

I propose to merge this PR as it. if someone see a better implementation, feel free to improve in another PR.

raven
1 change: 1 addition & 0 deletions setup/upgrade_analysis/odoo/addons/upgrade_analysis
6 changes: 6 additions & 0 deletions setup/upgrade_analysis/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
8 changes: 8 additions & 0 deletions upgrade_analysis/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
================
Upgrade Analysis
================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6 changes: 6 additions & 0 deletions upgrade_analysis/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from . import odoo_patch
from . import models
from . import wizards
from . import blacklist
from . import compare
from . import upgrade_log
26 changes: 26 additions & 0 deletions upgrade_analysis/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2011-2015 Therp BV <https://therp.nl>
# Copyright 2016 Opener B.V. <https://opener.am>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Upgrade Analysis",
"summary": "performs a difference analysis between modules"
" installed on two different Odoo instances",
"version": "14.0.1.0.0",
"category": "Migration",
"author": "Therp BV, Opener B.V., GRAP, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-tools",
"data": [
"security/ir.model.access.csv",
"views/menu.xml",
"views/view_upgrade_comparison_config.xml",
"views/view_upgrade_analysis.xml",
"views/view_upgrade_record.xml",
"wizards/view_upgrade_generate_record_wizard.xml",
"wizards/view_upgrade_install_wizard.xml",
],
"installable": True,
"external_dependencies": {
"python": ["dataclasses", "odoorpc", "openupgradelib"],
yajo marked this conversation as resolved.
Show resolved Hide resolved
},
"license": "AGPL-3",
}
10 changes: 10 additions & 0 deletions upgrade_analysis/blacklist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
BLACKLIST_MODULES = []

# the hw_* modules are not affected by a migration as they don't
# contain any ORM functionality, but they do start up threads that
# delay the process and spit out annoying log messages continously.

# We also don't want to analyze tests modules
BLACKLIST_MODULES_STARTS_WITH = ["hw_", "test_"]

BLACKLIST_MODULES_ENDS_WITH = ["_test"]
Loading