From 8ba7980bb25b85f25fe20f3fd5dd8e12b9b1214b Mon Sep 17 00:00:00 2001 From: Mike Baamonde Date: Wed, 17 Aug 2022 09:04:04 -0400 Subject: [PATCH] Link to the correct ES Python client docs. (#1554) We'll now programmatically set the ES client version in the docs build. --- docs/command_line_reference.rst | 2 +- docs/conf.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/command_line_reference.rst b/docs/command_line_reference.rst index 0d17f1f28..ea43ae0ac 100644 --- a/docs/command_line_reference.rst +++ b/docs/command_line_reference.rst @@ -663,7 +663,7 @@ By default, the command line reporter will print the results only on standard ou With this option you can customize Rally's internal Elasticsearch client. -It accepts a list of comma-separated key-value pairs. The key-value pairs have to be delimited by a colon. These options are passed directly to the Elasticsearch Python client API. See `their documentation on a list of supported options `_. +It accepts a list of comma-separated key-value pairs. The key-value pairs have to be delimited by a colon. These options are passed directly to the Elasticsearch Python client API. See `their documentation on a list of supported options `_. We support the following data types: diff --git a/docs/conf.py b/docs/conf.py index c45fb7122..62ecf1769 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,8 +54,15 @@ def read_min_python_version(): raise ConfigError(f"Failed building docs as required key [{e}] couldn't be found in the file [{CI_VARS}].") +def get_es_client_version(): + import elasticsearch + + return ".".join(map(str, elasticsearch.__version__)) + + GLOBAL_SUBSTITUTIONS = { "{MIN_PY_VER}": read_min_python_version(), + "{ES_CLIENT_VER}": get_es_client_version(), } @@ -82,6 +89,7 @@ def read_min_es_version(): .. |year| replace:: {year} .. |MIN_PY_VER| replace:: {read_min_python_version()} .. |min_es_version| replace:: {read_min_es_version()} +.. |ES_CLIENT_VER| replace:: {get_es_client_version()} """ # General information about the project.