elastic-transport 8.1.0 → 8.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +7 -47
- data/.gitignore +1 -1
- data/CHANGELOG.md +9 -1
- data/Gemfile +8 -4
- data/README.md +7 -518
- data/Rakefile +1 -39
- data/elastic-transport.gemspec +8 -5
- data/lib/elastic/transport/client.rb +10 -12
- data/lib/elastic/transport/meta_header.rb +8 -8
- data/lib/elastic/transport/transport/base.rb +5 -3
- data/lib/elastic/transport/transport/http/curb.rb +25 -28
- data/lib/elastic/transport/transport/http/manticore.rb +1 -1
- data/lib/elastic/transport/transport/response.rb +3 -2
- data/lib/elastic/transport/transport/sniffer.rb +3 -1
- data/lib/elastic/transport/version.rb +1 -1
- data/spec/elastic/transport/base_spec.rb +24 -27
- data/spec/elastic/transport/client_spec.rb +7 -14
- data/spec/elastic/transport/meta_header_spec.rb +2 -2
- data/spec/elastic/transport/sniffer_spec.rb +18 -0
- data/spec/spec_helper.rb +0 -4
- data/test/integration/jruby_test.rb +1 -1
- data/test/integration/transport_test.rb +40 -86
- data/test/test_helper.rb +5 -9
- data/test/unit/transport_base_test.rb +7 -8
- data/test/unit/transport_curb_test.rb +3 -2
- metadata +70 -17
- data/Gemfile-faraday1.gemfile +0 -39
- data/test/unit/adapters_test.rb +0 -88
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c45579654af5263b19d9ed8a814727d7d63fa3c4ecb3e1313adcffe6b5f9e185
|
4
|
+
data.tar.gz: 278b4e2bf242cf1acf9cea3f9bb297b45a5517c3f9f38921484913e337afa4c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '078d4316c2ea7222c02905522389c47494c049a35b0b924d76afeeb340517d3f85fc6824294870dc7399884581233c1564424cae33f6381d21476a4f39758b91'
|
7
|
+
data.tar.gz: bd074dd0d1eeca808efe02e48bfc40232d12b7923e077352e1dc72749e030a85c9b16112d836506fce7cef076dfedd7d3d5f44659598b68ebb7fc00bf68f4a83
|
data/.github/workflows/tests.yml
CHANGED
@@ -1,22 +1,20 @@
|
|
1
|
-
name:
|
1
|
+
name: 8.1 tests
|
2
2
|
on:
|
3
3
|
push:
|
4
4
|
branches:
|
5
|
-
-
|
5
|
+
- 8.1
|
6
6
|
pull_request:
|
7
7
|
branches:
|
8
|
-
-
|
8
|
+
- 8.1
|
9
9
|
jobs:
|
10
|
-
test:
|
11
|
-
name: 'Main tests'
|
10
|
+
test-ruby:
|
12
11
|
env:
|
13
12
|
TEST_ES_SERVER: http://localhost:9250
|
14
13
|
PORT: 9250
|
15
14
|
strategy:
|
16
15
|
fail-fast: false
|
17
16
|
matrix:
|
18
|
-
ruby: [ '2.7', '3.0', '3.1', 'jruby-9.3' ]
|
19
|
-
es_version: ['8.2-SNAPSHOT', '8.3-SNAPSHOT', '8.4-SNAPSHOT']
|
17
|
+
ruby: [ '2.7', '3.0', '3.1', 'jruby-9.3', 'jruby-9.4' ]
|
20
18
|
runs-on: ubuntu-latest
|
21
19
|
steps:
|
22
20
|
- uses: actions/checkout@v2
|
@@ -28,7 +26,7 @@ jobs:
|
|
28
26
|
sudo sysctl -w vm.max_map_count=262144
|
29
27
|
- uses: elastic/elastic-github-actions/elasticsearch@master
|
30
28
|
with:
|
31
|
-
stack-version:
|
29
|
+
stack-version: 8.9-SNAPSHOT
|
32
30
|
security-enabled: false
|
33
31
|
- uses: ruby/setup-ruby@v1
|
34
32
|
with:
|
@@ -45,42 +43,4 @@ jobs:
|
|
45
43
|
run: bundle exec rake test:spec
|
46
44
|
- name: integration tests
|
47
45
|
run: bundle exec rake test:integration
|
48
|
-
|
49
|
-
name: 'Test Faraday 1'
|
50
|
-
env:
|
51
|
-
TEST_ES_SERVER: http://localhost:9250
|
52
|
-
PORT: 9250
|
53
|
-
strategy:
|
54
|
-
fail-fast: false
|
55
|
-
matrix:
|
56
|
-
ruby: [ '2.7', '3.0', '3.1', 'jruby-9.3' ]
|
57
|
-
es_version: ['8.3.0-SNAPSHOT']
|
58
|
-
runs-on: ubuntu-latest
|
59
|
-
steps:
|
60
|
-
- uses: actions/checkout@v2
|
61
|
-
- name: Increase system limits
|
62
|
-
run: |
|
63
|
-
sudo swapoff -a
|
64
|
-
sudo sysctl -w vm.swappiness=1
|
65
|
-
sudo sysctl -w fs.file-max=262144
|
66
|
-
sudo sysctl -w vm.max_map_count=262144
|
67
|
-
- uses: elastic/elastic-github-actions/elasticsearch@master
|
68
|
-
with:
|
69
|
-
stack-version: ${{ matrix.es_version }}
|
70
|
-
security-enabled: false
|
71
|
-
- uses: ruby/setup-ruby@v1
|
72
|
-
with:
|
73
|
-
ruby-version: ${{ matrix.ruby }}
|
74
|
-
- name: Build and test with Rake
|
75
|
-
run: |
|
76
|
-
sudo apt-get update
|
77
|
-
sudo apt-get install libcurl4-openssl-dev
|
78
|
-
ruby -v
|
79
|
-
gem install bundler
|
80
|
-
BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle install
|
81
|
-
- name: faraday1 unit tests
|
82
|
-
run: BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:unit
|
83
|
-
- name: specs
|
84
|
-
run: BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:spec
|
85
|
-
- name: integration tests
|
86
|
-
run: BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:integration
|
46
|
+
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,18 @@
|
|
1
|
+
## 8.1.1
|
2
|
+
|
3
|
+
Backports the following updates from 8.2:
|
4
|
+
|
5
|
+
- Refactors `apply_headers` in base and manticore implementation: When passing in an object to the initializer, `apply_headers` would mutate this object and in certain conditions, this would raise `RuntimeError` in JRuby 9.3 and `ConcurrencyError` in JRuby 9.4. This update clones the options object instead.
|
6
|
+
- Fixes [issue #44](https://github.com/elastic/elastic-transport-ruby/issues/44), raising `Elastic::Transport::Transport::Error` instead of `Faraday::ConnectionFailed` (or any other Faraday error class) when a host is unreachable.
|
7
|
+
- Fixes parsing ipv4 addresses like `inet[/127.0.0.1:9200]` in sniffer, [issue #48](https://github.com/elastic/elastic-transport-ruby/issues/48). [Pull Request](https://github.com/elastic/elastic-transport-ruby/pull/49) by [@robbat2](https://github.com/robbat2), thank you!
|
8
|
+
|
1
9
|
## 8.1.0
|
2
10
|
|
3
11
|
Adds support for Faraday version 2. From [Faraday's Upgrading guide](https://github.com/lostisland/faraday/blob/main/UPGRADING.md#faraday-20), the main change is the adapters have moved:
|
4
12
|
|
5
13
|
> With this release, we've officially moved all adapters, except for the net_http one, out of Faraday. What that means, is that they won't be available out-of-the-box anymore, and you'll instead need to add them to your Gemfile.
|
6
14
|
> If you just use the default net_http adapter, then you don't need to do anything!
|
7
|
-
> Otherwise, add the corresponding adapter gem to your Gemfile (e.g. faraday-net_http_persistent). Then, simply require them after you require faraday.
|
15
|
+
> Otherwise, add the corresponding adapter gem to your Gemfile (e.g. faraday-net_http_persistent). Then, simply require them after you require faraday.
|
8
16
|
|
9
17
|
We're now supporting Faraday v2 and Faraday v1. The adapters were removed as development dependency in the gemspec and added to the Gemfile. A new file `Gemfile-faraday1.gemfile` was added to run tests with version `1.x` of Faraday too.
|
10
18
|
|
data/Gemfile
CHANGED
@@ -20,11 +20,15 @@ source 'https://rubygems.org'
|
|
20
20
|
# Specify your gem's dependencies in elasticsearch-transport.gemspec
|
21
21
|
gemspec
|
22
22
|
|
23
|
+
if File.exist? File.expand_path('../elasticsearch-api/elasticsearch-api.gemspec', __dir__)
|
24
|
+
gem 'elasticsearch-api', path: File.expand_path('../elasticsearch-api', __dir__), require: false
|
25
|
+
end
|
26
|
+
|
27
|
+
if File.exist? File.expand_path('../elasticsearch/elasticsearch.gemspec', __dir__)
|
28
|
+
gem 'elasticsearch', path: File.expand_path('../elasticsearch', __dir__), require: false
|
29
|
+
end
|
30
|
+
|
23
31
|
group :development, :test do
|
24
|
-
gem 'faraday-httpclient'
|
25
|
-
gem 'faraday-net_http_persistent'
|
26
|
-
gem 'faraday-patron' unless defined? JRUBY_VERSION
|
27
|
-
gem 'faraday-typhoeus'
|
28
32
|
gem 'rspec'
|
29
33
|
if defined?(JRUBY_VERSION)
|
30
34
|
gem 'pry-nav'
|