Skip to content

Commit

Permalink
Check OpenSearch compatibility version instead of regular version (ma…
Browse files Browse the repository at this point in the history
  • Loading branch information
VyrCossont authored and Nonexistent committed Jan 12, 2023
1 parent acf411b commit 573b8f1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/lib/admin/system_check/elasticsearch_check.rb
Expand Up @@ -13,7 +13,14 @@ def pass?

def message
if running_version.present?
Admin::SystemCheck::Message.new(:elasticsearch_version_check, I18n.t('admin.system_checks.elasticsearch_version_check.version_comparison', running_version: running_version, required_version: required_version))
Admin::SystemCheck::Message.new(
:elasticsearch_version_check,
I18n.t(
'admin.system_checks.elasticsearch_version_check.version_comparison',
running_version: running_version,
required_version: required_version
)
)
else
Admin::SystemCheck::Message.new(:elasticsearch_running_check)
end
Expand All @@ -23,7 +30,8 @@ def message

def running_version
@running_version ||= begin
Chewy.client.info['version']['number']
Chewy.client.info['version']['minimum_wire_compatibility_version'] ||
Chewy.client.info['version']['number']
rescue Faraday::ConnectionFailed
nil
end
Expand Down

0 comments on commit 573b8f1

Please sign in to comment.