- Issue created by @lpeabody
- Merge request !850Call out to VDB clients to get their dependencies and return them. β (Open) created by lpeabody
I am going to add this as a bug report because of the presence of NewServerEventSubscriber::onConfigSave.
The VDB provider mechanism should implement a robust system of dependency calculations so that Search API implementations etc. can properly calculate dependencies that VDB provider plugins depend on. For example, when synchronizing a Search API Server configuration entity, its vital that the configured vdb provider plugin has all of its configuration dependencies resolved first.
An example of this is the OpenSearch connector. Client settings are stored in a separate configuration object maintained by the provider module. When the Search API server backed by the OpenSearch VDB plugin is imported for the first time, the NewServerEventSubscriber::onConfigSave method fires off and attempts to create the associated collection, but it can't because the connector settings configuration entity for OpenSearch hasn't been imported yet, so a PHP fatal error occurs. If the Search API server properly depended on the OpenSearch settings configuration entity then it would have worked as expected.
In any event, ideally the SearchApiAiSearchBackend would collect the dependencies from the configured VDB provider plugin and then merge those dependencies into its own. The Search API Server configuration entity already checks for backend plugin dependencies, so it should just work once the SearchApiAiSearchBackend plugin implements dependency calculation.
Please provide information like AI modules enabled, which AI provider, browser, etc.
Implement dependency calculation for the SearchApiAiSearchBackend plugin which in turn will gather dependencies from the configured VDB provider.
Probably should an an update hook which will iterate over all Search API servers that use the VDB backend provider and re-save the server configuration (which will trigger dependency calculation and modify active configuration accordingly).
Active
1.2
...to be triaged