Support config overrides when editing a cluster

Created on 9 October 2021, about 3 years ago
Updated 4 March 2024, 9 months ago

Problem/Motivation

When applying a config override to the cluster's URL, the ClusterForm’s status info does not reference the override and shows the error message “No alive nodes found in your cluster”. This occurs even when the rest of the website connects successfully.

This is because the form’s clusterFormInfo() method only references the database's stored settings as opposed to the website’s loaded config for that cluster.

Steps to reproduce

I tend to specify the cluster’s port in a .env file so other website developers can use their own preferred local configuration of Elasticsearch. I have a config override in settings.php to set the cluster URL rather than using what’s actually stored in the cluster’s entity.

E.g. in settings.php: $config['elasticsearch_connector.cluster.docker']['url'] = "http://localhost:{$_ENV['ELASTICSEARCH_PORT']}";

Proposed resolution

May I suggest that the edit cluster form tests the live configuration for the entity rather than strictly what’s in the database?

Admittedly this practice can lead to some confusion because Drupal doesn’t indicate config overrides in the form UI ( see core issue 2408549 🐛 Display status message on configuration forms when there are overridden values Fixed ) but that’s the norm for this kind of website setup and changing the current behaviour would prevent a disconcerting error message, which can be very misleading when debugging other issues.

Feature request
Status

Active

Version

7.0

Component

Elasticsearch Connector

Created by

🇬🇧United Kingdom edjeavons

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024