Skip to content

Migrates to elastic-transport #1497

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

Closed
wants to merge 11 commits into from
Closed
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,5 @@ jobs:
run: cd elasticsearch && bundle exec rake test:all
- name: elasticsearch-api
run: cd elasticsearch-api && bundle exec rake test:spec test:platinum:unit
- name: elasticsearch-transport
run: cd elasticsearch-transport && bundle exec rake test:all
- name: elasticsearch-dsl
run: cd elasticsearch-dsl && bundle exec rake test:all
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
source 'https://rubygems.org'

gem 'elasticsearch-api', path: File.expand_path('../elasticsearch-api', __FILE__), require: false
gem 'elasticsearch-transport', path: File.expand_path('../elasticsearch-transport', __FILE__), require: false
gem 'elasticsearch', path: File.expand_path('../elasticsearch', __FILE__), require: false

gem 'ansi'
Expand Down
7 changes: 5 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,12 @@ require 'pathname'
CURRENT_PATH = Pathname(File.expand_path(__dir__))
SUBPROJECTS = [
'elasticsearch',
'elasticsearch-transport',
'elasticsearch-dsl',
'elasticsearch-api'
].freeze

RELEASE_TOGETHER = [
'elasticsearch',
'elasticsearch-transport',
'elasticsearch-api'
].freeze

Expand All @@ -81,6 +79,11 @@ task :default do
system 'rake --tasks'
end

desc 'Run Ruby console with the Elasticsearch client libraries loaded'
task :console do
system './elasticsearch/bin/elastic_ruby_console'
end

desc 'Display information about subprojects'
task :subprojects do
puts '-' * 80
Expand Down
4 changes: 0 additions & 4 deletions elasticsearch-api/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ if File.exist? File.expand_path("../../elasticsearch/elasticsearch.gemspec", __F
gem 'elasticsearch', path: File.expand_path('../../elasticsearch', __FILE__), require: false
end

if File.exist? File.expand_path('../../elasticsearch-transport', __FILE__)
gem 'elasticsearch-transport', path: File.expand_path('../../elasticsearch-transport', __FILE__), require: true
end

group :development do
gem 'rspec'
gem 'rspec_junit_formatter'
Expand Down
6 changes: 3 additions & 3 deletions elasticsearch-api/api-spec-testing/rspec_matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ def compare_string_response(expected_string, response)
message =~ /\[400\]/ ||
actual_error.is_a?(ArgumentError)
when 'unauthorized'
actual_error.is_a?(Elasticsearch::Transport::Transport::Errors::Unauthorized)
actual_error.is_a?(Elastic::Transport::Transport::Errors::Unauthorized)
when 'forbidden'
actual_error.is_a?(Elasticsearch::Transport::Transport::Errors::Forbidden)
actual_error.is_a?(Elastic::Transport::Transport::Errors::Forbidden)
when /error parsing field/
message =~ /\[400\]/ ||
actual_error.is_a?(Elasticsearch::Transport::Transport::Errors::BadRequest)
actual_error.is_a?(Elastic::Transport::Transport::Errors::BadRequest)
else
message =~ /#{expected_error}/
end
Expand Down
4 changes: 2 additions & 2 deletions elasticsearch-api/api-spec-testing/test_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def setup
begin
action.execute(client)
true
rescue Elasticsearch::Transport::Transport::Errors::ServiceUnavailable => e
rescue Elastic::Transport::Transport::Errors::ServiceUnavailable => e
# The action sometimes gets the cluster in a recovering state, so we
# retry a few times and then raise an exception if it's still
# happening
Expand Down Expand Up @@ -403,7 +403,7 @@ def clear_snapshots_and_repositories(client)
begin
response = client.perform_request('DELETE', "_snapshot/#{repository}", ignore: [500, 404])
client.snapshot.delete_repository(repository: repository, ignore: 404)
rescue Elasticsearch::Transport::Transport::Errors::InternalServerError => e
rescue Elastic::Transport::Transport::Errors::InternalServerError => e
regexp = /indices that use the repository: \[docs\/([a-zA-Z0-9]+)/
raise e unless response.body['error']['root_cause'].first['reason'].match(regexp)

Expand Down
17 changes: 0 additions & 17 deletions elasticsearch-transport/.gitignore

This file was deleted.

38 changes: 0 additions & 38 deletions elasticsearch-transport/Gemfile

This file was deleted.

202 changes: 0 additions & 202 deletions elasticsearch-transport/LICENSE.txt

This file was deleted.

Loading