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

Fix: CI #267

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .github/workflows/generate_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- name: Update bundler
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
bundle install

- name: Generate API
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
env:
TEST_OPENSEARCH_SERVER: http://localhost:9250
PORT: 9250
FARADAY_VERSION: '~> 1.0'
FARADAY_VERSION: '~> 1'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -106,7 +106,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install ca-certificates
ruby -v
bundle install
- name: Test Client Security
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/test-unreleased.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ name: Integration with Unreleased OpenSearch
on:
push:
branches:
- "main"
- 'main'
paths-ignore:
- '*.md'
pull_request:
branches:
- "main"
- 'main'
paths-ignore:
- '*.md'

jobs:
test:
env:
FARADAY_VERSION: '~> 1'
TEST_OPENSEARCH_SERVER: http://localhost:9200
PORT: 9200
runs-on: ubuntu-latest
Expand All @@ -24,7 +25,7 @@ jobs:
entry:
- { ruby_version: '3.3', opensearch_ref: '1.x', jdk_version: '11' }
- { ruby_version: '3.3', opensearch_ref: '2.x', jdk_version: '17' }
- { ruby_version: '3.3', opensearch_ref: 'main', jdk_version: '17' }
- { ruby_version: '3.3', opensearch_ref: 'main', jdk_version: '21' }

steps:
- uses: ruby/setup-ruby@v1
Expand All @@ -40,7 +41,7 @@ jobs:
- name: Get OpenSearch branch top
id: get-key
working-directory: opensearch
run: echo key=`git log -1 --format='%H'` >> $GITHUB_OUTPUT
run: echo key=`git log -1 --format='%H'`-${{ matrix.entry.jdk_version }} >> $GITHUB_OUTPUT

- name: Restore cached build
id: cache-restore
Expand All @@ -51,7 +52,6 @@ jobs:

- name: Setup Java JDK
uses: actions/setup-java@v4
if: steps.cache-restore.outputs.cache-hit != 'true'
with:
distribution: 'temurin'
java-version: ${{ matrix.entry.jdk_version }}
Expand All @@ -60,7 +60,6 @@ jobs:
if: steps.cache-restore.outputs.cache-hit != 'true'
working-directory: opensearch
run: ./gradlew :distribution:archives:linux-tar:assemble --stacktrace


- name: Save cached build
if: steps.cache-restore.outputs.cache-hit != 'true'
Expand Down
37 changes: 21 additions & 16 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,16 @@ source 'https://rubygems.org'

gem 'opensearch-ruby', path: __dir__, require: false

# TODO: remove unnecessary dependencies
gem 'ansi'
gem 'bundler'
gem 'cane'
gem 'faraday-httpclient'
gem 'faraday-net_http_persistent'
gem 'hashie'
gem 'httpclient'
gem 'jbuilder'
gem 'jsonify'
gem 'minitest', '~> 5'
gem 'minitest-reporters', '~> 1'
gem 'mocha', '~> 2'
gem 'net-http-persistent'
gem 'pry'
gem 'rake', '~> 13'
gem 'rspec', '~> 3'
Expand All @@ -50,19 +47,27 @@ gem 'rubocop-rspec'
gem 'shoulda-context'
gem 'simplecov', '~> 0.17', '< 0.18'
gem 'test-unit', '~> 2'
gem 'typhoeus', '~> 1.4'
gem 'webmock', '~> 2.0'
gem 'yard'

gem 'curb' unless defined? JRUBY_VERSION
gem 'faraday-patron' unless defined? JRUBY_VERSION
gem 'patron' unless defined? JRUBY_VERSION
if defined? JRUBY_VERSION
gem 'manticore'
gem 'pry-nav'
else
gem 'curb'
gem 'require-prof'
gem 'ruby-prof'
end

gem 'require-prof' unless defined?(JRUBY_VERSION) || defined?(Rubinius)
gem 'ruby-prof' unless defined?(JRUBY_VERSION) || defined?(Rubinius)

gem 'manticore' if defined? JRUBY_VERSION
gem 'pry-nav' if defined? JRUBY_VERSION

gem 'faraday', ENV.fetch('FARADAY_VERSION', nil), require: false if ENV.key?('FARADAY_VERSION')
gem 'faraday-typhoeus' if !ENV.key?('FARADAY_VERSION') && Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6')
if ENV.key?('FARADAY_VERSION')
gem 'faraday', ENV.fetch('FARADAY_VERSION'), require: false
gem 'httpclient'
gem 'net-http-persistent'
gem 'patron' unless defined? JRUBY_VERSION
gem 'typhoeus', '~> 1.4'
else
gem 'faraday-httpclient'
gem 'faraday-net_http_persistent'
gem 'faraday-patron' unless defined? JRUBY_VERSION
gem 'faraday-typhoeus'
end
2 changes: 1 addition & 1 deletion spec/opensearch/transport/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@
client.transport.connections.first.connection.builder.adapter
end

it 'uses the patron connection handler' do
it 'uses the typhoeus connection handler' do
expect(adapter).to eq('Faraday::Adapter::Typhoeus')
end

Expand Down