Update ci workflows (#318)
* Update CI workflows to include more Python and OpenSearch versions and run faster. Signed-off-by: Yury-Fridlyand <[email protected]> * Fix CI workflows. Signed-off-by: Yury-Fridlyand <[email protected]> * Add `OPENSEARCH_VERSION` variable. Signed-off-by: Yury-Fridlyand <[email protected]> * Set `OPENSEARCH_VERSION` to constant. Signed-off-by: Yury-Fridlyand <[email protected]> * CHANGELOG.md Signed-off-by: Yury-Fridlyand <[email protected]> * Add 2.6.0 version to test matrix. Signed-off-by: Yury-Fridlyand <[email protected]> --------- Signed-off-by: Yury-Fridlyand <[email protected]> Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
This commit is contained in:
co-authored by
Daniel Doubrovkine
parent
06f7dd44f8
commit
409c883013
+15
-15
@@ -8,9 +8,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
- name: Set up Python 3.7
|
- name: Set up Python 3.7
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -23,9 +23,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
- name: Set up Python 3.7
|
- name: Set up Python 3.7
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
- name: Install build tools
|
- name: Install build tools
|
||||||
@@ -39,18 +39,15 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ['3.7', '3.8', '3.9', '3.10']
|
python-version: ['2.7', '3.7', '3.8', '3.9', '3.10', '3.11']
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
experimental: [false]
|
experimental: [false]
|
||||||
include:
|
include:
|
||||||
- python-version: '2.7'
|
- os: 'ubuntu-20.04'
|
||||||
os: ubuntu-20.04
|
python-version: '3.5'
|
||||||
experimental: false
|
experimental: false
|
||||||
- python-version: '3.5'
|
- os: 'ubuntu-20.04'
|
||||||
os: ubuntu-20.04
|
python-version: '3.6'
|
||||||
experimental: false
|
|
||||||
- python-version: '3.6'
|
|
||||||
os: ubuntu-20.04
|
|
||||||
experimental: false
|
experimental: false
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -58,11 +55,14 @@ jobs:
|
|||||||
continue-on-error: ${{ matrix.experimental }}
|
continue-on-error: ${{ matrix.experimental }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
- name: Set Up Python - ${{ matrix.python-version }}
|
- name: Set Up Python - ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
env:
|
||||||
|
PIP_NO_PYTHON_VERSION_WARNING: 1
|
||||||
|
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install -r dev-requirements.txt
|
python -m pip install -r dev-requirements.txt
|
||||||
@@ -75,7 +75,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
@@ -8,28 +8,66 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
entry:
|
opensearch_ref: [ '1.x', '2.x', '2.0', 'main' ]
|
||||||
- { opensearch_ref: '1.x' }
|
|
||||||
- { opensearch_ref: '2.0' }
|
|
||||||
- { opensearch_ref: '2.x' }
|
|
||||||
- { opensearch_ref: 'main' }
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout OpenSearch
|
- name: Checkout OpenSearch
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: opensearch-project/opensearch
|
repository: opensearch-project/opensearch
|
||||||
ref: ${{ matrix.entry.opensearch_ref }}
|
ref: ${{ matrix.opensearch_ref }}
|
||||||
path: opensearch
|
path: opensearch
|
||||||
|
|
||||||
# This step builds the docker image tagged as opensearch:test. It will be further used in /ci/run-tests to test against unreleased OpenSearch.
|
- name: Get OpenSearch branch top
|
||||||
# Reference: https://github.com/opensearch-project/OpenSearch/blob/2.0/distribution/docker/build.gradle#L190
|
id: get-key
|
||||||
|
working-directory: opensearch
|
||||||
|
run: echo key=`git log -1 --format='%H'` >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Restore cached build
|
||||||
|
id: cache-restore
|
||||||
|
uses: actions/cache/restore@v3
|
||||||
|
with:
|
||||||
|
path: opensearch/distribution/archives/linux-tar/build/distributions
|
||||||
|
key: ${{ steps.get-key.outputs.key }}
|
||||||
|
|
||||||
|
- uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
|
java-version: '11'
|
||||||
|
|
||||||
- name: Assemble OpenSearch
|
- name: Assemble OpenSearch
|
||||||
|
if: steps.cache-restore.outputs.cache-hit != 'true'
|
||||||
|
working-directory: opensearch
|
||||||
|
run: ./gradlew :distribution:archives:linux-tar:assemble
|
||||||
|
|
||||||
|
- name: Save cached build
|
||||||
|
if: steps.cache-restore.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v3
|
||||||
|
with:
|
||||||
|
path: opensearch/distribution/archives/linux-tar/build/distributions
|
||||||
|
key: ${{ steps.get-key.outputs.key }}
|
||||||
|
|
||||||
|
- name: Run OpenSearch
|
||||||
|
working-directory: opensearch/distribution/archives/linux-tar/build/distributions
|
||||||
run: |
|
run: |
|
||||||
cd opensearch
|
tar xf opensearch-min-*
|
||||||
./gradlew assemble
|
./opensearch-*/bin/opensearch &
|
||||||
|
for attempt in {1..20}; do sleep 5; if curl -s localhost:9200; then echo '=====> ready'; break; fi; echo '=====> waiting...'; done
|
||||||
|
|
||||||
- name: Checkout Python Client
|
- name: Checkout Python Client
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: opensearch-py
|
||||||
|
|
||||||
- name: Run Integration Test
|
- name: Run Integration Test
|
||||||
run: "./.ci/run-tests false SNAPSHOT"
|
env:
|
||||||
|
OPENSEARCH_URL: http://localhost:9200
|
||||||
|
TEST_TYPE: server
|
||||||
|
OPENSEARCH_VERSION: SNAPSHOT
|
||||||
|
run: |
|
||||||
|
mkdir -p junit
|
||||||
|
python -m pip install -U --no-cache-dir --disable-pip-version-check pip
|
||||||
|
python -m pip install --no-cache-dir --disable-pip-version-check -r dev-requirements.txt
|
||||||
|
python -m pip install -e .
|
||||||
|
python setup.py test
|
||||||
|
working-directory: opensearch-py
|
||||||
|
|||||||
@@ -9,21 +9,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
secured: ["true", "false"]
|
opensearch_version: [ '1.0.1', '1.1.0', '1.2.4', '1.3.7', '2.0.1', '2.1.0', '2.2.1', '2.3.0', '2.4.0', '2.5.0', '2.6.0' ]
|
||||||
entry:
|
secured: [ "true", "false" ]
|
||||||
- { opensearch_version: 1.0.1 }
|
|
||||||
- { opensearch_version: 1.1.0 }
|
|
||||||
- { opensearch_version: 1.2.4 }
|
|
||||||
- { opensearch_version: 1.3.7 }
|
|
||||||
- { opensearch_version: 2.0.1 }
|
|
||||||
- { opensearch_version: 2.1.0 }
|
|
||||||
- { opensearch_version: 2.2.1 }
|
|
||||||
- { opensearch_version: 2.3.0 }
|
|
||||||
- { opensearch_version: 2.4.0 }
|
|
||||||
- { opensearch_version: 2.4.1 }
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Integ OpenSearch secured=${{ matrix.secured }} version=${{matrix.entry.opensearch_version}}
|
- name: Integ OpenSearch secured=${{ matrix.secured }} version=${{matrix.entry.opensearch_version}}
|
||||||
run: "./.ci/run-tests ${{ matrix.secured }} ${{ matrix.entry.opensearch_version }}"
|
run: "./.ci/run-tests ${{ matrix.secured }} ${{ matrix.entry.opensearch_version }}"
|
||||||
@@ -9,6 +9,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Fixed import cycle when importing async helpers ([#311](https://github.com/opensearch-project/opensearch-py/pull/311))
|
- Fixed import cycle when importing async helpers ([#311](https://github.com/opensearch-project/opensearch-py/pull/311))
|
||||||
### Security
|
### Security
|
||||||
|
- Fixed CVE-2022-23491 reported in opensearch-dsl-py ([#295](https://github.com/opensearch-project/opensearch-py/pull/295))
|
||||||
|
- Update ci workflows ([#318](https://github.com/opensearch-project/opensearch-py/pull/318))
|
||||||
|
|
||||||
## [2.2.0]
|
## [2.2.0]
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
Reference in New Issue
Block a user