Problem/Motivation

Config action setupVdbServerWithDefaults uses getDefaultDatabase() method when backend_config => database_settings => database_name value is empty in the recipe input. As Postgres might not be allowed to create databases and the setting actually already exists in module settings, maybe it would be better to re-use it here to avoid setting non-existing database name.

Steps to reproduce

1. Install the module and configure.
2. Try to create search api server with postgres provider and AI backend. Put different non-existing database name in the backed settings.
3. Observe that Server is not able to connect to database, because it doesn't exist.
4. The same is for the config action, if no database_name is selected it tries to use the method getDefaultDatabase() but it actually doesn't exist for the provider class.

Proposed resolution

Implement the method and use the configured database name.
Optionally force the configured database name in Search API Server configuration.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

a.dmitriiev created an issue. See original summary.

a.dmitriiev’s picture

Status: Active » Needs review

  • a.dmitriiev committed daff0ea8 on 1.0.x
    Issue #3594427: Use configured database for Search API server setup
    
marcus_johansson’s picture

Status: Needs review » Fixed

Looks good! Getting merged

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.