Page MenuHomePhabricator

Set include_type_name in all get requests
Closed, ResolvedPublic2 Estimated Story Points

Description

[2021-08-12T18:00:46,783][WARN ][o.e.d.r.a.a.i.RestGetIndicesAction] [gXPW_Qb] [types removal] The parameter include_type_name should be explicitly specified in get indices requests to prepare for 7.0. In 7.0 include_type_name will default to 'false', which means responses will omit the type name in mapping definitions.

Event Timeline

MPhamWMF moved this task from needs triage to elastic / cirrus on the Discovery-Search board.
Gehel set the point value for this task to 2.Feb 28 2022, 4:41 PM

This ends up being a couple different things. The over-arching theme is that anything that creates/updates/verifies index settings or mappings triggers this error. I'm not seeing graceful ways to handle this from Elastica, they don't allow us to provide specific parameters to calls they abstract away. The Elastica layer is quite thin, it's easy enough to use Index::requestEndpoint instead of the wrapper methods that call endpoints. Otherwise it seems we would have to accept letting these trigger deprecations and handle them only in the 7.x branch. That isn't the end of the world, but I would be more confident in a smooth transition if we can resolve all the warnings in live deployed code.

Additionally the MetaStore needs a light refactoring, it was only partially reworked when type's were deprecated in 6.x. It's not significant work, but some effort none the less.

Change 770598 had a related patch set uploaded (by Ebernhardson; author: Ebernhardson):

[mediawiki/extensions/CirrusSearch@master] include_type_name: Avoid warnings when setting up an index

https://gerrit.wikimedia.org/r/770598

This needs to wait for 6.8 to be deployed to prod before we can start sending include_type_name. Going to split off a separate patch that will migrate metastore to _doc without doing the include_type_name parts.

Change 774548 had a related patch set uploaded (by Ebernhardson; author: Ebernhardson):

[mediawiki/extensions/CirrusSearch@es68] include_type_name: Index creation and status

https://gerrit.wikimedia.org/r/774548

Change 770598 abandoned by Ebernhardson:

[mediawiki/extensions/CirrusSearch@master] include_type_name: Avoid warnings when setting up an index

Reason:

submitted to es68 branch instead

https://gerrit.wikimedia.org/r/770598

Change 774548 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@es68] include_type_name: Index creation and status

https://gerrit.wikimedia.org/r/774548