Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update comments around deprecated and inclusive naming #112

Merged
merged 5 commits into from
Nov 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding cluster manager to more URL params
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Nov 16, 2022
commit ac31ec35666736292cc94ce87100c6f73d4aaae9
6 changes: 3 additions & 3 deletions opensearch-api/Rakefile
Original file line number Diff line number Diff line change
@@ -56,9 +56,9 @@ namespace :test do
url = ENV['TEST_CLUSTER_URL'] || ENV['TEST_OPENSEARCH_SERVER']
url = "http://localhost:#{ENV['TEST_CLUSTER_PORT'] || 9200}" unless url
client = OpenSearch::Client.new :url => url
es_version_info = client.info['version']
version_number = es_version_info['number']
build_hash = es_version_info['build_hash']
os_version_info = client.info['version']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can change this later, but I think this should be opensearch_ because OS assumes operating system a lot.

version_number = os_version_info['number']
build_hash = os_version_info['build_hash']
rescue Faraday::ConnectionFailed
STDERR.puts "[!] Test cluster not running?"
exit 1
Original file line number Diff line number Diff line change
@@ -71,6 +71,7 @@ def allocation(arguments = {})
:bytes,
:local,
:master_timeout,
:cluster_manager_timeout,
:h,
:help,
:s,
1 change: 1 addition & 0 deletions opensearch-api/lib/opensearch/api/actions/cat/indices.rb
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ def indices(arguments = {})
:bytes,
:local,
:master_timeout,
:cluster_manager_timeout,
:h,
:health,
:help,
1 change: 1 addition & 0 deletions opensearch-api/lib/opensearch/api/actions/cat/master.rb
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ def master(arguments = {})
:format,
:local,
:master_timeout,
:cluster_manager_timeout,
:h,
:help,
:s,
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ def nodeattrs(arguments = {})
:format,
:local,
:master_timeout,
:cluster_manager_timeout,
:h,
:help,
:s,
1 change: 1 addition & 0 deletions opensearch-api/lib/opensearch/api/actions/cat/nodes.rb
Original file line number Diff line number Diff line change
@@ -68,6 +68,7 @@ def nodes(arguments = {})
:full_id,
:local,
:master_timeout,
:cluster_manager_timeout,
:h,
:help,
:s,
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ def pending_tasks(arguments = {})
:format,
:local,
:master_timeout,
:cluster_manager_timeout,
:h,
:help,
:s,
1 change: 1 addition & 0 deletions opensearch-api/lib/opensearch/api/actions/cat/plugins.rb
Original file line number Diff line number Diff line change
@@ -62,6 +62,7 @@ def plugins(arguments = {})
:format,
:local,
:master_timeout,
:cluster_manager_timeout,
:h,
:help,
:include_bootstrap,
1 change: 1 addition & 0 deletions opensearch-api/lib/opensearch/api/actions/cat/shards.rb
Original file line number Diff line number Diff line change
@@ -72,6 +72,7 @@ def shards(arguments = {})
:bytes,
:local,
:master_timeout,
:cluster_manager_timeout,
:h,
:help,
:s,
Original file line number Diff line number Diff line change
@@ -68,6 +68,7 @@ def templates(arguments = {})
:format,
:local,
:master_timeout,
:cluster_manager_timeout,
:h,
:help,
:s,
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ def exists_component_template(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:exists_component_template, [
:master_timeout,
:cluster_manager_timeout,
:local
].freeze)
end
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ def get_component_template(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:get_component_template, [
:master_timeout,
:cluster_manager_timeout,
:local
].freeze)
end
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ def get_settings(arguments = {})
ParamsRegistry.register(:get_settings, [
:flat_settings,
:master_timeout,
:cluster_manager_timeout,
:timeout,
:include_defaults
].freeze)
Original file line number Diff line number Diff line change
@@ -73,6 +73,7 @@ def health(arguments = {})
:level,
:local,
:master_timeout,
:cluster_manager_timeout,
:timeout,
:wait_for_active_shards,
:wait_for_nodes,
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ def reroute(arguments = {})
:retry_failed,
:metric,
:master_timeout,
:cluster_manager_timeout,
:timeout
].freeze)
end
Original file line number Diff line number Diff line change
@@ -73,6 +73,7 @@ def state(arguments = {})
ParamsRegistry.register(:state, [
:local,
:master_timeout,
:cluster_manager_timeout,
:flat_settings,
:wait_for_metadata_version,
:wait_for_timeout,
Original file line number Diff line number Diff line change
@@ -58,7 +58,8 @@ def delete_script(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:delete_script, [
:timeout,
:master_timeout
:master_timeout,
:cluster_manager_timeout
].freeze)
end
end
3 changes: 2 additions & 1 deletion opensearch-api/lib/opensearch/api/actions/get_script.rb
Original file line number Diff line number Diff line change
@@ -56,7 +56,8 @@ def get_script(arguments = {})
#
# @since 6.2.0
ParamsRegistry.register(:get_script, [
:master_timeout
:master_timeout,
:cluster_manager_timeout
].freeze)
end
end
Original file line number Diff line number Diff line change
@@ -66,6 +66,7 @@ def clone(arguments = {})
ParamsRegistry.register(:clone, [
:timeout,
:master_timeout,
:cluster_manager_timeout,
:wait_for_active_shards
].freeze)
end
Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@ def close(arguments = {})
ParamsRegistry.register(:close, [
:timeout,
:master_timeout,
:cluster_manager_timeout,
:ignore_unavailable,
:allow_no_indices,
:expand_wildcards,
Original file line number Diff line number Diff line change
@@ -67,6 +67,7 @@ def delete(arguments = {})
ParamsRegistry.register(:delete, [
:timeout,
:master_timeout,
:cluster_manager_timeout,
:ignore_unavailable,
:allow_no_indices,
:expand_wildcards
Original file line number Diff line number Diff line change
@@ -66,6 +66,7 @@ def exists_template(arguments = {})
ParamsRegistry.register(:exists_template, [
:flat_settings,
:master_timeout,
:cluster_manager_timeout,
:local
].freeze)
end
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ def get_index_template(arguments = {})
ParamsRegistry.register(:get_index_template, [
:flat_settings,
:master_timeout,
:cluster_manager_timeout,
:local
].freeze)
end
Original file line number Diff line number Diff line change
@@ -72,6 +72,7 @@ def get_mapping(arguments = {})
:allow_no_indices,
:expand_wildcards,
:master_timeout,
:cluster_manager_timeout,
:local
].freeze)
end
Original file line number Diff line number Diff line change
@@ -73,6 +73,7 @@ def get_settings(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:get_settings, [
:master_timeout,
:cluster_manager_timeout,
:ignore_unavailable,
:allow_no_indices,
:expand_wildcards,
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ def get_template(arguments = {})
ParamsRegistry.register(:get_template, [
:flat_settings,
:master_timeout,
:cluster_manager_timeout,
:local
].freeze)
end
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ def open(arguments = {})
ParamsRegistry.register(:open, [
:timeout,
:master_timeout,
:cluster_manager_timeout,
:ignore_unavailable,
:allow_no_indices,
:expand_wildcards,
Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ def put_mapping(arguments = {})
ParamsRegistry.register(:put_mapping, [
:timeout,
:master_timeout,
:cluster_manager_timeout,
:ignore_unavailable,
:allow_no_indices,
:expand_wildcards,
Original file line number Diff line number Diff line change
@@ -69,6 +69,7 @@ def put_settings(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:put_settings, [
:master_timeout,
:cluster_manager_timeout,
:timeout,
:preserve_existing,
:ignore_unavailable,
Original file line number Diff line number Diff line change
@@ -72,6 +72,7 @@ def rollover(arguments = {})
:timeout,
:dry_run,
:master_timeout,
:cluster_manager_timeout,
:wait_for_active_shards
].freeze)
end
Original file line number Diff line number Diff line change
@@ -68,6 +68,7 @@ def split(arguments = {})
:copy_settings,
:timeout,
:master_timeout,
:cluster_manager_timeout,
:wait_for_active_shards
].freeze)
end
Original file line number Diff line number Diff line change
@@ -59,6 +59,7 @@ def delete_pipeline(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:delete_pipeline, [
:master_timeout,
:cluster_manager_timeout,
:timeout
].freeze)
end
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ def put_pipeline(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:put_pipeline, [
:master_timeout,
:cluster_manager_timeout,
:timeout
].freeze)
end
1 change: 1 addition & 0 deletions opensearch-api/lib/opensearch/api/actions/put_script.rb
Original file line number Diff line number Diff line change
@@ -68,6 +68,7 @@ def put_script(arguments = {})
ParamsRegistry.register(:put_script, [
:timeout,
:master_timeout,
:cluster_manager_timeout,
:context
].freeze)
end
Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@ def create(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:create, [
:master_timeout,
:cluster_manager_timeout,
:wait_for_completion
].freeze)
end
Original file line number Diff line number Diff line change
@@ -62,6 +62,7 @@ def create_repository(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:create_repository, [
:master_timeout,
:cluster_manager_timeout,
:timeout,
:verify
].freeze)
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ def delete_repository(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:delete_repository, [
:master_timeout,
:cluster_manager_timeout,
:timeout
].freeze)
end
Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ def get(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:get, [
:master_timeout,
:cluster_manager_timeout,
:ignore_unavailable,
:index_details,
:include_repository,
Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@ def get_repository(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:get_repository, [
:master_timeout,
:cluster_manager_timeout,
:local
].freeze)
end
Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@ def restore(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:restore, [
:master_timeout,
:cluster_manager_timeout,
:wait_for_completion
].freeze)
end
Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ def status(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:status, [
:master_timeout,
:cluster_manager_timeout,
:ignore_unavailable
].freeze)
end
Original file line number Diff line number Diff line change
@@ -59,6 +59,7 @@ def verify_repository(arguments = {})
# @since 6.2.0
ParamsRegistry.register(:verify_repository, [
:master_timeout,
:cluster_manager_timeout,
:timeout
].freeze)
end
2 changes: 1 addition & 1 deletion opensearch-api/lib/opensearch/api/version.rb
Original file line number Diff line number Diff line change
@@ -26,6 +26,6 @@

module OpenSearch
module API
VERSION = '2.0.2'.freeze
VERSION = '2.1.0'.freeze
end
end
Original file line number Diff line number Diff line change
@@ -27,18 +27,17 @@
require 'spec_helper'

describe 'client.cat#allocation' do

let(:expected_args) do
[
'GET',
'_cat/allocation',
{},
nil,
{}
'GET',
'_cat/allocation',
{cluster_manager_timeout: 2},
nil,
{}
]
end

it 'performs the request' do
expect(client_double.cat.allocation).to eq({})
expect(client_double.cat.allocation(cluster_manager_timeout: 2)).to eq({})
end
end
2 changes: 1 addition & 1 deletion opensearch/lib/opensearch/version.rb
Original file line number Diff line number Diff line change
@@ -25,5 +25,5 @@
# under the License.

module OpenSearch
VERSION = '2.0.3'.freeze
VERSION = '2.1.0'.freeze
end
4 changes: 2 additions & 2 deletions opensearch/opensearch.gemspec
Original file line number Diff line number Diff line change
@@ -61,8 +61,8 @@ Gem::Specification.new do |s|

s.required_ruby_version = '>= 2.4'

s.add_dependency 'opensearch-transport', '~> 2.0.0'
s.add_dependency 'opensearch-api', '2.0.2'
s.add_dependency 'opensearch-transport', '~> 2.0'
s.add_dependency 'opensearch-api', '~> 2.1'

s.add_development_dependency 'bundler'
s.add_development_dependency 'byebug' unless defined?(JRUBY_VERSION) || defined?(Rubinius)