Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Improve test diagnostics and fix deprecated Elasticsearch calls #1373
Improve test diagnostics and fix deprecated Elasticsearch calls #1373
Changes from all commits
ade43ab
bdf9159
8515ec3
41eed44
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
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.
Is it necessary to explicitly define the elastic search version?
elasticsearch-dsl depends on elasticsearch, so it should be installed without specifying it directly.
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 think so, yes. Different versions of
elasticsearch
are introducing different functionality thatelasticsearch-dsl
is making use of in different ways. Currently DLS is making deprecated calls to the underlying package without pinning the version, so if we want to avoid deprecation warnings ourselves then I think this is the only choice.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.
Do you mean that we get deprecation warnings because the elasticsearch version is too old ?
And that elasticsearch it is not automatically updated when we update elasticsearch-dsl ?
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.
We get them because
elasticsearch_dsl
is using the Python API defined inelasticsearch
(the Python package) but is not completely up to date itself (and does not pin a specific version as it is a library).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.
So does Elasticsearch-dsl give you a deprecation warning when you use an older version(e.g. 7.1) of Elasticsearch ?
Anyway, I do not think this is a big enough issue to hold back this PR, so I have approved it.
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.
The Python client
elasticsearch
(not the database) follows the same version convention as the database, butelasticsearch_dsl
(the higher-level interface) just uses the major version to say they support v7 of the database. We were directly making calls to the low-levelelasticsearch
Python API (without adding it as an explicit dependency, until this PR) that have been deprecated (fixed in this PR), but the DSL is still making similar deprecated calls that we cannot fix at our end - I have added these to the pytest ignore list. Aselasticsearch-dsl
does not tightly pin the version ofelasticsearch
Python API, there is a chance that those calls get removed in a later version, which would also break our package unless we pin it.