diff --git a/.ci/run-elasticsearch.sh b/.ci/run-elasticsearch.sh index a2424159b..a586603d2 100755 --- a/.ci/run-elasticsearch.sh +++ b/.ci/run-elasticsearch.sh @@ -157,6 +157,16 @@ fi echo -e "\033[34;1mINFO:\033[0m Starting container $NODE_NAME \033[0m" +# Pull the container, retry on failures up to 5 times with +# short delays between each attempt. Fixes most transient network errors. +docker_pull_attempts=0 +until [ "$docker_pull_attempts" -ge 5 ] +do + docker pull docker.elastic.co/elasticsearch/"$ELASTICSEARCH_VERSION" && break + docker_pull_attempts=$((docker_pull_attempts+1)) + sleep 10 +done + set -x docker run \ --name "$NODE_NAME" \ diff --git a/elasticsearch/_async/client/xpack.py b/elasticsearch/_async/client/xpack.py index 0725ab284..b55d98c1e 100644 --- a/elasticsearch/_async/client/xpack.py +++ b/elasticsearch/_async/client/xpack.py @@ -10,12 +10,14 @@ def __getattr__(self, attr_name): return getattr(self.client, attr_name) # AUTO-GENERATED-API-DEFINITIONS # - @query_params("categories") + @query_params("accept_enterprise", "categories") async def info(self, params=None, headers=None): """ Retrieves information about the installed X-Pack features. ``_ + :arg accept_enterprise: If an enterprise license is installed, + return the type and mode as 'enterprise' (default: false) :arg categories: Comma-separated list of info categories. Can be any of: build, license, features """ diff --git a/elasticsearch/client/xpack.py b/elasticsearch/client/xpack.py index 6a3906a8b..7d62a1024 100644 --- a/elasticsearch/client/xpack.py +++ b/elasticsearch/client/xpack.py @@ -10,12 +10,14 @@ def __getattr__(self, attr_name): return getattr(self.client, attr_name) # AUTO-GENERATED-API-DEFINITIONS # - @query_params("categories") + @query_params("accept_enterprise", "categories") def info(self, params=None, headers=None): """ Retrieves information about the installed X-Pack features. ``_ + :arg accept_enterprise: If an enterprise license is installed, + return the type and mode as 'enterprise' (default: false) :arg categories: Comma-separated list of info categories. Can be any of: build, license, features """ diff --git a/utils/generate_api.py b/utils/generate_api.py index 44076d664..d6cd00ffe 100644 --- a/utils/generate_api.py +++ b/utils/generate_api.py @@ -140,7 +140,7 @@ def __init__(self, namespace, name, definition): self.doc_url = definition["documentation"] else: # set as attribute so it may be overriden by Module.add - self.description = definition["documentation"].get("description", "") + self.description = definition["documentation"].get("description", "").strip() self.doc_url = definition["documentation"].get("url", "") # Filter out bad URL refs like 'TODO' diff --git a/utils/templates/base b/utils/templates/base index 12ae3fc51..103908cc6 100644 --- a/utils/templates/base +++ b/utils/templates/base @@ -12,7 +12,7 @@ {% for p, info in api.params %} {% filter wordwrap(72, wrapstring="\n ") %} - :arg {{ p }}: {{ info.description }} {% if info.options %} Valid choices: {{ info.options|join(", ") }}{% endif %} {% if info.default %} Default: {{ info.default }}{% endif %} + :arg {{ p }}: {{ info.description }}{% if info.options %} Valid choices: {{ info.options|join(", ") }}{% endif %}{% if info.default %} Default: {{ info.default }}{% endif %} {% endfilter %} {% endfor %}