Page MenuHomePhabricator

Prevent elasticsearch from being disabled on Wikis after some failure
Closed, ResolvedPublic

Description

Right now it appears that when some platform API jobs fail we have code that then goes and disables elasticsearch for that wiki.
We don't want this to happen; after all we aspire to provide an ES solution for all of our users.
Instead we want to know that something has failed so that we can get on and try to fix it.

There may be more but the following are places where the ElasticSearch backed search state seems to be erroneously changed:
https://github.com/wbstack/api/blame/258eb3ee94bf422b395e07df0d8503acf57e766f/app/Jobs/CirrusSearch/CirrusSearchJob.php#L62
https://github.com/wbstack/api/blame/258eb3ee94bf422b395e07df0d8503acf57e766f/app/Jobs/CirrusSearch/ElasticSearchIndexInit.php#L14
https://github.com/wbstack/api/blame/258eb3ee94bf422b395e07df0d8503acf57e766f/app/Jobs/CirrusSearch/ElasticSearchIndexInit.php#L53

Acceptance Criteria:

  • No failures should result in changing a wiki's elasticsearch setting state

Event Timeline

Tarrow updated the task description. (Show Details)
Tarrow updated the task description. (Show Details)

I tried testing this PR locally with the Cirrus Patch from https://phabricator.wikimedia.org/T327428#8775552 which previously made the ES initialization of other wikis than the first one fail, and so ES got disabled for them. That doesn't happen anymore with this PR :)

Evelien_WMDE claimed this task.