elastic-enterprise-search 8.5.0 → 8.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.buildkite/Dockerfile +13 -0
  3. data/.buildkite/certs/testnode.crt +21 -0
  4. data/.buildkite/certs/testnode.key +27 -0
  5. data/.buildkite/log-results.sh +15 -0
  6. data/.buildkite/pipeline.yml +20 -0
  7. data/.buildkite/run-client.sh +35 -0
  8. data/{.ci → .buildkite}/run-elasticsearch.sh +24 -5
  9. data/{.ci → .buildkite}/run-local.sh +2 -2
  10. data/.buildkite/run-tests.sh +24 -0
  11. data/.github/workflows/testing.yml +2 -2
  12. data/.gitignore +2 -1
  13. data/README.md +1 -1
  14. data/Rakefile +8 -2
  15. data/docs/guide/release_notes/717.asciidoc +12 -0
  16. data/docs/guide/release_notes/86.asciidoc +9 -0
  17. data/docs/guide/release_notes/87.asciidoc +13 -0
  18. data/docs/guide/release_notes/index.asciidoc +4 -0
  19. data/elastic-enterprise-search.gemspec +1 -1
  20. data/lib/elastic/app-search/api/search.rb +1 -1
  21. data/lib/elastic/enterprise-search/version.rb +1 -1
  22. data/spec/enterprise-search/client_spec.rb +1 -1
  23. data/spec/integration/app-search/api_logs_spec.rb +0 -8
  24. data/spec/spec_helper.rb +5 -1
  25. metadata +27 -30
  26. data/.ci/certs/testnode.crt +0 -21
  27. data/.ci/certs/testnode.key +0 -27
  28. data/.ci/jobs/defaults.yml +0 -73
  29. data/.ci/jobs/elastic+enterprise-search-ruby+7.17.yml +0 -12
  30. data/.ci/jobs/elastic+enterprise-search-ruby+8.2.yml +0 -12
  31. data/.ci/jobs/elastic+enterprise-search-ruby+8.3.yml +0 -12
  32. data/.ci/jobs/elastic+enterprise-search-ruby+8.4.yml +0 -12
  33. data/.ci/jobs/elastic+enterprise-search-ruby+main.yml +0 -12
  34. data/.ci/jobs/elastic+enterprise-search-ruby+pull-request.yml +0 -19
  35. data/.ci/run-repository.sh +0 -50
  36. data/.ci/run-tests +0 -27
  37. data/.ci/test-matrix.yml +0 -15
  38. /data/{.ci → .buildkite}/certs/README.md +0 -0
  39. /data/{.ci → .buildkite}/certs/ca.crt +0 -0
  40. /data/{.ci → .buildkite}/certs/ca.key +0 -0
  41. /data/{.ci → .buildkite}/certs/testnode_no_san.crt +0 -0
  42. /data/{.ci → .buildkite}/certs/testnode_no_san.key +0 -0
  43. /data/{.ci → .buildkite}/functions/cleanup.sh +0 -0
  44. /data/{.ci → .buildkite}/functions/imports.sh +0 -0
  45. /data/{.ci → .buildkite}/functions/wait-for-container.sh +0 -0
  46. /data/{.ci → .buildkite}/run-enterprise-search.sh +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 370baa568c7b78d3fa58a0c322732c106163b3f91845841287b968966ca70717
4
- data.tar.gz: 76108e767bc9e72f6ca6c981629f69a8c9e99106b07dc460761aaf089be4c86a
3
+ metadata.gz: '018288980fbd3b9a4f39cabf6fe3f7adfcb62e616d6d374a9e56099629468386'
4
+ data.tar.gz: eab15d1fa2e7d481b422a5fe3f843dfca8bb51e030ea6e70f690dd14ad757a09
5
5
  SHA512:
6
- metadata.gz: 17ebc4758f08ae8a5e198d02fa45016525f080d8cc357b9a3b5ad82b2b208c89e5534e05f61e784cccc4ab4b9d30c79e6737845f52cd25bc1741ceff95bc893e
7
- data.tar.gz: 0252bf54a1828983f1a8daac3ae4fb123a814aaa4f9d195df7284cea265542cb370242c71dd5fb9c2832f81650e5b17f3b58da8ae585fc08e5e7aff03881b7a3
6
+ metadata.gz: 80d0d275fd647abee39ce5b14fe2ea133d3595a4992ed744bd7727953c223f624a1fed18550d950aed6c6dc034d63f756dfafc678c02dfaa4e15468ed0306bd0
7
+ data.tar.gz: aeb3fe71149d88fd9cc82005af8beef7295b9c15812eb53e67a0c702b1b012e82b2ff869d66e5f56c804c21793548acbc13162ffb4ad962060c6f64d632637a4
@@ -0,0 +1,13 @@
1
+ ARG RUBY_VERSION=${RUBY_VERSION:-3.1}
2
+ FROM ruby:$RUBY_VERSION
3
+
4
+ ENV QUIET=true
5
+ ENV CI=true
6
+
7
+ # Install required tools
8
+ RUN apt-get -q update && apt-get -y install zip curl
9
+
10
+ WORKDIR /code/enterprise-search-ruby
11
+ COPY . .
12
+
13
+ RUN bundle install
@@ -0,0 +1,21 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDYjCCAkqgAwIBAgIVAIClHav09e9XGWJrnshywAjUHTnXMA0GCSqGSIb3DQEB
3
+ CwUAMDQxMjAwBgNVBAMTKUVsYXN0aWMgQ2VydGlmaWNhdGUgVG9vbCBBdXRvZ2Vu
4
+ ZXJhdGVkIENBMB4XDTIzMDMyODE3MDIzOVoXDTI2MDMyNzE3MDIzOVowEzERMA8G
5
+ A1UEAxMIaW5zdGFuY2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV
6
+ +t5/g6u2r3awCtzqp17KG0hRxzkVoJoF8DYzVh+Rv9ymxQW0C/U8dQihAjkZHaIA
7
+ n49lSyNLkwWtmqQgPcimV4d6XuTYx2ahDixXYtjmoOSwH5dRtovKPCNKDPkUj9Vq
8
+ NwMW0uB1VxniMKI4DnYFqBgHL9kQKhQqvas6Gx0X6ptGRCLYCtVxeFcau6nnkZJt
9
+ urb+HNV5waOh0uTmsqnnslK3NjCQ/f030vPKxM5fOqOU5ajUHpZFJ6ZFmS32074H
10
+ l+mZoRT/GtbnVtIg+CJXsWThF3/L4iBImv+rkY9MKX5fyMLJgmIJG68S90IQGR8c
11
+ Z2lZYzC0J7zjMsYlODbDAgMBAAGjgYswgYgwHQYDVR0OBBYEFIDIcECn3AVHc3jk
12
+ MpQ4r7Kc3WCsMB8GA1UdIwQYMBaAFJYCWKn16g+acbing4Vl45QGUBs0MDsGA1Ud
13
+ EQQ0MDKCCWxvY2FsaG9zdIIIaW5zdGFuY2WHBH8AAAGHEAAA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Ti66NOSKr
26
+ oftUHvkHS0Vv/LicMEOufFGslb4T9aPJ7oyhoSlz9CfAutDWk/q/
27
+ -----END RSA PRIVATE KEY-----
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # This script is intended to be run after the build in a Buildkite pipeline
4
+ echo "--- Test summary"
5
+ buildkite-agent artifact download "tmp/*.html" .
6
+
7
+ files="tmp/*.html"
8
+ for f in $files; do
9
+ SERVICE=`echo $f | grep -o "\(appsearch\|enterprisesearch\|workplacesearch\)"`
10
+ RUBY_VERSION=`echo $f | grep -Po "(\d+\.)+\d+"`
11
+ EXAMPLES=`cat $f | grep -o "[0-9]\+ example" | tail -1`
12
+ FAILURES=`cat $f | grep -o "[0-9]\+ failure" | tail -1`
13
+ PENDING=`cat $f | grep -o "[0-9]\+ pending" | tail -1`
14
+ echo "--- :rspec: $EXAMPLES - :x: $FAILURES - :pinched_fingers: $PENDING :test_tube: $SERVICE :ruby: $RUBY_VERSION"
15
+ done
@@ -0,0 +1,20 @@
1
+ steps:
2
+ - label: ":elastic-enterprise-search: Enterprise Search :rspec: API Integration Tests :ruby: v{{ matrix.ruby }}"
3
+ agents:
4
+ provider: "gcp"
5
+ env:
6
+ RUBY_VERSION: "{{ matrix.ruby }}"
7
+ STACK_VERSION: 8.7.0-SNAPSHOT
8
+ matrix:
9
+ setup:
10
+ ruby:
11
+ - "3.2"
12
+ - "3.1"
13
+ - "3.0"
14
+ - "2.7"
15
+ command: ./.buildkite/run-tests.sh
16
+ artifact_paths: "tmp/*"
17
+ - wait: ~
18
+ continue_on_failure: true
19
+ - label: "Log Results"
20
+ command: ./.buildkite/log-results.sh
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Once called Elasticsearch and Enteprise Search should be up and running
4
+ #
5
+ script_path=$(dirname $(realpath -s $0))
6
+ source $script_path/functions/imports.sh
7
+ set -euo pipefail
8
+
9
+ export RUBY_VERSION=${RUBY_VERSION:-3.1}
10
+
11
+ echo "--- :telephone_receiver: Pinging Elasticsearch :elasticsearch:"
12
+ curl --insecure --fail $external_elasticsearch_url/_cluster/health?pretty
13
+
14
+ enterprise_search_url="http://localhost:3002"
15
+ echo "--- :telephone_receiver: Pinging Enterprise Search :elastic-enterprise-search:"
16
+ curl -I --fail $enterprise_search_url
17
+
18
+ echo "--- :docker: :ruby: Building Docker image"
19
+ docker build \
20
+ --file $script_path/Dockerfile \
21
+ --tag elastic/enterprise-search-ruby \
22
+ --build-arg RUBY_VERSION=${RUBY_VERSION} \
23
+ .
24
+
25
+ echo "--- :docker: :ruby: Running Client Container"
26
+ docker run \
27
+ --network ${network_name} \
28
+ --name enterprise-search-ruby \
29
+ --env "ELASTIC_ENTERPRISE_HOST=http://${CONTAINER_NAME}:3002" \
30
+ --env "BUILDKITE=true" \
31
+ --rm \
32
+ --volume `pwd`:/code/enterprise-search-ruby \
33
+ elastic/enterprise-search-ruby \
34
+ rake spec:integration
35
+
@@ -7,7 +7,7 @@
7
7
  # Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
8
8
  # Export the NUMBER_OF_NODES variable to start more than 1 node
9
9
 
10
- # Version 1.2.0
10
+ # Version 1.6.1
11
11
  # - Initial version of the run-elasticsearch.sh script
12
12
  # - Deleting the volume should not dependent on the container still running
13
13
  # - Fixed `ES_JAVA_OPTS` config
@@ -15,6 +15,12 @@
15
15
  # - Refactored into functions and imports
16
16
  # - Support NUMBER_OF_NODES
17
17
  # - Added 5 retries on docker pull for fixing transient network errors
18
+ # - Added flags to make local CCR configurations work
19
+ # - Added action.destructive_requires_name=false as the default will be true in v8
20
+ # - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing
21
+ # - Moved ELASTIC_PASSWORD and xpack.security.enabled to the base arguments for "Security On by default"
22
+ # - Use https only when TEST_SUITE is "platinum", when "free" use http
23
+ # - Set xpack.security.enabled=false for "free" and xpack.security.enabled=true for "platinum"
18
24
 
19
25
  script_path=$(dirname $(realpath -s $0))
20
26
  source $script_path/functions/imports.sh
@@ -23,11 +29,15 @@ set -euo pipefail
23
29
  echo -e "\033[34;1mINFO:\033[0m Take down node if called twice with the same arguments (DETACH=true) or on seperate terminals \033[0m"
24
30
  cleanup_node $es_node_name
25
31
 
32
+ # Set vm.max_map_count kernel setting to 262144
33
+ sudo sysctl -w vm.max_map_count=262144
34
+
26
35
  master_node_name=${es_node_name}
27
36
  cluster_name=${moniker}${suffix}
28
37
 
29
38
  declare -a volumes
30
39
  environment=($(cat <<-END
40
+ --env ELASTIC_PASSWORD=$elastic_password
31
41
  --env node.name=$es_node_name
32
42
  --env cluster.name=$cluster_name
33
43
  --env cluster.initial_master_nodes=$master_node_name
@@ -37,19 +47,22 @@ environment=($(cat <<-END
37
47
  --env node.attr.testattr=test
38
48
  --env path.repo=/tmp
39
49
  --env repositories.url.allowed_urls=http://snapshot.test*
50
+ --env action.destructive_requires_name=false
51
+ --env ingest.geoip.downloader.enabled=false
52
+ --env cluster.deprecation_indexing.enabled=false
40
53
  END
41
54
  ))
42
55
  if [[ "$TEST_SUITE" == "platinum" ]]; then
43
56
  environment+=($(cat <<-END
44
- --env ELASTIC_PASSWORD=$elastic_password
45
- --env xpack.license.self_generated.type=trial
46
57
  --env xpack.security.enabled=true
58
+ --env xpack.license.self_generated.type=trial
47
59
  --env xpack.security.http.ssl.enabled=true
48
60
  --env xpack.security.http.ssl.verification_mode=certificate
49
61
  --env xpack.security.http.ssl.key=certs/testnode.key
50
62
  --env xpack.security.http.ssl.certificate=certs/testnode.crt
51
63
  --env xpack.security.http.ssl.certificate_authorities=certs/ca.crt
52
64
  --env xpack.security.transport.ssl.enabled=true
65
+ --env xpack.security.transport.ssl.verification_mode=certificate
53
66
  --env xpack.security.transport.ssl.key=certs/testnode.key
54
67
  --env xpack.security.transport.ssl.certificate=certs/testnode.crt
55
68
  --env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt
@@ -61,6 +74,13 @@ END
61
74
  --volume $ssl_ca:/usr/share/elasticsearch/config/certs/ca.crt
62
75
  END
63
76
  ))
77
+ else
78
+ environment+=($(cat <<-END
79
+ --env node.roles=data,data_cold,data_content,data_frozen,data_hot,data_warm,ingest,master,ml,remote_cluster_client,transform
80
+ --env xpack.security.enabled=false
81
+ --env xpack.security.http.ssl.enabled=false
82
+ END
83
+ ))
64
84
  fi
65
85
 
66
86
  cert_validation_flags=""
@@ -104,7 +124,7 @@ END
104
124
  docker run \
105
125
  --name "$node_name" \
106
126
  --network "$network_name" \
107
- --env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
127
+ --env "ES_JAVA_OPTS=-Xms1g -Xmx1g -da:org.elasticsearch.xpack.ccr.index.engine.FollowingEngineAssertions" \
108
128
  "${environment[@]}" \
109
129
  "${volumes[@]}" \
110
130
  --publish "$http_port":9200 \
@@ -124,4 +144,3 @@ END
124
144
  fi
125
145
 
126
146
  done
127
-
@@ -8,7 +8,7 @@ source $script_path/functions/imports.sh
8
8
  set -euo pipefail
9
9
 
10
10
  echo -e "\033[1m>>>>> Start [$STACK_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
11
- DETACH=true bash .ci/run-elasticsearch.sh
11
+ DETACH=true bash .buildkite/run-elasticsearch.sh
12
12
 
13
13
  echo -e "\033[1m>>>>> Running run-enterprise-search.sh >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
14
- bash .ci/run-enterprise-search.sh
14
+ bash .buildkite/run-enterprise-search.sh
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Script to run Enterprise Search container and Enterprise Search client integration tests on Buildkite
4
+ #
5
+ # Version 0.1
6
+ #
7
+ export TEST_SUITE=platinum
8
+ export CONTAINER_NAME=enterprise-search
9
+
10
+ script_path=$(dirname $(realpath -s $0))
11
+ source $script_path/functions/imports.sh
12
+ set -euo pipefail
13
+
14
+ echo "--- Create the elastic network"
15
+ docker network create elastic
16
+
17
+ echo "--- :docker: :elasticsearch: Starting Elasticsearch"
18
+ DETACH=true bash $script_path/run-elasticsearch.sh
19
+
20
+ echo "--- :docker: :elastic-enterprise-search: Starting Enterprise Search"
21
+ DETACH=true bash $script_path/run-enterprise-search.sh
22
+
23
+ echo "--- :ruby: Run Client"
24
+ bash $script_path/run-client.sh
@@ -7,7 +7,7 @@ jobs:
7
7
  ENDPOINT: http://localhost:8080
8
8
  strategy:
9
9
  matrix:
10
- ruby: [ '2.7', '3.0', '3.1' ]
10
+ ruby: [ '2.7', '3.0', '3.1', '3.2' ]
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
13
  - uses: actions/checkout@v2
@@ -27,7 +27,7 @@ jobs:
27
27
  strategy:
28
28
  fail-fast: false
29
29
  matrix:
30
- ruby: [ jruby-9.3 ]
30
+ ruby: [ jruby-9.3, jruby-9.4 ]
31
31
  runs-on: ubuntu-latest
32
32
  steps:
33
33
  - uses: actions/checkout@v2
data/.gitignore CHANGED
@@ -11,4 +11,5 @@ doc
11
11
  .#*
12
12
  *junit.xml
13
13
  .byebug_history
14
- coverage
14
+ coverage
15
+ tmp
data/README.md CHANGED
@@ -20,7 +20,7 @@ Or add it to your project's Gemfile:
20
20
  gem 'elastic-enterprise-search', 'VERSION'
21
21
  ```
22
22
 
23
- The Enterprise Search client is implemented with [`elastic-transport`](https://github.com/elastic/elastic-transport-ruby/) as the HTTP layer, which uses [Faraday](https://rubygems.org/gems/faraday). Faraday supports several [adapters](https://lostisland.github.io/faraday/adapters/) and will use `Net::HTTP` by default. For optimal performance with the Enterprise Search API, we suggest using an HTTP library which supports persistent ("keep-alive") connections. For the standard Ruby implementation, this could be https://github.com/drbrain/net-http-persistent[Net::HTTP::Persistent], [patron](https://github.com/toland/patron) or [Typhoeus](https://github.com/typhoeus/typhoeus). For JRuby, [Manticore](https://github.com/cheald/manticore) is a great option as well. Require the library for the adapter in your code and then pass in the `:adapter` parameter to the client when you initialize it:
23
+ The Enterprise Search client is implemented with [`elastic-transport`](https://github.com/elastic/elastic-transport-ruby/) as the HTTP layer, which uses [Faraday](https://rubygems.org/gems/faraday). Faraday supports several [adapters](https://lostisland.github.io/faraday/adapters/) and will use `Net::HTTP` by default. For optimal performance with the Enterprise Search API, we suggest using an HTTP library which supports persistent ("keep-alive") connections. For the standard Ruby implementation, this could be [Net::HTTP::Persistent](https://github.com/drbrain/net-http-persistent), [patron](https://github.com/toland/patron) or [Typhoeus](https://github.com/typhoeus/typhoeus). For JRuby, [Manticore](https://github.com/cheald/manticore) is a great option as well. Require the library for the adapter in your code and then pass in the `:adapter` parameter to the client when you initialize it:
24
24
 
25
25
  ```ruby
26
26
  require 'elastic-enterprise-search'
data/Rakefile CHANGED
@@ -28,7 +28,7 @@ end
28
28
 
29
29
  desc 'Run Elastic Enterprise Search stack'
30
30
  task :stack, [:version] do |_, params|
31
- sh "STACK_VERSION=#{params[:version]} ./.ci/run-local.sh"
31
+ sh "STACK_VERSION=#{params[:version]} ./.buildkite/run-local.sh"
32
32
  end
33
33
 
34
34
  # rubocop:disable Metrics/BlockLength
@@ -40,7 +40,13 @@ namespace :spec do
40
40
 
41
41
  desc 'Run integration tests'
42
42
  task :integration do
43
- sh 'rspec spec/integration'
43
+ buildkite = ENV['BUILDKITE']
44
+ puts '--- :rspec: Running Enteprise Search API Tests' if buildkite
45
+ sh 'rspec spec/integration/enterprise_search_api_spec.rb'
46
+ puts '--- :rspec: Running Workplace Search API Tests' if buildkite
47
+ sh 'rspec spec/integration/workplace-search'
48
+ puts '--- :rspec: Running App Search API Tests' if buildkite
49
+ sh 'rspec spec/integration/app-search'
44
50
  end
45
51
 
46
52
  desc 'Run all tests'
@@ -1,6 +1,18 @@
1
1
  [[release_notes_717]]
2
2
  === 7.17 Release notes
3
3
 
4
+ [discrete]
5
+ [[release_notes_7171]]
6
+ === 7.17.1 Release notes
7
+
8
+ - Updates in Documentation: CHANGELOG, CODE_OF_CONDUCT, CONTRIBUTING, NOTICE, README
9
+ - Adds the option to specify an adapter for Faraday when initializing a client. See https://github.com/elastic/enterprise-search-ruby/blob/main/README.md#elastic-enterprise-search-client[README]
10
+ - Fixes typo in meta data for CLIENT_NAME.
11
+
12
+ [discrete]
13
+ [[release_notes_7170]]
14
+ === 7.17.0 Release notes
15
+
4
16
  [discrete]
5
17
  ==== General
6
18
 
@@ -0,0 +1,9 @@
1
+ [[release_notes_86]]
2
+ === 8.6 Release notes
3
+
4
+ [discrete]
5
+ [[release_notes_860]]
6
+ === 8.6.0 Release notes
7
+
8
+ - Tested versions of Ruby for 8.6.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3 and JRuby 9.4.
9
+ - Updated for compatibility with Elastic Enterprise Search 8.6's API.
@@ -0,0 +1,13 @@
1
+ [[release_notes_87]]
2
+ === 8.7 Release notes
3
+
4
+ [discrete]
5
+ [[release_notes_870]]
6
+ === 8.7.0 Release notes
7
+
8
+ - Tested versions of Ruby for 8.7.0: Ruby (MRI) 2.7, 3.0, 3.1 and 3.2, JRuby 9.3 and JRuby 9.4.
9
+ - Updated for compatibility with Elastic Enterprise Search 8.7's API.
10
+
11
+ [discrete]
12
+ ==== App Search
13
+ - Fixed source code documentation for Search API. Updated parameter `boost` to `boosts`.
@@ -4,6 +4,8 @@
4
4
  [discrete]
5
5
  === 8.x
6
6
 
7
+ * <<release_notes_87, 8.7.0 Release Notes>>
8
+ * <<release_notes_86, 8.6.0 Release Notes>>
7
9
  * <<release_notes_85, 8.5.0 Release Notes>>
8
10
  * <<release_notes_84, 8.4.0 Release Notes>>
9
11
  * <<release_notes_83, 8.3.0 Release Notes>>
@@ -23,6 +25,8 @@
23
25
  * <<release_notes_711, 7.11.0 Release Notes>>
24
26
  * <<release_notes_710, 7.10.0.beta.1 Release Notes>>
25
27
 
28
+ include::87.asciidoc[]
29
+ include::86.asciidoc[]
26
30
  include::85.asciidoc[]
27
31
  include::84.asciidoc[]
28
32
  include::83.asciidoc[]
@@ -54,7 +54,7 @@ Gem::Specification.new do |s|
54
54
  s.add_development_dependency 'rspec', '~> 3.9.0'
55
55
  s.add_development_dependency 'rspec_junit_formatter'
56
56
  s.add_development_dependency 'rubocop', '~> 1'
57
- s.add_development_dependency 'vcr', '~> 3.0.3'
57
+ s.add_development_dependency 'vcr'
58
58
  s.add_development_dependency 'webmock'
59
59
  # Adapters
60
60
  s.add_development_dependency 'faraday-httpclient'
@@ -29,7 +29,7 @@ module Elastic
29
29
  # @option arguments [Hash] :body (Required: query)
30
30
  # @option body [string] :query
31
31
  # @option body :analytics
32
- # @option body :boost
32
+ # @option body :boosts
33
33
  # @option body :facets
34
34
  # @option body :filters
35
35
  # @option body :group
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Elastic
21
21
  module EnterpriseSearch
22
- VERSION = '8.5.0'
22
+ VERSION = '8.7.0'
23
23
  end
24
24
  end
@@ -96,7 +96,7 @@ describe Elastic::EnterpriseSearch::Client do
96
96
  context 'meta-header' do
97
97
  let(:transport) { Elastic::EnterpriseSearch::Client.new.instance_variable_get('@transport') }
98
98
  let(:subject) { transport.transport.connections.first.connection.headers }
99
- let(:regexp) { /^[a-z]{1,}=[a-z0-9.\-]{1,}(?:,[a-z]{1,}=[a-z0-9._-]+)*$/ }
99
+ let(:regexp) { /^[a-z]{1,}=[a-z0-9.-]{1,}(?:,[a-z]{1,}=[a-z0-9._-]+)*$/ }
100
100
 
101
101
  it 'sends the correct meta header to transport' do
102
102
  expect(subject['x-elastic-client-meta']).to match(regexp)
@@ -54,14 +54,6 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
54
54
  }
55
55
  response = client.api_logs(engine_name, body: body)
56
56
  expect(response.status).to eq 200
57
-
58
- attempts = 0
59
- while response.body['results'].count < 1 && attempts < 20
60
- sleep 1
61
- attempts += 1
62
- response = client.api_logs(engine_name, body: body)
63
- end
64
- expect(response.body['results'].count).to be >= 1
65
57
  end
66
58
  end
67
59
  end
data/spec/spec_helper.rb CHANGED
@@ -29,9 +29,13 @@ RSpec.configure do |config|
29
29
  # the seed, which is printed after each run.
30
30
  # --seed 1234
31
31
  config.order = 'random'
32
-
32
+ config.color = true
33
33
  config.add_formatter('documentation')
34
34
  config.add_formatter('RspecJunitFormatter', 'enterprise-search-junit.xml')
35
+ config.add_formatter(
36
+ 'RSpec::Core::Formatters::HtmlFormatter',
37
+ "tmp/enterprise-search-#{ENV['SERVICE']}-#{RUBY_VERSION}.html"
38
+ )
35
39
 
36
40
  VCR.configure do |c|
37
41
  c.cassette_library_dir = 'spec/fixtures/vcr'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic-enterprise-search
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.5.0
4
+ version: 8.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Briano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-02 00:00:00.000000000 Z
11
+ date: 2023-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elastic-transport
@@ -118,16 +118,16 @@ dependencies:
118
118
  name: vcr
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - "~>"
121
+ - - ">="
122
122
  - !ruby/object:Gem::Version
123
- version: 3.0.3
123
+ version: '0'
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - "~>"
128
+ - - ">="
129
129
  - !ruby/object:Gem::Version
130
- version: 3.0.3
130
+ version: '0'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: webmock
133
133
  requirement: !ruby/object:Gem::Requirement
@@ -207,32 +207,27 @@ executables: []
207
207
  extensions: []
208
208
  extra_rdoc_files: []
209
209
  files:
210
+ - ".buildkite/Dockerfile"
211
+ - ".buildkite/certs/README.md"
212
+ - ".buildkite/certs/ca.crt"
213
+ - ".buildkite/certs/ca.key"
214
+ - ".buildkite/certs/testnode.crt"
215
+ - ".buildkite/certs/testnode.key"
216
+ - ".buildkite/certs/testnode_no_san.crt"
217
+ - ".buildkite/certs/testnode_no_san.key"
218
+ - ".buildkite/functions/cleanup.sh"
219
+ - ".buildkite/functions/imports.sh"
220
+ - ".buildkite/functions/wait-for-container.sh"
221
+ - ".buildkite/log-results.sh"
222
+ - ".buildkite/pipeline.yml"
223
+ - ".buildkite/run-client.sh"
224
+ - ".buildkite/run-elasticsearch.sh"
225
+ - ".buildkite/run-enterprise-search.sh"
226
+ - ".buildkite/run-local.sh"
227
+ - ".buildkite/run-tests.sh"
210
228
  - ".ci/.gitignore"
211
229
  - ".ci/Dockerfile"
212
- - ".ci/certs/README.md"
213
- - ".ci/certs/ca.crt"
214
- - ".ci/certs/ca.key"
215
- - ".ci/certs/testnode.crt"
216
- - ".ci/certs/testnode.key"
217
- - ".ci/certs/testnode_no_san.crt"
218
- - ".ci/certs/testnode_no_san.key"
219
- - ".ci/functions/cleanup.sh"
220
- - ".ci/functions/imports.sh"
221
- - ".ci/functions/wait-for-container.sh"
222
- - ".ci/jobs/defaults.yml"
223
- - ".ci/jobs/elastic+enterprise-search-ruby+7.17.yml"
224
- - ".ci/jobs/elastic+enterprise-search-ruby+8.2.yml"
225
- - ".ci/jobs/elastic+enterprise-search-ruby+8.3.yml"
226
- - ".ci/jobs/elastic+enterprise-search-ruby+8.4.yml"
227
- - ".ci/jobs/elastic+enterprise-search-ruby+main.yml"
228
- - ".ci/jobs/elastic+enterprise-search-ruby+pull-request.yml"
229
230
  - ".ci/make.sh"
230
- - ".ci/run-elasticsearch.sh"
231
- - ".ci/run-enterprise-search.sh"
232
- - ".ci/run-local.sh"
233
- - ".ci/run-repository.sh"
234
- - ".ci/run-tests"
235
- - ".ci/test-matrix.yml"
236
231
  - ".github/check_license_headers.rb"
237
232
  - ".github/license-header.txt"
238
233
  - ".github/workflows/license.yml"
@@ -269,6 +264,8 @@ files:
269
264
  - docs/guide/release_notes/83.asciidoc
270
265
  - docs/guide/release_notes/84.asciidoc
271
266
  - docs/guide/release_notes/85.asciidoc
267
+ - docs/guide/release_notes/86.asciidoc
268
+ - docs/guide/release_notes/87.asciidoc
272
269
  - docs/guide/release_notes/index.asciidoc
273
270
  - docs/guide/workplace-search-api.asciidoc
274
271
  - elastic-enterprise-search.gemspec
@@ -481,7 +478,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
481
478
  - !ruby/object:Gem::Version
482
479
  version: '0'
483
480
  requirements: []
484
- rubygems_version: 3.3.7
481
+ rubygems_version: 3.4.10
485
482
  signing_key:
486
483
  specification_version: 4
487
484
  summary: Official API client for Elastic Enterprise Search
@@ -1,21 +0,0 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIDYjCCAkqgAwIBAgIVAIZQH0fe5U+bGQ6m1JUBO/AQkQ/9MA0GCSqGSIb3DQEB
3
- CwUAMDQxMjAwBgNVBAMTKUVsYXN0aWMgQ2VydGlmaWNhdGUgVG9vbCBBdXRvZ2Vu
4
- ZXJhdGVkIENBMB4XDTIwMDMyNzE5MTcxMVoXDTIzMDMyNzE5MTcxMVowEzERMA8G
5
- A1UEAxMIaW5zdGFuY2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDB
6
- fco1t1+sE1gTwTVGcXKZqJTP2GjMHM0cfJE5KKfwC5B+pHADRT6FZxvepgKjEBDt
7
- CK+2Rmotyeb15XXMSKguNhyT+2PuKvT5r05L7P91XRYXrwxG2swJPtct7A87xdFa
8
- Ek+YRpqGGmTaux2jOELMiAmqEzoj6w/xFq+LF4SolTW4wOL2eLFkEFHBX2oCwU5T
9
- Q+B+7E9zL45nFWlkeRGJ+ZQTnRNZ/1r4N9A9Gtj4x/H1/y4inWndikdxAb5QiEYJ
10
- T+vbQWzHYWjz13ttHJsz+6T8rvA1jK+buHgVh4K8lV13X9k54soBqHB8va7/KIJP
11
- g8gvd6vusEI7Bmfl1as7AgMBAAGjgYswgYgwHQYDVR0OBBYEFKnnpvuVYwtFSUis
12
- WwN9OHLyExzJMB8GA1UdIwQYMBaAFJYCWKn16g+acbing4Vl45QGUBs0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AO
25
- tuSVaQmm5eqgaAxMamBXSyw1lir07byemyuEDg0mJ1rNUGsAY8P+LWr579gvKMme
26
- 5gvrJr99JkBTV3z+TiL7dZa52eW00Ijqg2qcbHGpq3kXWWkbd8Tn
27
- -----END RSA PRIVATE KEY-----
@@ -1,73 +0,0 @@
1
- ---
2
-
3
- ##### GLOBAL METADATA
4
-
5
- - meta:
6
- cluster: clients-ci
7
-
8
- ##### JOB DEFAULTS
9
-
10
- - job:
11
- project-type: matrix
12
- logrotate:
13
- daysToKeep: 30
14
- numToKeep: 100
15
- properties:
16
- - github:
17
- url: https://github.com/elastic/enterprise-search-ruby/
18
- - inject:
19
- properties-content: HOME=$JENKINS_HOME
20
- concurrent: true
21
- node: flyweight
22
- scm:
23
- - git:
24
- name: origin
25
- credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba
26
- reference-repo: /var/lib/jenkins/.git-references/enterprise-search-ruby.git
27
- branches:
28
- - ${branch_specifier}
29
- url: git@github.com:elastic/enterprise-search-ruby.git
30
- basedir: ''
31
- wipe-workspace: 'True'
32
- triggers:
33
- - github
34
- - timed: 'H 5,17 * * *'
35
- axes:
36
- - axis:
37
- type: slave
38
- name: label
39
- values:
40
- - linux
41
- - axis:
42
- type: yaml
43
- filename: .ci/test-matrix.yml
44
- name: STACK_VERSION
45
- - axis:
46
- type: yaml
47
- filename: .ci/test-matrix.yml
48
- name: RUBY_VERSION
49
- - axis:
50
- type: yaml
51
- filename: .ci/test-matrix.yml
52
- name: SERVICE
53
- yaml-strategy:
54
- exclude-key: exclude
55
- filename: .ci/test-matrix.yml
56
- wrappers:
57
- - ansicolor
58
- - timeout:
59
- type: absolute
60
- timeout: 120
61
- fail: true
62
- - timestamps
63
- - workspace-cleanup
64
- builders:
65
- - shell: |-
66
- #!/usr/local/bin/runbld
67
- .ci/run-tests
68
- publishers:
69
- - email:
70
- recipients: build-lang-clients@elastic.co
71
- - junit:
72
- results: "*-junit.xml"
73
- allow-empty-results: true
@@ -1,12 +0,0 @@
1
- ---
2
- - job:
3
- name: elastic+enterprise-search-ruby+7.17
4
- display-name: 'elastic / enterprise-search-ruby # 7.17'
5
- description: Testing the enterprise-search-ruby 7.17 branch.
6
- junit_results: "*-junit.xml"
7
- parameters:
8
- - string:
9
- name: branch_specifier
10
- default: refs/heads/7.17
11
- description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
12
- &lt;commitId&gt;, etc.)
@@ -1,12 +0,0 @@
1
- ---
2
- - job:
3
- name: elastic+enterprise-search-ruby+8.2
4
- display-name: 'elastic / enterprise-search-ruby # 8.2'
5
- description: Testing the enterprise-search-ruby 8.2 branch.
6
- junit_results: "*-junit.xml"
7
- parameters:
8
- - string:
9
- name: branch_specifier
10
- default: refs/heads/8.2
11
- description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
12
- &lt;commitId&gt;, etc.)
@@ -1,12 +0,0 @@
1
- ---
2
- - job:
3
- name: elastic+enterprise-search-ruby+8.3
4
- display-name: 'elastic / enterprise-search-ruby # 8.3'
5
- description: Testing the enterprise-search-ruby 8.3 branch.
6
- junit_results: "*-junit.xml"
7
- parameters:
8
- - string:
9
- name: branch_specifier
10
- default: refs/heads/8.3
11
- description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
12
- &lt;commitId&gt;, etc.)
@@ -1,12 +0,0 @@
1
- ---
2
- - job:
3
- name: elastic+enterprise-search-ruby+8.4
4
- display-name: 'elastic / enterprise-search-ruby # 8.4'
5
- description: Testing the enterprise-search-ruby 8.4 branch.
6
- junit_results: "*-junit.xml"
7
- parameters:
8
- - string:
9
- name: branch_specifier
10
- default: refs/heads/8.4
11
- description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
12
- &lt;commitId&gt;, etc.)
@@ -1,12 +0,0 @@
1
- ---
2
- - job:
3
- name: elastic+enterprise-search-ruby+main
4
- display-name: 'elastic / enterprise-search-ruby # main'
5
- description: Testing the enterprise-search-ruby main branch.
6
- junit_results: "*-junit.xml"
7
- parameters:
8
- - string:
9
- name: branch_specifier
10
- default: refs/heads/main
11
- description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
12
- &lt;commitId&gt;, etc.)
@@ -1,19 +0,0 @@
1
- ---
2
- - job:
3
- name: elastic+enterprise-search-ruby+pull-request
4
- display-name: 'elastic / enterprise-search-ruby # pull-request'
5
- description: Testing of enterprise-search-ruby pull requests.
6
- junit_results: "*-junit.xml"
7
- scm:
8
- - git:
9
- branches:
10
- - ${ghprbActualCommit}
11
- refspec: +refs/pull/*:refs/remotes/origin/pr/*
12
- triggers:
13
- - github-pull-request:
14
- org-list:
15
- - elastic
16
- allow-whitelist-orgs-as-admins: true
17
- github-hooks: true
18
- status-context: clients-ci
19
- cancel-builds-on-update: true
@@ -1,50 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Called by entry point `run-test` use this script to add your repository specific test commands
4
- #
5
- # Once called Elasticsearch is up and running
6
- #
7
- # Its recommended to call `imports.sh` as defined here so that you get access to all variables defined there
8
- #
9
- # Any parameters that test-matrix.yml defines should be declared here with appropiate defaults
10
-
11
- script_path=$(dirname $(realpath -s $0))
12
- source $script_path/functions/imports.sh
13
- set -euo pipefail
14
-
15
- echo -e "\033[34;1mINFO:\033[0m VERSION: ${STACK_VERSION}\033[0m"
16
- echo -e "\033[34;1mINFO:\033[0m TEST_SUITE: ${TEST_SUITE}\033[0m"
17
- echo -e "\033[34;1mINFO:\033[0m RUBY_VERSION: ${RUBY_VERSION}\033[0m"
18
- echo -e "\033[34;1mINFO:\033[0m RUNSCRIPTS: ${RUNSCRIPTS}\033[0m"
19
- echo -e "\033[34;1mINFO:\033[0m URL: ${elasticsearch_url}\033[0m"
20
- echo -e "\033[34;1mINFO:\033[0m SERVICE: ${SERVICE}\033[0m"
21
-
22
- echo -e "\033[34;1mINFO:\033[0m pinging Elasticsearch ..\033[0m"
23
- curl --insecure --fail $external_elasticsearch_url/_cluster/health?pretty
24
-
25
- if [[ "$RUNSCRIPTS" = *"enterprise-search"* ]]; then
26
- enterprise_search_url="http://localhost:3002"
27
- echo -e "\033[34;1mINFO:\033[0m pinging Enterprise Search ..\033[0m"
28
- curl -I --fail $enterprise_search_url
29
- fi
30
-
31
- echo -e "\033[32;1mSUCCESS:\033[0m successfully started the ${STACK_VERSION} stack.\033[0m"
32
-
33
- echo -e "\033[32;1mBUILD: \033[31mRuby \e[0m container.\033[0m"
34
-
35
- docker build \
36
- --file .ci/Dockerfile \
37
- --tag elastic/enterprise-search-ruby \
38
- --build-arg RUBY_VERSION=${RUBY_VERSION} \
39
- .
40
-
41
- echo -e "\033[32;1mRUN: \033[31mRuby \e[0m container.\033[0m"
42
-
43
- docker run \
44
- --network ${network_name} \
45
- --name enterprise-search-ruby \
46
- --env "ELASTIC_ENTERPRISE_HOST=http://${CONTAINER_NAME}:3002" \
47
- --rm \
48
- --volume `pwd`:/code/enterprise-search-ruby \
49
- elastic/enterprise-search-ruby \
50
- rake spec:integration:${SERVICE}
data/.ci/run-tests DELETED
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Version 1.1
4
- # - Moved to .ci folder and seperated out `run-repository.sh`
5
- # - Add `$RUNSCRIPTS` env var for running Elasticsearch dependent products
6
- export TEST_SUITE=platinum
7
- export CONTAINER_NAME=enterprise-search
8
- export RUNSCRIPTS=enterprise-search
9
-
10
- script_path=$(dirname $(realpath -s $0))
11
- source $script_path/functions/imports.sh
12
- set -euo pipefail
13
-
14
- echo -e "\033[1m>>>>> Start [$STACK_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
15
- DETACH=true bash .ci/run-elasticsearch.sh
16
-
17
- if [[ -n "$RUNSCRIPTS" ]]; then
18
- for RUNSCRIPT in ${RUNSCRIPTS//,/ } ; do
19
- echo -e "\033[1m>>>>> Running run-$RUNSCRIPT.sh >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
20
- CONTAINER_NAME=${RUNSCRIPT} \
21
- DETACH=true \
22
- bash .ci/run-${RUNSCRIPT}.sh
23
- done
24
- fi
25
-
26
- echo -e "\033[1m>>>>> Repository specific tests >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
27
- bash .ci/run-repository.sh
data/.ci/test-matrix.yml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- RUBY_VERSION:
3
- - 3.1
4
- - 3.0
5
- - 2.7
6
-
7
- STACK_VERSION:
8
- - 8.5.0-SNAPSHOT
9
-
10
- SERVICE:
11
- - appsearch
12
- - enterprisesearch
13
- - workplacesearch
14
-
15
- exclude: ~
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes