Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-10719: Upgrade drupal/elasticsearch_connector major version #838

Merged
merged 5 commits into from
Nov 8, 2024

Conversation

hyrsky
Copy link
Contributor

@hyrsky hyrsky commented Nov 1, 2024

UHF-10719

What was done

  • This thing was fixed

We have had no visibility into Elasticsearch errors, and our current system does not raise any alarms if Elasticsearch goes down.

I have been looking into ways to improve this, and I believe that updating the elasticsearch_connector module is the best solution. The v7 version currently in use only displays messages with \Drupal::messenger() on errors. The next major version has much better error handling. In v8, all exceptions are logged, which raises Sentry errors as of UHF-10844.

Major changes

  • The module update upgrades PHP library elasticsearch/elasticsearch from v7 to v8. See the breaking changes at: Elasticsearch PHP API Breaking Changes.
  • Module update removes dependency to ruflin/elastica. I added this to helfi_platform_config's composer.json, so that the update would work. This can be removed later, since it is actually not used anywhere.
  • Elasticsearch field _language was removed. See hdbt PR for related changes.

How to install

  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update repo: git checkout UHF-10719-es-errors
  • Update the Helfi Platform config
    • composer require drupal/helfi_platform_config:dev-UHF-10719-es-errors drupal/hdbt:dev-UHF-10719-es-errors -W
  • Run: drush deploy

How to test

  •  Index with drush sapi-rt; drush sapi-c; drush sapi-i
  • Check the original issue: Drupal should log an error if there are no alive nodes in elasticsearch cluster.
  • Test helfi_paragraph_news component
  • Test react search apps
  • Check that code follows our standards

Continuous documentation

  • This feature has been documented/the documentation has been updated
  • This change doesn't require updates to the documentation

Translations

  • Translations have been added to .po -files and included in this PR

Other PRs

  • Link to other PR

@hyrsky hyrsky marked this pull request as ready for review November 4, 2024 07:03
Copy link

sonarcloud bot commented Nov 4, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants