-
Notifications
You must be signed in to change notification settings - Fork 729
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 1.4.2 #738
Elasticsearch 1.4.2 #738
Conversation
I see about 85 tests failing: https://travis-ci.org/ruflin/Elastica/jobs/44939058 One of the problem seems to be the _createIndex function which is used by lots of tests: https://github.com/ruflin/Elastica/blob/master/test/lib/Elastica/Test/Base.php#L23 I assume some parameters with the shards or replicas have changed. |
@jdeniau Did you have any luck yet in fixing the issues? |
No sorry I did not look at it this week.
|
I worked on it today. I am down to ~15 errors for now, I will commit changes soon. |
82e5408
to
435c724
Compare
@jdeniau That looks really promising. Only 1 error left. Make sure to merge in master as there are also quite a few changes. I also started to work on it but you are already much farther: https://github.com/ruflin/Elastica/tree/elasticsearch-1.4.0 |
*/ | ||
public function getReadOnly() | ||
{ | ||
return $this->get('blocks.write') === 'true'; // ES returns a string for this setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable sounds so counterintuitive. But it is 100% correct. I also checked the ES docs.
The failing test is really weird. Actually, it goes well on my local instance of ES. // the document with the random score should have a score > 1, means it is the first result
$result0 = $results[1]->getData(); But the first document is |
4201e39
to
80632d3
Compare
c186d85
to
867ef2a
Compare
@@ -68,31 +68,33 @@ public function get($setting = '') | |||
$requestData = $this->request()->getData(); | |||
$data = reset($requestData); | |||
|
|||
if (empty($data['settings']) || empty($data['settings']['index'])) { | |||
return []; // index not found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we actually throw a not found exception here?
867ef2a
to
bce448a
Compare
Sorry to push a lot but I have some differences between travis and my localhost instance :( I took the responsability of removing the 5.3 support. I only did that to allow array short syntax, so it is easily revertable, but as the 5.3 version is not officially supported by the PHP developers, I think it is a good think to remove it. But it's up to you, if you want to revert, I'll do it. |
@jdeniau No problem. The main priority is getting 1.4.2 running. To make it then compatible again with 5.3 if necessary is an other thing. Lets not focus on this right now. |
@jdeniau All green. Let me know when I can merge. |
OK for me when the next build is OK. |
It's OK for me ! :) |
env: | ||
global: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block(9-16) was deleted by me in #742.
Packages versions should be specified in ansible/es-playbook.yml now.
Actually, travis built your pull request with ES 1.3.4, as i can see from logs :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking ...
@jdeniau Can you please have a look at this? |
There is an issue with that: ruflin#712 But as the Client object has a public setLogger method with a strong dependency on LoggerInterface, the psr/log is automatically a strong dependancy of the package.
d71f829
to
59e51c0
Compare
Finally 😎 Once merged, you can merge #735 (I updated it) |
@@ -12,10 +12,10 @@ | |||
} | |||
], | |||
"require": { | |||
"php": ">=5.3.3" | |||
"php": ">=5.3.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With arrays new syntax, ">=5.4.0"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that but got a weird bug with composer in the tests installation process:
https://travis-ci.org/ruflin/Elastica/builds/47757241
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've found a problem.
- ubuntu 12.04 default php version is 5.3
- ansible uses
sudo
internally for all steps - when you use phpenv as travis does,
php
andsudo php
is different versions of php sudo composer
can't satisfy ">=5.4" requirement, becase uses system php, which 5.3- ansible wipe out all stderr from composer so it fails silently =/
Moreover, vagrant box is broken again, as there only one php version - 5.3
I'll fix this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx. Looking forward to it.
@jdeniau I merged it in :-) That was a big pice of work. Thanks a lot. Will you keep an eye on elastic/elasticsearch#9203 ? I assume as soon as it is merged in and release, it will break again the implementation. |
@jdeniau BTW: I think we forgot to update the README: https://github.com/ruflin/Elastica/blob/master/README.markdown |
I created another PR #756 for this. Thanks for the merge ! For the metadata bug on ES itself, it will be part of a new ElasticSearch version. I'll watch about it. |
I tried to update to 1.4.2 (based on your 1.4.0 branch).
I now have 8 failing tests:
7 with this message :
The last one is that
Thread.sleep(100);
is not authorized anymore now by ESI do not know how to solve those problems :/