Skip to content

Commit 8b47089

Browse files
authored
Removed opaque_id param for 4.0.0-beta.4 (#287)
* Removed opaque_id param for 4.0.0-beta.4 Signed-off-by: Theo Truong <theotr@amazon.com> * # Signed-off-by: Theo Truong <theotr@amazon.com> --------- Signed-off-by: Theo Truong <theotr@amazon.com>
1 parent d57dbc1 commit 8b47089

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1818
### Changed
1919
- Restructured the API methods and modules to be more efficient and intuitive ([261](https://github.com/opensearch-project/opensearch-ruby/pull/261))
2020
- Moved ignore-404-on-deletion feature into the client options ([#277](https://github.com/opensearch-project/opensearch-ruby/pull/277))
21-
### Deprecated
21+
### Removed
2222
- Removed support for Ruby 2.x ([261](https://github.com/opensearch-project/opensearch-ruby/pull/261))
2323
- Removed the ability to ignore any error code by passing the `ignore: Array<error_code>` to each API method invocation ([#277](https://github.com/opensearch-project/opensearch-ruby/pull/277))
24+
- Removed ability to set `X-Opaque-Id` header value via the `opaque_id` parameter. ([#287](https://github.com/opensearch-project/opensearch-ruby/pull/287))
2425

2526
## [3.4.0]
2627
### Added

UPGRADING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Major versions of OpenSearch introduce breaking changes that require careful upg
55
- OpenSearch Ruby 4 drops support for Ruby 2.x. If you are using Ruby 2.x, you should upgrade to Ruby 3.x before upgrading to OpenSearch Ruby 4.
66
- OpenSearch Ruby 4 has a different implementation of the `ignore 404 error` feature on all delete actions. Instead of passing `ingore: 404` as if it is a query parameter for each API action, this feature can now be toggled on and off (off by default) during the client instance instantiation. If you are using this feature, you should review the [Idempotent Delete](./guides/idempotent_delete.md) guide for the changes.
77
- The lesser-known ability to ignore any error code by passing the `ignore: Array<error_code>` to each API method invocation is deemed unnecessary and dangerous. This feature has been removed in OpenSearch Ruby 4.
8+
- The ability to pass an `opaque_id` parameter into an API method invocation to set the value of the `X-Opaque-Id` header has been removed. The user should now set the `X-Opaque-Id` header as part of the `headers` parameter in the API method invocation directly.
89
- OpenSearch Ruby 4 received a major refactor to remove middle-man `perform_request` methods. While this does not affect the vast majority of use cases, applications or wrappers that rely on these methods should be updated. For more information, check the `How the perform_request method is invoked` section of this [PR](https://github.com/opensearch-project/opensearch-ruby/pull/261).
910
## Upgrade to OpenSearch Ruby 3
1011
In Version 3 of the OpenSearch Ruby client, we have added the `api` and `transport` modules as the core components of the gem, instead of treating them as separate gems that are required by the `opensearch-ruby` gem. This removes the confusions around compatibility between the ruby client, its legacy dependencies, and the OpenSearch cluster.

lib/opensearch/transport/client.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,6 @@ def initialize(arguments = {}, &block)
188188
# Performs a request through delegation to {#transport}.
189189
def perform_request(method, path, params = {}, body = nil, headers = {})
190190
method = @send_get_body_as if method == 'GET' && body
191-
if (opaque_id = params.delete('opaque_id'))
192-
opaque_id = @opaque_id_prefix ? "#{@opaque_id_prefix}#{opaque_id}" : opaque_id
193-
headers.merge!('X-Opaque-Id' => opaque_id)
194-
end
195191
if @options[:request_signer]
196192
connection = transport.get_connection
197193
headers = @options[:request_signer].sign_request(

lib/opensearch/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
# under the License.
2626

2727
module OpenSearch
28-
VERSION = '4.0.0-beta.3'.freeze
28+
VERSION = '4.0.0-beta.4'.freeze
2929
end

0 commit comments

Comments
 (0)