elastic / rally

Macrobenchmarking framework for Elasticsearch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update ES Python client version to support include_empty_fields in field caps API

gbanasiak opened this issue · comments

This became visible after elastic/rally-tracks#562.

2024-02-19 00:22:57,437 ActorAddr-(T|:42217)/PID:25267 esrally.driver.driver INFO Worker[0] executing tasks: ['field-caps-exclude-empty-fields', 'field-caps-exclude-empty-fields']
2024-02-19 00:22:57,441 ActorAddr-(T|:42217)/PID:25267 esrally.driver.driver ERROR Could not execute schedule
Traceback (most recent call last):
  File "/home/esbench/rally/esrally/driver/driver.py", line 1934, in __call__
    total_ops, total_ops_unit, request_meta_data = await execute_single(runner, self.es, params, self.on_error)
                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/esbench/rally/esrally/driver/driver.py", line 2028, in execute_single
    return_value = await runner(es, params)
                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/esbench/rally/esrally/driver/runner.py", line 298, in __call__
    return await self.delegate(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/esbench/rally/esrally/driver/runner.py", line 413, in __call__
    return_value = await self.delegate(*args)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/esbench/rally/esrally/driver/runner.py", line 346, in __call__
    return await self.delegate(self.client_extractor(args[0]), *args[1:])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/esbench/rally/esrally/driver/runner.py", line 2850, in __call__
    await es.field_caps(index=index, body=body, fields=fields, params=request_params)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/esbench/.local/lib/python3.11/site-packages/elasticsearch/_sync/client/utils.py", line 414, in wrapped
    return api(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
TypeError: AsyncElasticsearch.field_caps() got an unexpected keyword argument 'include_empty_fields'

The support for include_empty_fields request parameter is included in current ES Python client main branch (src), so should be released with the next version.

Note that include_empty_fields is specified to be 8.13 only: elastic/elasticsearch-specification#2413 was not backported. This means Rally has to wait for elasticsearch-py 8.13.0, which should be out some time next month.