[BUG] Elasticsearch returner does not support v8+
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
Starting with version 8, Elasticsearch removed document types. The
Elasticsearch returner requires the use of doc_type and (
despite spending over an hour digging through returner config loading) it's not
currently possible (at least without code changes) to turn that off.
Arguably, this could be considered a bug with how we load returner config
values. An example of what should work:
defaults = {'some': 'defaults', 'doc_type': 'default'}
config = defaults
config.update({'doc_type': None})
I couldn't figure out a reasonable way to do this without seriously modifying
the returner config loader.
Orthogonal to this issue is that we also can't use elasticsearch-py (pip
install elasticsearch) version 8, because one of the import statements no longer works with elasticsearch-py.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read salt/returners/elasticsearch_return.py at the linked returner configuration and salt/modules/elasticsearch.py at the linked import. Reproduce the failures with Elasticsearch 8+ and elasticsearch-py 8, then determine the affected configuration and compatibility paths. Done means the Elasticsearch returner and module work with those versions without requiring document types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, python
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100