Skip to content

Commit

Permalink
fix: the elasticsearch.update_aliases event must include body
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgz committed Nov 27, 2023
1 parent 6489028 commit df13590
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
esse (0.2.4)
esse (0.2.5)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.elasticsearch-1.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.4)
esse (0.2.5)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.elasticsearch-2.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.4)
esse (0.2.5)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.elasticsearch-5.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.4)
esse (0.2.5)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.elasticsearch-6.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.4)
esse (0.2.5)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.elasticsearch-7.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.4)
esse (0.2.5)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.elasticsearch-8.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.4)
esse (0.2.5)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.opensearch-1.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.4)
esse (0.2.5)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.opensearch-2.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.4)
esse (0.2.5)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion lib/esse/cli/event_listener.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def elasticsearch_update_settings(event)
end

def elasticsearch_update_aliases(event)
actions = event[:request][:body][:actions]
actions = event[:request].dig(:body, :actions) || []
removed = actions.select { |a| a.key?(:remove) }
added = actions.select { |a| a.key?(:add) }
print_message '[%<runtime>s] Successfuly updated aliases:',
Expand Down
2 changes: 1 addition & 1 deletion lib/esse/transport/aliases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def update_aliases(body:, **options)
throw_error_when_readonly!

Esse::Events.instrument('elasticsearch.update_aliases') do |payload|
payload[:request] = options
payload[:request] = options.merge(body: body)
payload[:response] = coerce_exception { client.indices.update_aliases(**options, body: body) }
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/esse/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Esse
VERSION = '0.2.4'
VERSION = '0.2.5'
end

0 comments on commit df13590

Please sign in to comment.