-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
OCA-git-bot
merged 18 commits into
OCA:14.0
from
legalsylvain:14.0-ADD-upgrade_analysis
Feb 26, 2021
Merged
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 565e328
[REF] run pre-commit
legalsylvain 6132505
[REF] rename module openupgrade_records into upgrade_analysis
legalsylvain 73b6194
[REF] rename files, apply OCA convention, remove obsolete 6.1 syntax,…
legalsylvain b341afb
[IMP] upgrade_analysis: improve install wizard to have the possibilit…
legalsylvain cca6118
[MOVE] Port patches and framework from openupgrade project
legalsylvain f8f40d3
[REF] rename framework files, adapt to new module names, remove print…
legalsylvain 1566339
[RFR] Improve patchwork
StefanRijnhart fb96b6d
[IMP] Create records with timestamp; [RFR] No /migration/ level when …
StefanRijnhart 41d604b
[FIX] ImportError;
StefanRijnhart 87422a1
[IMP] various improvment from Yajo.
legalsylvain 51559f7
[IMP] import apriori file of openupgrade_scripts, if available
legalsylvain 0178570
[RFR] upgrade_path not user writable
StefanRijnhart a5b7345
[ADD] Generate noupdate_changes
StefanRijnhart 5f68aef
[FIX] dataclasses for Python < 3.7
StefanRijnhart dd23e6f
Update upgrade_analysis/models/ir_module_module.py
legalsylvain 188ed85
[REM] remove obsolete roadmap point
legalsylvain 92c7bca
[IMP] remove pre-commit exception and fix various style in odoo_patch…
legalsylvain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# generated from manifests external_dependencies | ||
dataclasses | ||
odoorpc | ||
openupgradelib | ||
raven |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../upgrade_analysis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 functiontable_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
bygit+https://github.com/OCA/openupgradelib.git@master
There was a problem hiding this comment.
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.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
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 :
Could you say me what to do ?
thanks !
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
inrequirements.txt
)I propose to merge this PR as it. if someone see a better implementation, feel free to improve in another PR.