From a87dcef8f5da6dfa1a9fc6ad8584c3224fc5c7b5 Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Mon, 16 Jun 2025 14:08:28 +0200 Subject: [PATCH] [FIX] connector_elastic: timeout and retry impl. PR #208 introduced configurable timeouts and retries on the ES backend. However the implementation only added this feature for auth_type api_key and not for HTTP simple auth. This pull request adds the missing support. --- connector_elasticsearch/tools/adapter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/connector_elasticsearch/tools/adapter.py b/connector_elasticsearch/tools/adapter.py index 948a44c2..5380b238 100644 --- a/connector_elasticsearch/tools/adapter.py +++ b/connector_elasticsearch/tools/adapter.py @@ -68,7 +68,12 @@ def _get_es_client(self): if backend.auth_type == "http": auth = (backend.es_user, backend.es_password) return elasticsearch.Elasticsearch( - [backend.es_server_host], http_auth=auth, use_ssl=backend.ssl + [backend.es_server_host], + http_auth=auth, + use_ssl=backend.ssl, + timeout=max(backend.es_timeout, 1), + retry_on_timeout=backend.es_retry_on_timeout, + max_retries=max(0, backend.es_max_retries), ) def test_connection(self):