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

Add support to test against multiple versions of OpenSearch #62

Merged
merged 2 commits into from
Apr 25, 2022
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
85 changes: 85 additions & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Integration with Compatibility
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"

jobs:
test-opensearch:
env:
TEST_OPENSEARCH_SERVER: http://localhost:9250
PORT: 9250
strategy:
fail-fast: false
matrix:
cluster-version: [ "1.0.0", "1.0.1", "1.1.0", "1.2.0", "1.2.1", "1.2.2", "1.2.3", "1.2.4", "1.3.0", "1.3.1" ]
runs-on: ubuntu-latest
Copy link
Member

@saratvemulapalli saratvemulapalli Apr 25, 2022

Choose a reason for hiding this comment

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

Are we expecting clients to work on multiple platforms, cpu architectures?
I am curious how this works for clients. Are there any platform specific code in clients?

As a developer I would like to have these clients tested and validated atleast in the popular platforms.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I haven't yet come across platform specific code in the clients, we can definitely create an issue in opensearch-clients to add this testing as a feature.

Copy link
Member

Choose a reason for hiding this comment

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

i believe it is interpreted at run time. But i like the idea of including strategy to cover mac/linux/windows to be proactive in all our clients.

Copy link
Member

@saratvemulapalli saratvemulapalli Apr 25, 2022

Choose a reason for hiding this comment

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

Sure, I'll open an issue. opensearch-project/opensearch-clients#18

steps:
- uses: actions/checkout@v2
- name: Increase system limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- uses: ./.github/actions/opensearch
with:
cluster-version: ${{ matrix.cluster-version }}
disable-security: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- name: Build and test with Rake
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
ruby -v
rake bundle:clean
rake bundle:install
- name: opensearch-ruby
run: cd opensearch && bundle exec rake test:all
- name: opensearch-transport
run: cd opensearch-transport && bundle exec rake test:all
- name: opensearch-api
run: cd opensearch-api && bundle exec rake test:spec
- name: opensearch-dsl
run: cd opensearch-dsl && bundle exec rake test:all


test-opensearch-security:
env:
TEST_OPENSEARCH_SERVER: https://admin:admin@localhost:9200
PORT: 9200
strategy:
fail-fast: false
matrix:
cluster-version: [ "1.0.0", "1.0.1", "1.1.0", "1.2.0", "1.2.1", "1.2.2", "1.2.3", "1.2.4", "1.3.0", "1.3.1" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Increase system limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- uses: ./.github/actions/opensearch
with:
cluster-version: ${{ matrix.cluster-version }}
disable-security: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- name: Build and test with Rake
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install ca-certificates
ruby -v
rake bundle:clean
rake bundle:install
- name: opensearch
run: cd opensearch && bundle exec rake test_security:all
6 changes: 2 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ name: Integration
on:
push:
branches:
- main
- 1.0
- "*"
paths-ignore:
- 'README.md'
pull_request:
branches:
- main
- 1.0
- "*"
paths-ignore:
- 'README.md'
jobs:
Expand Down
18 changes: 18 additions & 0 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- [Compatibility with OpenSearch](#compatibility-with-opensearch)

## Compatibility with OpenSearch

The below matrix shows the compatibility of the [`opensearch-ruby`](https://rubygems.org/gems/opensearch-ruby) with versions of [`OpenSearch`](https://opensearch.org/downloads.html#opensearch).

| OpenSearch Version | Client Version |
| --- | --- |
| 1.0.0 | 1.0.0 |
| 1.0.1 | 1.0.0 |
| 1.1.0 | 1.0.0 |
| 1.2.0 | 1.0.0 |
| 1.2.1 | 1.0.0 |
| 1.2.2 | 1.0.0 |
| 1.2.3 | 1.0.0 |
| 1.2.4 | 1.0.0 |
| 1.3.0 | 1.0.0 |
| 1.3.1 | 1.0.0 |