-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use new grpc version (#6110)
Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Joan Fontanals Martinez <[email protected]> Signed-off-by: Joan Martinez <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jina Dev Bot <[email protected]> Co-authored-by: Joan Fontanals Martinez <[email protected]>
- Loading branch information
1 parent
8a1e6b0
commit ae399ad
Showing
31 changed files
with
874 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
python-version: [3.8] | ||
protobuf-version: ['==3.19.6', ''] | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up Python ${{ matrix.python-version }} | ||
|
@@ -134,7 +135,11 @@ jobs: | |
python -m pip install wheel | ||
WHEEL_FILE=$(ls dist/*whl) | ||
pip install "$WHEEL_FILE[common,devel,test]" --no-cache-dir | ||
pip install -U protobuf${{ matrix.protobuf-version }} | ||
if [[ "${{ matrix.protobuf-version }}" == "==3.19.6" ]]; then | ||
pip install -U protobuf${{ matrix.protobuf-version }} grpcio==1.47.5 grpcio-reflection==1.47.5 grpcio-health-checking==1.47.5 | ||
else | ||
pip install -U protobuf${{ matrix.protobuf-version }} | ||
fi | ||
jina | ||
export JINA_LOG_LEVEL="ERROR" | ||
- name: Test | ||
|
@@ -153,10 +158,69 @@ jobs: | |
timeout-minutes: 45 | ||
env: | ||
JINA_AUTH_TOKEN: "${{ secrets.JINA_AUTH_TOKEN }}" | ||
- name: Check codecov file | ||
id: check_files | ||
uses: andstor/file-existence-action@v1 | ||
with: | ||
files: "coverage.xml" | ||
- name: Upload coverage from test to Codecov | ||
uses: codecov/[email protected] | ||
if: steps.check_files.outputs.files_exists == 'true' && ${{ matrix.python-version }} == '3.8' | ||
with: | ||
file: coverage.xml | ||
name: ${{ matrix.test-path }}-codecov | ||
flags: ${{ steps.test.outputs.codecov_flag }} | ||
fail_ci_if_error: false | ||
|
||
stateful-docarray-v-two-test: | ||
needs: prep-testbed | ||
runs-on: ubuntu-latest | ||
env: | ||
JINA_RANDOM_PORT_MIN: 16384 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.8] | ||
protobuf-version: ['==3.19.6', ''] | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set up Golang | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19.5 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
pip install git+https://github.com/jina-ai/setuptools-golang.git@feat-align-with-alaeddine-code | ||
pip install cibuildwheel | ||
- name: Build wheels with setuptools-golang-build-manylinux-wheel | ||
run: | | ||
setuptools-golang-build-manylinux-wheels --pythons cp38-cp38 | ||
- name: Prepare environment | ||
run: | | ||
docker build -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip . | ||
python -m pip install --upgrade pip | ||
python -m pip install wheel | ||
WHEEL_FILE=$(ls dist/*whl) | ||
pip install "$WHEEL_FILE[common,devel,test]" --no-cache-dir | ||
if [[ "${{ matrix.protobuf-version }}" == "==3.19.6" ]]; then | ||
pip install -U protobuf${{ matrix.protobuf-version }} grpcio==1.47.5 grpcio-reflection==1.47.5 grpcio-health-checking==1.47.5 | ||
else | ||
pip install -U protobuf${{ matrix.protobuf-version }} | ||
fi | ||
jina | ||
export JINA_LOG_LEVEL="ERROR" | ||
- name: Test stateful | ||
id: test_stateful | ||
run: | | ||
JINA_LOG_LEVEL=DEBUG JINA_RANDOM_PORT_MAX="60535" pytest --suppress-no-test-exit-code --force-flaky --min-passes 1 --max-runs 5 --cov=jina --cov-report=xml --timeout=600 -v -s --ignore-glob='tests/integration/hub_usage/dummyhub*' tests/integration/stateful | ||
JINA_LOG_LEVEL=DEBUG JINA_RANDOM_PORT_MAX="60535" pytest --suppress-no-test-exit-code --maxfail 1 --force-flaky --min-passes 1 --max-runs 5 --cov=jina --cov-report=xml --timeout=600 -v -s --ignore-glob='tests/integration/hub_usage/dummyhub*' tests/integration/stateful | ||
echo "flag it as jina for codeoverage" | ||
echo "codecov_flag=jina" >> $GITHUB_OUTPUT | ||
timeout-minutes: 30 | ||
|
@@ -811,7 +875,7 @@ jobs: | |
# just for blocking the merge until all parallel core-test are successful | ||
success-all-steps: | ||
runs-on: ubuntu-latest | ||
needs: [core-test, docarray-v-two-test, import-test, hub-test, k8s-flow-test, k8s-deployment-test, k8s-graceful-test, k8s-failures-test, k8s-otel-test, docker-compose-test, docker-image-test, benchmark-pre-release, update-schema, update-docker] #, pre-release] | ||
needs: [core-test, docarray-v-two-test, stateful-docarray-v-two-test, import-test, hub-test, k8s-flow-test, k8s-deployment-test, k8s-graceful-test, k8s-failures-test, k8s-otel-test, docker-compose-test, docker-image-test, benchmark-pre-release, update-schema, update-docker] #, pre-release] | ||
if: always() | ||
steps: | ||
- uses: technote-space/workflow-conclusion-action@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,9 +31,9 @@ jobs: | |
run: | | ||
pip install flake8 | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude .git,__pycache__,docs/source/conf.py,old,build,dist,tests/,jina/resources/,jina/proto/docarray_v1,jina/proto/docarray_v2 | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude .git,__pycache__,docs/source/conf.py,old,build,dist,tests/,jina/resources/,jina/proto/docarray_v1,jina/proto/docarray_v2,jina/serve/consensus/add_voter/pb,jina/serve/consensus/add_voter/pb2 | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude .git,__pycache__,docs/source/conf.py,old,build,dist,tests/,jina/proto/docarray_v1,jina/proto/docarray_v2 | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude .git,__pycache__,docs/source/conf.py,old,build,dist,tests/,jina/proto/docarray_v1,jina/proto/docarray_v2,jina/serve/consensus/add_voter/pb,jina/serve/consensus/add_voter/pb2 | ||
check-docstring: | ||
runs-on: ubuntu-latest | ||
|
@@ -469,7 +469,11 @@ jobs: | |
python -m pip install wheel | ||
WHEEL_FILE=$(ls dist/*whl) | ||
pip install "$WHEEL_FILE[common,devel,test]" --no-cache-dir | ||
pip install -U protobuf${{ matrix.protobuf-version }} | ||
if [[ "${{ matrix.protobuf-version }}" == "==3.19.6" ]]; then | ||
pip install -U protobuf${{ matrix.protobuf-version }} grpcio==1.47.5 grpcio-reflection==1.47.5 grpcio-health-checking==1.47.5 | ||
else | ||
pip install -U protobuf${{ matrix.protobuf-version }} | ||
fi | ||
jina | ||
export JINA_LOG_LEVEL="ERROR" | ||
- name: Test | ||
|
@@ -488,10 +492,70 @@ jobs: | |
timeout-minutes: 45 | ||
env: | ||
JINA_AUTH_TOKEN: "${{ secrets.JINA_AUTH_TOKEN }}" | ||
- name: Check codecov file | ||
id: check_files | ||
uses: andstor/file-existence-action@v1 | ||
with: | ||
files: "coverage.xml" | ||
- name: Upload coverage from test to Codecov | ||
uses: codecov/[email protected] | ||
if: steps.check_files.outputs.files_exists == 'true' && ${{ matrix.python-version }} == '3.8' | ||
with: | ||
file: coverage.xml | ||
name: ${{ matrix.test-path }}-codecov | ||
flags: ${{ steps.test.outputs.codecov_flag }} | ||
fail_ci_if_error: false | ||
|
||
|
||
stateful-docarray-v-two-test: | ||
needs: prep-testbed | ||
runs-on: ubuntu-latest | ||
env: | ||
JINA_RANDOM_PORT_MIN: 16384 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.8] | ||
protobuf-version: ['==3.19.6', ''] | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set up Golang | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19.5 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
pip install git+https://github.com/jina-ai/setuptools-golang.git@feat-align-with-alaeddine-code | ||
pip install cibuildwheel | ||
- name: Build wheels with setuptools-golang-build-manylinux-wheel | ||
run: | | ||
setuptools-golang-build-manylinux-wheels --pythons cp38-cp38 | ||
- name: Prepare environment | ||
run: | | ||
docker build -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip . | ||
python -m pip install --upgrade pip | ||
python -m pip install wheel | ||
WHEEL_FILE=$(ls dist/*whl) | ||
pip install "$WHEEL_FILE[common,devel,test]" --no-cache-dir | ||
if [[ "${{ matrix.protobuf-version }}" == "==3.19.6" ]]; then | ||
pip install -U protobuf${{ matrix.protobuf-version }} grpcio==1.47.5 grpcio-reflection==1.47.5 grpcio-health-checking==1.47.5 | ||
else | ||
pip install -U protobuf${{ matrix.protobuf-version }} | ||
fi | ||
jina | ||
export JINA_LOG_LEVEL="ERROR" | ||
- name: Test stateful | ||
id: test_stateful | ||
run: | | ||
JINA_LOG_LEVEL=DEBUG JINA_RANDOM_PORT_MAX="60535" pytest --suppress-no-test-exit-code --force-flaky --min-passes 1 --max-runs 5 --cov=jina --cov-report=xml --timeout=600 -v -s --ignore-glob='tests/integration/hub_usage/dummyhub*' tests/integration/stateful | ||
JINA_LOG_LEVEL=DEBUG JINA_RANDOM_PORT_MAX="60535" pytest --suppress-no-test-exit-code --maxfail 1 --force-flaky --min-passes 1 --max-runs 5 --cov=jina --cov-report=xml --timeout=600 -v -s --ignore-glob='tests/integration/hub_usage/dummyhub*' tests/integration/stateful | ||
echo "flag it as jina for codeoverage" | ||
echo "codecov_flag=jina" >> $GITHUB_OUTPUT | ||
timeout-minutes: 30 | ||
|
@@ -772,7 +836,7 @@ jobs: | |
# just for blocking the merge until all parallel core-test are successful | ||
success-all-test: | ||
runs-on: ubuntu-latest | ||
needs: [commit-lint, core-test, docarray-v-two-test, import-test, hub-test, k8s-flow-test, k8s-deployment-test, k8s-graceful-test, k8s-failures-test, k8s-otel-test, docker-compose-test, docker-image-test, check-docstring, check-black, code-injection, build-wheels] | ||
needs: [commit-lint, core-test, docarray-v-two-test, stateful-docarray-v-two-test, import-test, hub-test, k8s-flow-test, k8s-deployment-test, k8s-graceful-test, k8s-failures-test, k8s-otel-test, docker-compose-test, docker-image-test, check-docstring, check-black, code-injection, build-wheels] | ||
|
||
if: always() | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.