Problem/Motivation

10.0.4 includes an update hook search_api_attachments_update_8004 which reruns a previous update hook to set default values.

However, we have already deployed 10.0.3 with the value changed from default.

This leads to the value for cache_backend being changed in the update hook - which then leads to the cache backend we were using being cleared due to the config event subscriber. This is a very undesirable outcome for us as we have a large file cache in place.

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

ericgsmith created an issue. See original summary.

ericgsmith’s picture

Title: 10.0.4 reruns update hook without checking value - leading to unintentional change of config » 10.0.4 reruns update hook without checking value - leading to unintentional change of config and clearing of cache
ericgsmith’s picture

Issue summary: View changes
izus’s picture

oh good catch
please suggest a patch or MR
thanks for this

ericgsmith’s picture

Assigned: Unassigned » ericgsmith

ericgsmith changed the visibility of the branch 3533059-update-hook-changes-previously-set-value to hidden.

ericgsmith changed the visibility of the branch 3533059-update-hook-changes-previously-set-value to active.

ericgsmith’s picture

Assigned: ericgsmith » Unassigned
Status: Active » Needs review

Looking at #3532203: Could not find the fields "Path to java executable" and "Path to Tika .jar file" I've updated the search_api_attachments_update_8004 so that it only modified the config if needed, and doesn't touch the cache backend value set by the previous update hook.

It will be too late for sites who have already updated, but some warning text on the 10.0.4 release notes could be a good idea.

  • ericgsmith committed 37315a1c on 9.0.x
    Issue #3533059: Do not change cache backend if correcting scheme
    
izus’s picture

Status: Needs review » Fixed

this is now merged
10.0.5 was published and warning added to 10.0.4 as suggested
many thanks ericgsmith

izus’s picture

Status: Fixed » Closed (fixed)