diff --git a/CHANGELOG.md b/CHANGELOG.md index 8adde59..457c73f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ -## 8.3.4 +## 8.3.5 -- Fixes issue with ES_SERVERLESS_SERVICE_VERSION for backwards compatibility +- Fixes issues with ES_SERVERLESS_SERVICE_VERSION for backwards compatibility ## 8.3.3 diff --git a/lib/elastic/transport/meta_header.rb b/lib/elastic/transport/meta_header.rb index 8dd48d6..fe9bf5b 100644 --- a/lib/elastic/transport/meta_header.rb +++ b/lib/elastic/transport/meta_header.rb @@ -42,7 +42,11 @@ def meta_header_service_version if enterprise_search? Elastic::ENTERPRISE_SERVICE_VERSION elsif serverless? - Elastic::ES_SERVERLESS_SERVICE_VERSION || Elastic::ELASTICSEARCH_SERVICE_VERSION + if defined?(Elastic::ES_SERVERLESS_SERVICE_VERSION) + Elastic::ES_SERVERLESS_SERVICE_VERSION + else + Elastic::ELASTICSEARCH_SERVICE_VERSION + end elsif elasticsearch? Elastic::ELASTICSEARCH_SERVICE_VERSION elsif defined?(Elasticsearch::VERSION) diff --git a/lib/elastic/transport/version.rb b/lib/elastic/transport/version.rb index 8a45c97..d626c84 100644 --- a/lib/elastic/transport/version.rb +++ b/lib/elastic/transport/version.rb @@ -17,6 +17,6 @@ module Elastic module Transport - VERSION = '8.3.4'.freeze + VERSION = '8.3.5'.freeze end end