odoo/odoo#201771
Created by Discuss, Maryam Kia (maki)
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- ci/l10n: (runtime 0s)
- label
- odoo-dev:18.0-lazy_main_components-maki
- head
- defc98b989763d79c92c72920efe19ad76a97695
- merged
- 4 months ago by Discuss, Alexandre Kühn (aku)
odoo/odoo | odoo/enterprise | |
---|---|---|
18.0 | #201771 | #81462 |
saas-18.1 | #201897 | #81517 |
saas-18.2 | #201915 | #81526 |
[IMP] mail: registering main components via services
When we create a public root, we do:
- Create env
- Wait for services to load
- Create MainComponentsContainer
In a usual scenario, all the services are started in the second step above, so when we create the MainComponentsContainer, all the services we need are already
available. The problem with the lazy loading chatter bundle is that one of the
services in the second step is responsible for loading that bundle. So while
the lazy bundle is loading, new services and main components are being added to
the registry.
The steps could become like this:
- Create env
- Wait for services to start
- Start loading chatter bundle
- Lazy services (from chatter bundle) are not yet completely started
- Main components of the lazy bundle are added to the registry
- Lazy services are completely started
It might cause a crash due to unavailable services when the main components are added depends on the timing of the deployment of the lazy services.
This PR defines a new service for each main component that are added through the
chatter bundle to ensure that main components are registered when their
dependent services are deployed.
backport of #201504
Related to: odoo/enterprise#81462