Skip to content

Conversation

@jjmaksoud
Copy link
Contributor

In the case where an autoninstall module is uninstalled by users prior to the upgrade start, this module could be reinstalled during the upgrade if there were dependency changes and those dependencies get force installed. This improvement keeps track of any module that was illegible for autoinstall before the upgrade starts and skips its force installation when dependencies change.

@robodoo
Copy link
Contributor

robodoo commented Dec 9, 2025

Pull request status dashboard

@jjmaksoud
Copy link
Contributor Author

upgradeci retry with only base iap_mail

@jjmaksoud jjmaksoud force-pushed the master-skip-autoinstall-removed-modules-maji branch from aec1a38 to 7464dda Compare December 9, 2025 10:05
@jjmaksoud
Copy link
Contributor Author

upgradeci retry with always only base iap_mail

@jjmaksoud jjmaksoud requested review from a team, aj-fuentes, asno-odoo and cawo-odoo December 9, 2025 10:08
@jjmaksoud jjmaksoud force-pushed the master-skip-autoinstall-removed-modules-maji branch from 7464dda to 4c2b786 Compare December 9, 2025 10:10
Copy link
Contributor

@aj-fuentes aj-fuentes left a comment

Choose a reason for hiding this comment

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

A first quick pass, some nits to keep the diff to the point :)

I will experiment with this a bit soon. Thanks!

@aj-fuentes
Copy link
Contributor

@jjmaksoud jjmaksoud force-pushed the master-skip-autoinstall-removed-modules-maji branch from 4c2b786 to 64feb35 Compare December 9, 2025 10:46
@jjmaksoud jjmaksoud force-pushed the master-skip-autoinstall-removed-modules-maji branch from 64feb35 to 888f583 Compare December 9, 2025 11:24
_assert_modules_exists(cr, module)
to_autoinstall = _get_autoinstallable_modules(cr, module)
if to_autoinstall:
if module in ENVIRON["__modules_to_skip_autoinstall"]:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This at the moment is not doing anything because the method trigger_auto_install is only called in the context of new_module and in some pre scripts also for new modules. But it does not hurt to keep it just in case, as the method can be called elsewhere

@jjmaksoud jjmaksoud force-pushed the master-skip-autoinstall-removed-modules-maji branch from 888f583 to 005e6a3 Compare December 9, 2025 12:30
Comment on lines 736 to 737
"Skipping the auto installation of module %r despite having all its auto install dependencies installed "
"by the force install of %r, because it was previously uninstalled."
Copy link
Contributor

Choose a reason for hiding this comment

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

We should make this more direct:

Suggested change
"Skipping the auto installation of module %r despite having all its auto install dependencies installed "
"by the force install of %r, because it was previously uninstalled."
"Module %r won't be auto installed because its original dependencies were already installed. "
"Yet all its auto install dependencies were installed by the force install of {!r}."
  • First we tell what we skip and why: no module installed
  • Then we we tell how we reached this point: as a result of an install of another module.

Both details are highly useful when debugging auto-install issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated, still not the smoothest sentence but it's for our own info anyway

In the case where an autoninstall module is uninstalled by
users prior to the upgrade start, this module could be
reinstalled during the upgrade if there were dependency
changes and those dependencies get force installed.
This improvement keeps track of any module that was
elligible for autoinstall before the upgrade starts and skips
its force installation when dependencies change.
@jjmaksoud jjmaksoud force-pushed the master-skip-autoinstall-removed-modules-maji branch from 005e6a3 to f319738 Compare December 9, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants