diff --git a/CHANGELOG.md b/CHANGELOG.md index ecf00bd25..5f9a7b699 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,16 +2,24 @@ ## master (unreleased) +### New Features + +### Changes + +### Bugs Fixed + +## 7.2.1 (2021-05-11) + ### New Features * [#469](https://github.com/toptal/chewy/issues/469): Add ability to output the progressbar with `ENV['PROGRESS']` during `reset` rake tasks ([@Vitalina-Vakulchyk][]): * for `rake chewy:reset` and `rake chewy:parallel:reset` * progressbar is hidden by default, set `ENV['PROGRESS']` to `true` to display it -### Changes - ### Bugs Fixed + * [#796](https://github.com/toptal/chewy/pull/796): Fix clear scroll: pass `scroll_id` in body, as passing in path parameters is deprecated and can overflow `http.max_initial_line_length` ([@rabotyaga][]) + ## 7.0.1 (2021-05-03) ### Changes diff --git a/lib/chewy/search/scrolling.rb b/lib/chewy/search/scrolling.rb index 685b1552a..6074b3252 100644 --- a/lib/chewy/search/scrolling.rb +++ b/lib/chewy/search/scrolling.rb @@ -44,7 +44,7 @@ def scroll_batches(batch_size: Request::DEFAULT_BATCH_SIZE, scroll: Request::DEF result = perform_scroll(scroll: scroll, scroll_id: scroll_id) end ensure - Chewy.client.clear_scroll(scroll_id: scroll_id) if scroll_id + Chewy.client.clear_scroll(body: {scroll_id: scroll_id}) if scroll_id end # @!method scroll_hits(batch_size: 1000, scroll: '1m') diff --git a/lib/chewy/version.rb b/lib/chewy/version.rb index cae11b3be..0074977ca 100644 --- a/lib/chewy/version.rb +++ b/lib/chewy/version.rb @@ -1,3 +1,3 @@ module Chewy - VERSION = '7.2.0'.freeze + VERSION = '7.2.1'.freeze end diff --git a/spec/chewy/search/scrolling_spec.rb b/spec/chewy/search/scrolling_spec.rb index db714a43d..4dfe68941 100644 --- a/spec/chewy/search/scrolling_spec.rb +++ b/spec/chewy/search/scrolling_spec.rb @@ -106,7 +106,7 @@ end it 'clears the scroll after completion' do - expect(Chewy.client).to receive(:clear_scroll).with(scroll_id: anything).once.and_call_original + expect(Chewy.client).to receive(:clear_scroll).with(body: {scroll_id: anything}).once.and_call_original request.scroll_batches(batch_size: 3) {} end