-
-
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
[16.0][FIX] upgrade_analysis: blacklist + no reinstall + UI tweaks #2739
base: 16.0
Are you sure you want to change the base?
[16.0][FIX] upgrade_analysis: blacklist + no reinstall + UI tweaks #2739
Conversation
Hi @StefanRijnhart, @legalsylvain, |
60bf9de
to
6d14f56
Compare
hi @pedrobaeza. Thanks for working on this module.
👍
👍
I don't use this module very often, so I don't have a clear point of view. But I remember that the analysis was performed when modules already installed were reinstalled. (but I don't know why). I'm not available for the next two weeks. I can look at this topic during OCA days in a little more detail. @StefanRijnhart perhaps you have an opinion on the subject? |
That part is not altered. The reinstallation takes place the same:
This is only for avoiding to reinstall on the first wizard. |
6d14f56
to
899d597
Compare
From https://github.com/OCA/server-tools/blob/15.0/upgrade_analysis/upgrade_log.py#L192-L197 I gather that not reinstalling all modules at this point might give different results if the code was updated in the mean time and new data records were added. This is a common situation in the timeframe surrounding a new Odoo release, so it's not completely safe. Maybe this can be made into an option defaulting to 'reinstall already installed modules'? |
Are you sure that statement is still applying? I did the analysis for 16.0, and didn't notice any problem. Anyway, it was just an improvement, so it's not the main fix at all, and I can remove it. |
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.
[FIX] Add to blacklist deprecated modules
LGTM, but I wonder this list should be better in the apriori.py file of the openupgrade project. (to have all the merged / renamed / deprecated changes in the same place).
[IMP] Don't reinstall installed modules
Not sure to understand. See inline.
[FIX] Proper UI in forms
👍
@@ -1,4 +1,9 @@ | |||
BLACKLIST_MODULES = [] | |||
BLACKLIST_MODULES = [ | |||
"payment_alipay", |
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. Naive question. How do you know this module is deprecated. it is installable in V16. the only way to find the information is to read the description of the manifest.
https://github.com/odoo/odoo/blob/16.0/addons/payment_alipay/__manifest__.py#L8
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.
Yes, @legalsylvain, I found it by the hard way, when errors arose, as @hbrunn found out in #3086
@@ -34,7 +34,7 @@ class UpgradeInstallWizard(models.TransientModel): | |||
def _module_ids_domain(self, extra_domain=None): | |||
domain = [ | |||
"&", | |||
("state", "not in", ["uninstallable", "unknown"]), | |||
("state", "not in", ["installed", "uninstallable", "unknown"]), |
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'm not sure to understand. how do you run the analysis of the base
module, that is allways installed.
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.
This is for reinstalling things, so no need to reinstall what is already installed.
This is a valid question. If it is safe to perform the analysis without a reinstall of installed modules (even if new xml records were added to these installed modules in the mean time), it should also be safe to skip this step entirely in the analysis process. We can then generate an analysis by only installing each module once on a fresh database. This is also easily testable: does a one step analysis and a two step analysis both yield equivalent results? |
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've scripted this for myself as creating all databases from scratch for all analysis runs, so I can't really say something about the reinstall question.
Yes, I ran it and got the same results, that were reflected in OCA/OpenUpgrade#4180. |
Odoo has deprecated such modules with a pre-hook raising an error, so they are not installable anymore. This way, we avoid them to be included in the Install Modules Wizard.
If a module is already installed, there's no need of reinstalling it.
The colspan property of some UI elements were not correctly adjusted to the v16 sytem. This commits fixes it.
899d597
to
673bbfa
Compare
/ocabot merge minor |
This PR looks fantastic, let's merge it! |
Thanks! The commit to not reinstall modules would have to be ported to17.0 |
@StefanRijnhart your merge command was aborted due to failed check(s), which you can inspect on this commit of 16.0-ocabot-merge-pr-2739-by-StefanRijnhart-bump-minor. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
This is #3066 hitting I'm going to deactivate such harmful test. |
Several patches for problems found when performing a OU analysis:
[FIX] Add to blacklist deprecated modules
Odoo has deprecated such modules with a pre-hook raising an error, so they are not installable anymore.
This way, we avoid them to be included in the Install Modules Wizard.
[IMP] Don't reinstall installed modules
If a module is already installed, there's no need of reinstalling it.
[FIX] Proper UI in forms
The colspan property of some UI elements were not correctly adjusted to the v16 sytem.
This commits fixes it.
@Tecnativa