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

elasticsearch/elasticsearch 6.8.0 removes some classes, and doesn't leave aliases behind #1112

Closed
reedy opened this issue Mar 8, 2021 · 1 comment

Comments

@reedy
Copy link
Contributor

reedy commented Mar 8, 2021

Summary of problem or feature request

Downstream tasks: https://phabricator.wikimedia.org/T276854, https://phabricator.wikimedia.org/T276320 and ruflin/Elastica#1908

Mentioned on 2da5f93

In 6.8, at least Elasticsearch\Endpoints\Indices\Aliases\Update disappeared. Therefore trying to instantiate it fails: Error from line 451 of /var/www/html/w/extensions/Elastica/vendor/ruflin/elastica/lib/Elastica/Index.php: Class 'Elasticsearch\Endpoints\Indices\Aliases\Update' not found

There is seemingly supposed to be an alias left behind, but that doesn't seem to have happened. Other classes seemingly disappeared too, without aliases being left.

Code snippet of problem

https://github.com/ruflin/Elastica/blob/6.x/lib/Elastica/Index.php#L451

use Elasticsearch\Endpoints\Indices\Aliases\Update;

$endpoint = new Update();

System details

  • Operating System: n/a
  • PHP Version: n/a
  • ES-PHP client version: 6.8.0
  • Elasticsearch version: n/a
wmfgerrit pushed a commit to wikimedia/mediawiki-extensions-Elastica that referenced this issue Mar 8, 2021
elasticsearch/elasticsearch 6.8.0 was released missing
some class aliases, so currently breaks expected semver
compatibility.

Therefore explicitly require elasticsearch/elasticsearch
~6.5.1 and ~6.7.2.

6.5.x supports ES >= 6.0, < 6.6; 6.5.4 is currently used
in WMF prod.
6.7.x supports ES >= 6.6, < 7.0.

This should be reverted when upstream bugs are fixed.

Upstream tasks:
* ruflin/Elastica#1908
* elastic/elasticsearch-php#1112

Bug: T276320
Bug: T276854
Change-Id: If00e4f871dbfa5572563f1eb5f60ded51f79a06b
wmfgerrit pushed a commit to wikimedia/mediawiki-extensions that referenced this issue Mar 8, 2021
* Update Elastica from branch 'REL1_35'
  to c101a4c17fff7e8711b0199cc9f7c342699e1221
  - Explicitly set elasticsearch/elasticsearch dependency
    
    elasticsearch/elasticsearch 6.8.0 was released missing
    some class aliases, so currently breaks expected semver
    compatibility.
    
    Therefore explicitly require elasticsearch/elasticsearch
    ~6.5.1 and ~6.7.2.
    
    6.5.x supports ES >= 6.0, < 6.6; 6.5.4 is currently used
    in WMF prod.
    6.7.x supports ES >= 6.6, < 7.0.
    
    This should be reverted when upstream bugs are fixed.
    
    Upstream tasks:
    * ruflin/Elastica#1908
    * elastic/elasticsearch-php#1112
    
    Bug: T276320
    Bug: T276854
    Change-Id: If00e4f871dbfa5572563f1eb5f60ded51f79a06b
wmfgerrit pushed a commit to wikimedia/mediawiki-extensions-Elastica that referenced this issue Mar 8, 2021
elasticsearch/elasticsearch 6.8.0 was released missing
some class aliases, so currently breaks expected semver
compatibility.

Therefore explicitly require elasticsearch/elasticsearch
~6.5.1 and ~6.7.2.

6.5.x supports ES >= 6.0, < 6.6; 6.5.4 is currently used
in WMF prod.
6.7.x supports ES >= 6.6, < 7.0.

This should be reverted when upstream bugs are fixed.

Upstream tasks:
* ruflin/Elastica#1908
* elastic/elasticsearch-php#1112

Bug: T276320
Bug: T276854
Change-Id: If00e4f871dbfa5572563f1eb5f60ded51f79a06b
wmfgerrit pushed a commit to wikimedia/mediawiki-extensions that referenced this issue Mar 8, 2021
* Update Elastica from branch 'master'
  to f86b3eb3bbf06b12262be75fce23c876bfbb211e
  - Explicitly set elasticsearch/elasticsearch dependency
    
    elasticsearch/elasticsearch 6.8.0 was released missing
    some class aliases, so currently breaks expected semver
    compatibility.
    
    Therefore explicitly require elasticsearch/elasticsearch
    ~6.5.1 and ~6.7.2.
    
    6.5.x supports ES >= 6.0, < 6.6; 6.5.4 is currently used
    in WMF prod.
    6.7.x supports ES >= 6.6, < 7.0.
    
    This should be reverted when upstream bugs are fixed.
    
    Upstream tasks:
    * ruflin/Elastica#1908
    * elastic/elasticsearch-php#1112
    
    Bug: T276320
    Bug: T276854
    Change-Id: If00e4f871dbfa5572563f1eb5f60ded51f79a06b
ezimuel added a commit that referenced this issue Mar 22, 2021
* Fix for #1112 issue. Adding endpoint aliases + IndicesNamespace::getAliases()

* Reverted array alias to class in src/autoload.php + added unit tests for missing class aliases in 6.8

* Fixed indentation in src/ autoload.php
ezimuel added a commit that referenced this issue Mar 22, 2021
* Update Transport.php

* Fix 6.8.0 release adding missing class alises (#1114)

* Fix for #1112 issue. Adding endpoint aliases + IndicesNamespace::getAliases()

* Reverted array alias to class in src/autoload.php + added unit tests for missing class aliases in 6.8

* Fixed indentation in src/ autoload.php

* Added TransportTest

Co-authored-by: Enrico Zimuel <[email protected]>
@ezimuel
Copy link
Contributor

ezimuel commented Mar 22, 2021

Just released 6.8.1 that fixes the issue.

@ezimuel ezimuel closed this as completed Mar 22, 2021
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

No branches or pull requests

2 participants