Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Add compatibility matrix #45

Merged
merged 7 commits into from
May 23, 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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
Expand Down Expand Up @@ -67,12 +67,12 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v1
- name: Setup Python - ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python 3.8 for Nox
if: matrix.python-version != '3.8'
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install nox
Expand Down
30 changes: 25 additions & 5 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,45 @@ jobs:
strategy:
fail-fast: false
matrix:
cluster: ["opendistro", "opensearch"]
entry:
- { cluster: 'opensearch', version: 1.0.0 }
- { cluster: 'opensearch', version: 1.0.1 }
- { cluster: 'opensearch', version: 1.1.0 }
- { cluster: 'opensearch', version: 1.2.0 }
- { cluster: 'opensearch', version: 1.2.1 }
- { cluster: 'opensearch', version: 1.2.2 }
- { cluster: 'opensearch', version: 1.2.3 }
- { cluster: 'opensearch', version: 1.2.4 }
- { cluster: 'opensearch', version: 1.3.0 }
- { cluster: 'opensearch', version: 1.3.1 }
- { cluster: 'opendistro', version: 'latest' }
secured: ["true", "false"]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Clean docker containers
run: |
docker volume prune --force
docker network prune --force
docker system prune --volumes --force
- name: Launch ${{ matrix.cluster }} cluster

- name: Set the cluster version
if: ${{ matrix.entry.cluster == 'opensearch' }}
run: |
export OPENSEARCH_VERSION=${{ matrix.entry.opensearch_version }}

- name: Launch ${{ matrix.entry.cluster }} cluster
run: |
export SECURE_INTEGRATION=${{ matrix.secured }}
docker-compose --project-directory .ci/${{ matrix.cluster }} build
docker-compose --project-directory .ci/${{ matrix.cluster }} up -d
docker-compose --project-directory .ci/${{ matrix.entry.cluster }} build
docker-compose --project-directory .ci/${{ matrix.entry.cluster }} up -d

- name: Install Nox
run: pip install nox
- name: Integ ${{ matrix.cluster }} secured=${{ matrix.secured }}

- name: Integ ${{ matrix.entry.cluster }} secured=${{ matrix.secured }}
run: |
export SECURE_INTEGRATION=${{ matrix.secured }}
nox -rs lint test
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-dsl-py-client`](https://pypi.org/project/opensearch-dsl/) 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 |
9 changes: 7 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ def test(session):
def format(session):
session.install("black", "isort")
session.run(
"black", "--target-version=py27", "--target-version=py37", *SOURCE_FILES
"black",
"--skip-string-normalization",
"--target-version=py33",
"--target-version=py37",
*SOURCE_FILES
)
session.run("isort", *SOURCE_FILES)
session.run("python", "utils/license-headers.py", "fix", *SOURCE_FILES)
Expand All @@ -68,7 +72,8 @@ def lint(session):
session.run(
"black",
"--check",
"--target-version=py27",
"--skip-string-normalization",
"--target-version=py33",
"--target-version=py37",
*SOURCE_FILES
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def test_search_index():
assert s._index == ["i"]
s = s.index("i2")
assert s._index == ["i", "i2"]
s = s.index(u"i3")
s = s.index("i3")
assert s._index == ["i", "i2", "i3"]
s = s.index()
assert s._index is None
Expand Down