odoo/enterprise#81526
Created by fw-bot
- label
- odoo-dev:saas-18.2-18.0-lazy_main_components-maki-423134-fw
- head
- 467ec950bb82cc682db98be67a0219aaf1e857ed
odoo/odoo | odoo/enterprise | |
---|---|---|
18.0 | #201771 | #81462 |
saas-18.1 | #201897 | #81517 |
saas-18.2 | #201915 | #81526 |
[FW][IMP] web_studio: 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 #81327
Related to : odoo/odoo#201771
Forward-Port-Of: #81462