Page MenuHomePhabricator

Bump rufin/elastica (and related libraries) to versions that support PHP 8.0
Closed, ResolvedPublic

Description

Right now we use:

  • ruflin/elastica on 6.1.5; 6.2.0 supports PHP 8.0
  • elasticsearch/elasticsearch on 6.5.1; >=6.8.0 supports PHP 8.0 but not PHP < 7.3

For ruflin/Elastica, the major version of the release matches the ES major release:

Screenshot 2021-02-15 at 21.12.28.png (658×1 px, 115 KB)

For elasticsearch/elasticsearch:

Screenshot 2021-02-15 at 21.12.46.png (722×968 px, 78 KB)

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedJdforrester-WMF
ResolvedNone
ResolvedReedy
ResolvedReedy
Resolvedmatthiasmullie
InvalidNone
ResolvedReedy
ResolvedEBernhardson
ResolvedGehel
ResolvedEBernhardson
ResolvedEBernhardson
Resolveddcausse
Resolveddcausse
Resolveddcausse
Resolveddcausse
Resolveddcausse
OpenNone
ResolvedEBernhardson
DuplicateNone
ResolvedEBernhardson
Resolved EJoseph
ResolvedEBernhardson
DuplicateNone
ResolvedGehel
Resolved EJoseph
Resolvedbking
Resolvedbking
ResolvedRKemper
ResolvedRKemper
ResolvedRKemper
ResolvedRKemper
ResolvedGehel
Resolvedbking
Resolvedbking
Resolvedbking
Resolvedbking
Resolvedbking
Resolvedbking
Resolvedbking
ResolvedEBernhardson
ResolvedEBernhardson
ResolvedTJones
Resolved Zbyszko
DeclinedNone
DeclinedNone
ResolvedTJones
ResolvedEBernhardson
DeclinedNone
Resolvedbd808
DeclinedNone
ResolvedEBernhardson
DeclinedNone
Resolveddcausse
ResolvedEBernhardson
ResolvedEBernhardson
ResolvedEBernhardson
Resolvedbking
ResolvedGehel
ResolvedGehel
ResolvedRKemper
ResolvedBUG REPORTEBernhardson
ResolvedEBernhardson
ResolvedRKemper
ResolvedEBernhardson
Resolvedkostajh

Event Timeline

CBogen triaged this task as High priority.Jan 25 2021, 4:19 PM
CBogen moved this task from needs triage to elastic / cirrus on the Discovery-Search board.
Reedy changed the task status from Open to Stalled.Feb 7 2021, 12:28 AM
Reedy subscribed.

Stalling. Upstream(s) haven't done the releases (and have gone a bit quiet)... And we're waiting on the upgrades of ES too..

https://github.com/elastic/elasticsearch-php/releases/tag/v7.11.0 is out. 7.x of elasticsearch-php only supports ES >= 7.x...

7.1 of ruflin/Elastica looks like it should be out pretty soon - https://github.com/ruflin/Elastica/pull/1871

Just pushed https://github.com/ruflin/Elastica/pull/1898 up too...

So we should be able to use 6.1.2 (when released!) to swap Match out for MatchQuery to unblock the parent tasks above this

Is 7.11.0 etc. based on the new non-OSI licence?

Is 7.11.0 etc. based on the new non-OSI licence?

I'm not sure... Does that license change apply to the the php libraries too?

https://github.com/elastic/elasticsearch-php/tree/v7.11.0 still has Apache/LGPL

Copyright 2013-2020 Elasticsearch B.V.

elasticsearch-php is licensed under the Apache License, Version 2.0
(<LICENSE-APACHE> or <http://www.apache.org/licenses/LICENSE-2.0>) or the GNU
Lesser General Public License, Version 2.1 (<LICENSE-LGPL> or
<https://www.gnu.org/licenses/lgpl-2.1.html>) at your option.

Maybe not? T272111 mentions it as a change from Apache 2.0 to SSPL, but the ruflin/elastica code is MIT… Did you have to sign a CLA to contribute? If not, presumably it's still MIT forever…

Maybe not? T272111 mentions it as a change from Apache 2.0 to SSPL, but the ruflin/elastica code is MIT… Did you have to sign a CLA to contribute? If not, presumably it's still MIT forever…

Noting ruflin/elastica != elasticsearch/elasticsearch

Reedy updated the task description. (Show Details)

Just pushed https://github.com/ruflin/Elastica/pull/1898 up too...

So we should be able to use 6.1.2 (when released!) to swap Match out for MatchQuery to unblock the parent tasks above this

6.1.2 is a-comin'.

https://github.com/ruflin/Elastica/pull/1901

Reedy renamed this task from Bump rufin/elastica (and related libraries) to versions that support PHP 8.0, when they exist to Bump rufin/elastica (and related libraries) to versions that support PHP 8.0.Mar 23 2021, 1:42 AM

Change 728475 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/Elastica@master] Upgrading ruflin/elastica (6.1.5 => 6.2.0)

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

Change 728473 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/vendor@master] Upgrading ruflin/elastica (6.1.5 => 6.2.0)

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

Reedy changed the task status from Stalled to Open.Oct 8 2021, 2:36 PM

The question I guess does become whether there is going to be an Elasticsearch upgrade to a version before T263142: [EPIC] Upgrade Elasticsearch to version 7.10...

Change 728521 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/Elastica@REL1_37] Upgrading ruflin/elastica (6.1.5 => 6.2.0)

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

Change 728523 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/Elastica@REL1_36] Upgrading ruflin/elastica (6.1.5 => 6.2.0)

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

Change 728525 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/Elastica@REL1_35] Upgrading ruflin/elastica (6.1.5 => 6.2.0)

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

The question I guess does become whether there is going to be an Elasticsearch upgrade to a version before T263142: [EPIC] Upgrade Elasticsearch to version 7.10...

Eh, maybe we can get in touch with upstream and ask for a minor release with PHP 7.2 AND 8 support? That would be 6.7.3, I guess... I see this commit bumped the requirements to PHP >= 7.1 which is great for our needs, but didn't pass tests due to the usual PHPUnit incompabilities, apparently, and the requirement was then updated to PHP >= 7.3. Perhaps add polyfills like for Elastica?

The question I guess does become whether there is going to be an Elasticsearch upgrade to a version before T263142: [EPIC] Upgrade Elasticsearch to version 7.10...

Eh, maybe we can get in touch with upstream and ask for a minor release with PHP 7.2 AND 8 support? That would be 6.7.3, I guess... I see this commit bumped the requirements to PHP >= 7.1 which is great for our needs, but didn't pass tests due to the usual PHPUnit incompabilities, apparently, and the requirement was then updated to PHP >= 7.3. Perhaps add polyfills like for Elastica?

There's also Elasticsearch version compatability/support issues with the library, not just the PHP concerns. elasticsearch-php 6.7 may work, but it's entirely possible it won't either.

https://github.com/elastic/elasticsearch-php#version-matrix

If you are using Elasticsearch 6.6 to 6.7, use Elasticsearch-PHP 6.7.x branch.

If you are using Elasticsearch 6.0 to 6.5, use Elasticsearch-PHP 6.5.x branch.

And we're using 6.5.4 of Elasticsearch itself...

So we'd really need changes in https://github.com/elastic/elasticsearch-php/tree/6.5.x and then another 6.5.x release of elasticsearch-php

The branch is untouched since Feb 2020, so maybe not supported, or else generally EOL?

https://github.com/elastic/elasticsearch-php/tree/6.7.x is a little better, being Feb 2021...

https://www.elastic.co/support/eol says 6.5.x is EOL since 2020-05-14. As are the rest of the 6.x releases

https://github.com/elastic/elasticsearch-php/releases/tag/v6.8.2 would seemingly be the last 6.x release.

I don't know how receptive of patches to these branches upstream may or may not be :)

Change 728521 merged by jenkins-bot:

[mediawiki/extensions/Elastica@REL1_37] Upgrading ruflin/elastica (6.1.5 => 6.2.0)

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

Change 728525 merged by jenkins-bot:

[mediawiki/extensions/Elastica@REL1_35] Upgrading ruflin/elastica (6.1.5 => 6.2.0)

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

Change 728523 merged by jenkins-bot:

[mediawiki/extensions/Elastica@REL1_36] Upgrading ruflin/elastica (6.1.5 => 6.2.0)

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

Change 728473 merged by jenkins-bot:

[mediawiki/vendor@master] Upgrading ruflin/elastica (6.1.5 => 6.2.0)

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

Change 728475 merged by jenkins-bot:

[mediawiki/extensions/Elastica@master] Upgrading ruflin/elastica (6.1.5 => 6.2.0)

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

Reedy changed the task status from Open to Stalled.Dec 17 2021, 4:52 PM

Marking stalled.

ruflin/elastica is now good. elasticsearch/elasticsearch needs at least 6.8.x (and 6.8.2 at time of writing) to allow PHP 8

https://github.com/elastic/elasticsearch-php/releases/tag/v6.8.0
https://github.com/elastic/elasticsearch-php/releases/tag/v6.8.1
https://github.com/elastic/elasticsearch-php/releases/tag/v6.8.2

So basically blocked on the T263142: [EPIC] Upgrade Elasticsearch to version 7.10 tree again... Though, more specifically T295666: Upgrade Cirrus elasticsearch clusters to 6.8.23 - when that is done, we can bump elasticsearch/elasticsearch in the Elastica extension and then MediaWiki-Vendor

Change 748168 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/Elastica@master] Allow elasticsearch/elasticsearch ~6.8.2

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

Change 748187 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/Elastica@REL1_37] Allow elasticsearch/elasticsearch ~6.8.2

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

Change 748188 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/Elastica@REL1_36] Allow elasticsearch/elasticsearch ~6.8.2

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

Change 748189 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/Elastica@REL1_35] Allow elasticsearch/elasticsearch ~6.8.2

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

Change 748168 merged by jenkins-bot:

[mediawiki/extensions/Elastica@master] Allow elasticsearch/elasticsearch ~6.8.2

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

Change 748187 merged by jenkins-bot:

[mediawiki/extensions/Elastica@REL1_37] Allow elasticsearch/elasticsearch ~6.8.2

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

Change 748188 merged by jenkins-bot:

[mediawiki/extensions/Elastica@REL1_36] Allow elasticsearch/elasticsearch ~6.8.2

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

Change 748189 merged by jenkins-bot:

[mediawiki/extensions/Elastica@REL1_35] Allow elasticsearch/elasticsearch ~6.8.2

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

dcausse changed the task status from Stalled to Open.May 18 2022, 6:41 PM
dcausse subscribed.

Marking as Open as this should be resolved "soon" as we plan to ship ruflin/Elastica 7.1.5 & elasticsearch/elasticsearch 7.11.0 as part of https://gerrit.wikimedia.org/r/c/mediawiki/vendor/+/791634 in the coming weeks.

Jdforrester-WMF assigned this task to EBernhardson.

Done in {dEELA1245f59b30fdcbc1b6a41de17d2c2b4b433d16a9} indeed.

Back-porting all this code for ES7 support in REL1_38 seems infeasible; we'll just declare it unavailable until REL1_39.