Upgrading module to version 8.3.0 from 8.2.2 causing some issue

Created on 7 February 2025, 8 months ago

Problem/Motivation

We recently tried to upgrade module version from 8.2.2 to 8.3.0.

And we ended up with some failure in CI Jobs.
When I compared the code changes https://git.drupalcode.org/project/search_api_pantheon/-/compare/8.2.2.....

config/optional/search_api_index.content_index.yml → config/install/search_api.index.primary.yml
config/install/search_api.server.pantheon_solr8.yml → config/install/search_api.server.pantheon_search.yml

and our existing search_api_server config still have id as pantheon_solr8

Do we need to update id in our existing server config?
and I see search_api_index.content_index.yml config also id is updated and the config is moved from config/optional to config/install.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Active

Version

8.3

Component

Miscellaneous

Created by

🇮🇳India nitesh624 Ranchi, India

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @nitesh624
  • 🇮🇳India nitesh624 Ranchi, India
  • 🇺🇸United States stovak Los Angeles

    Do not update existing solr configs. Sorry, this was changed for ci/testing purposes. Your current config should work. We had to start CI that tests the module on D10 & D11 for compatibility whereas before we were only testing on 9.

  • 🇮🇳India nitesh624 Ranchi, India

    Bot in our existing index config we are using

    dependencies:
      config:
        - search_api.server.pantheon_solr8
    server: pantheon_solr
    

    So as per the change in 8.3.1 version we need to update this to pantheon_search ?

  • 🇮🇳India nitesh624 Ranchi, India
  • 🇮🇳India nitesh624 Ranchi, India
  • 🇮🇳India nitesh624 Ranchi, India

    If this change is done for CI/testing purpose then this search_api.index.primary.yml should belongs to a test module.
    We didn't get this issue in 8.2.x because the yml file name is wrong search_api_index.content_index.yml. But in 8.3.x this yml file is corrected and we are getting below error On our local/CI instance where pantheon_search server is not available.

      [Drupal\search_api\SearchApiException]                                       
      The server with ID 'search_api_solr_drupal_server' could not be retrieved f  
      or index 'primary'. 
  • I'm seeing a similar problem in my project.

    We have our own custom search module that installs its own index config in /config/install. This config is using the pantheon_solr8 server as defined in the last line of the config: server: pantheon_solr8.

    The problem is, when we update the search_api_pantheon module to 8.3.x, we need to update that config via an update hook so the server line is now pantheon_search. The problem is, the pantheon_search server will not exist, because we aren't reinstalling search_api_pantheon. So this new /config/install/search_api.server.pantheon_search.yml file never gets installed.

    For new sites we spin up and enable our custom search module on, then sure...when search_api_pantheon gets enabled, it will be for the first time, so the new pantheon_search server config will get installed. For our existing sites though, they will still be using the pantheon_solr8 server because there is nothing in the 8.3.x version of this module that will update that for us.

    @stovak Perhaps that config should never have been renamed? If so, shouldn't there be something in an update hook that fixes this for us?

  • 🇮🇳India nitesh624 Ranchi, India

    There are some more issue we are seeing.
    Even if we update our index config to use updated server id "pantheon_search" we ended up with whole indexed data lost. and index is staged again for re-indexing

  • Status changed to Fixed 2 months ago
  • 🇨🇦Canada Roshny Kunjappan London

    We apologize for the issues you were facing because of the server id changes. From version 8.3.3 onwards, there will be an update hook to help with the migration of search server id. If you prefer to skip the search server id migration, you will be able to do that by adding default search server in your settings.php file like this
    $settings['default_search_server'] = 'pantheon_solr8';

    Please read the change log for detailed upgrade instructions , before you proceed with updating the module.

    Thank you all.

Production build 0.71.5 2024