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

[IMP] util/modules: force install of new modules #140

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jjmaksoud
Copy link
Contributor

@jjmaksoud jjmaksoud commented Sep 24, 2024

The method force_install_module only works when the module already exists in the database and changes its state immediately. For new modules this does not work unless the module is explicitly added, or we use the auto discovery methods instead.
A check _assert_modules_exists is also added to the force installation.

As a solution, the check for version is added to see if we can delay the force installation to post-base when the module is auto discovered, and the implementation is moved to _force_install_module. The calls for force_install_module are replaced in the following methods where the module is expected to exist:

  • merge_module
  • new_module_dep
  • trigger_auto_install
  • _trigger_auto_discovery

@robodoo
Copy link
Contributor

robodoo commented Sep 24, 2024

Pull request status dashboard

@jjmaksoud jjmaksoud force-pushed the master-force-install-new-modules-maji branch from bce810b to a312606 Compare September 24, 2024 08:58
@KangOl
Copy link
Contributor

KangOl commented Sep 24, 2024

upgradeci retry with always only base

src/util/modules.py Show resolved Hide resolved
src/util/modules.py Outdated Show resolved Hide resolved
@jjmaksoud jjmaksoud force-pushed the master-force-install-new-modules-maji branch from a312606 to 3fbd00d Compare September 25, 2024 09:42
src/util/modules.py Outdated Show resolved Hide resolved
src/util/modules.py Outdated Show resolved Hide resolved
@jjmaksoud jjmaksoud force-pushed the master-force-install-new-modules-maji branch 4 times, most recently from ef5d719 to d536368 Compare September 26, 2024 08:00
Copy link
Contributor

@KangOl KangOl left a comment

Choose a reason for hiding this comment

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

I would also add a call to _assert_modules_exists into the function _force_upgrade_of_fresh_module.

src/util/modules.py Outdated Show resolved Hide resolved
The method 'force_install_module' only works when the module
already exists in the database and changes its state immediately.
For new modules this does not work unless the module is explicitly
added, or we use the auto discovery methods instead.
@jjmaksoud jjmaksoud force-pushed the master-force-install-new-modules-maji branch from d536368 to 03c9ff4 Compare September 26, 2024 11:06
Copy link
Contributor

@KangOl KangOl left a comment

Choose a reason for hiding this comment

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

@KangOl
Copy link
Contributor

KangOl commented Sep 26, 2024

@robodoo r-

On hold until some retro-compatibility questions are sorted out.

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.

3 participants