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

chore: free pydantic version #6150

Draft
wants to merge 43 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c6f4903
chore: free pydantic version
JoanFM Mar 7, 2024
ecdf2b6
feat: adapt pydantic v2
JoanFM Mar 7, 2024
9000f65
fix: fix inherit config
JoanFM Mar 7, 2024
4cc9e41
fix: hack for LegacyDocument
JoanFM Mar 7, 2024
bbd9b4b
Merge branch 'master' into chore-free-Pydantic-version
JoanFM Mar 8, 2024
5b9d3ca
Merge branch 'master' of https://github.com/jina-ai/jina into chore-f…
JoanFM Feb 25, 2025
d341dff
Merge branch 'master' of https://github.com/jina-ai/jina into chore-f…
JoanFM Feb 25, 2025
676a264
test: update
JoanFM Feb 27, 2025
f259e0a
Merge branch 'master' into chore-free-Pydantic-version
JoanFM Mar 12, 2025
4b65af2
feat: keep with progress
JoanFM Mar 18, 2025
f3df31d
style: fix overload and cli autocomplete
jina-bot Mar 18, 2025
f329acc
test: fix more tests
JoanFM Mar 18, 2025
5636676
Merge branch 'chore-free-Pydantic-version' of https://github.com/jina…
JoanFM Mar 18, 2025
f66b080
fix: further tests
JoanFM Mar 18, 2025
4b8af0c
ci: change cd
JoanFM Mar 18, 2025
5e34394
test: keep fixing test
JoanFM Mar 18, 2025
5991e47
fix: fix test streaming
JoanFM Mar 18, 2025
2afb563
fix: keep docarray v1 tests with pydantic v1
JoanFM Mar 18, 2025
50877eb
ci: cancel jina hub tests
JoanFM Mar 18, 2025
5636123
fix: skip more tests
JoanFM Mar 19, 2025
d06c318
fix: fix docstring
JoanFM Mar 19, 2025
b313148
test: fix more tests
JoanFM Mar 19, 2025
de9d0d7
style: fix overload and cli autocomplete
jina-bot Mar 19, 2025
5f2a3d5
test: fix tests further
JoanFM Mar 19, 2025
55d80ec
style: fix overload and cli autocomplete
jina-bot Mar 19, 2025
1c0a2fc
ci: remove hubtest
JoanFM Mar 19, 2025
4af6b40
Merge branch 'chore-free-Pydantic-version' of https://github.com/jina…
JoanFM Mar 19, 2025
e3542aa
test: fix more tests
JoanFM Mar 19, 2025
a9e315e
ci: fix ci cd prepare
JoanFM Mar 19, 2025
a2b1281
ci: skip tests with specific port
JoanFM Mar 20, 2025
6d7bd95
fix: fix sagemaker csp
JoanFM Mar 20, 2025
1c1a0e6
ci: handle tests
JoanFM Mar 20, 2025
19dd4a8
test: fix csp
JoanFM Mar 20, 2025
54da226
test: try to fix tests
JoanFM Mar 20, 2025
d225aac
test: skip some tests
JoanFM Mar 20, 2025
24c45e5
test: fix more tests
JoanFM Mar 20, 2025
eded430
ci: change timeout
JoanFM Mar 20, 2025
bca969e
test: simplify tests
JoanFM Mar 20, 2025
76b0b71
test: fix errors
JoanFM Mar 20, 2025
10880e9
chore: limit pydantic to v2
JoanFM Mar 21, 2025
96c9be7
ci: small adjustment
JoanFM Mar 21, 2025
c470d9a
ci: fix ci
JoanFM Mar 21, 2025
155e919
ci: fix ci
JoanFM Mar 21, 2025
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
70 changes: 33 additions & 37 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
- run: |
pip install . --no-cache-dir
pip install docarray==0.21.0 # only valid for this version. I think we should remove this schema loading
pip install docarray==1.10.3
JINA_VERSION=$(sed -n '/^__version__/p' ./jina/__init__.py | cut -d \' -f2)-master
echo "JINA_VERSION=${JINA_VERSION}" >> $GITHUB_ENV
cd schema
Expand Down Expand Up @@ -108,6 +109,7 @@ jobs:
matrix:
python-version: ["3.10"]
protobuf-version: ['==3.19.6', '']
pydantic-version: ['==1.10.3', '<3.0.0']
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -118,6 +120,7 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.19.5

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -130,7 +133,8 @@ jobs:
setuptools-golang-build-manylinux-wheels --pythons cp310-cp310
- name: Prepare environment
run: |
docker build -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
# Take into account in the `test-pip` the versions
docker build --build-arg PYDANTIC_VERSION="${{ matrix.pydantic-version }}" -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)
Expand All @@ -140,22 +144,24 @@ jobs:
else
pip install -U protobuf${{ matrix.protobuf-version }} grpcio==1.65.5 grpcio-reflection==1.65.5 grpcio-health-checking==1.65.5
fi
pip install pydantic"${{ matrix.pydantic-version }}"
jina
export JINA_LOG_LEVEL="ERROR"
- name: Test
id: test
run: |
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/unit/serve/runtimes/test_helper.py
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/docarray_v2/test_v2.py
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/deployment_http_composite
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/docarray_v2/test_singleton.py
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/docarray_v2/test_parameters_as_pydantic.py
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/docarray_v2/test_streaming.py
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/docarray_v2/csp
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/docarray_v2/docker
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/docarray_v2/test_v2.py
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/docarray_v2/test_errors.py
echo "flag it as jina for codeoverage"
echo "codecov_flag=jina" >> $GITHUB_OUTPUT
timeout-minutes: 45
timeout-minutes: 60
env:
JINA_AUTH_TOKEN: "${{ secrets.JINA_AUTH_TOKEN }}"
- name: Check codecov file
Expand All @@ -165,13 +171,14 @@ jobs:
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'
if: steps.check_files.outputs.files_exists == 'true' && ${{ matrix.python-version }} == '3.10'
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
Expand All @@ -182,6 +189,7 @@ jobs:
matrix:
python-version: ["3.10"]
protobuf-version: ['==3.19.6', '']
pydantic-version: ['==1.10.3', '<3.0.0']
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -205,7 +213,8 @@ jobs:
setuptools-golang-build-manylinux-wheels --pythons cp310-cp310
- name: Prepare environment
run: |
docker build -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
# Take into account in the `test-pip` the versions
docker build --build-arg PYDANTIC_VERSION="${{ matrix.pydantic-version }}" -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)
Expand All @@ -215,6 +224,7 @@ jobs:
else
pip install -U protobuf${{ matrix.protobuf-version }} grpcio==1.65.5 grpcio-reflection==1.65.5 grpcio-health-checking==1.65.5
fi
pip install pydantic"${{ matrix.pydantic-version }}"
jina
export JINA_LOG_LEVEL="ERROR"
- name: Test stateful
Expand All @@ -233,7 +243,7 @@ jobs:
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'
if: steps.check_files.outputs.files_exists == 'true' && ${{ matrix.python-version }} == '3.10'
with:
file: coverage.xml
name: ${{ matrix.test-path }}-codecov
Expand Down Expand Up @@ -474,12 +484,13 @@ jobs:
setuptools-golang-build-manylinux-wheels --pythons cp310-cp310
- name: Prepare environment
run: |
docker build --build-arg DOCARRAY_VERSION="0.21.0" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
docker build --build-arg DOCARRAY_VERSION="0.21.0" --build-arg PYDANTIC_VERSION="==1.10.3" -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[all]" --no-cache-dir
pip install docarray==0.21.0
pip install pydantic==1.10.3
pip install grpcio==1.65.5 grpcio-reflection==1.65.5 grpcio-health-checking==1.65.5
jina
export JINA_LOG_LEVEL="ERROR"
Expand Down Expand Up @@ -517,7 +528,7 @@ jobs:
matrix:
core: ['', 'true']
perf: ['', 'true']
python-env: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
exclude:
- core: 'true'
perf: 'true'
Expand All @@ -532,6 +543,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install wheel
pip install --no-cache-dir .
pip list
env:
JINA_PIP_INSTALL_CORE: ${{ matrix.core }}
JINA_PIP_INSTALL_PERF: ${{ matrix.perf }}
Expand Down Expand Up @@ -576,28 +588,6 @@ jobs:
- run: |
docker run --platform ${{ matrix.test-arch }} localhost:5000/jina/multiarch:latest -v

hub-test:
needs: update-schema
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.head.repo.fork }}
steps:
# - name: Cancel Previous Runs
# uses: styfle/[email protected]
# with:
# access_token: ${{ github.token }}
- uses: actions/[email protected]
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Test hubapp with hubpods
run: |
./tests/jinahub/test_integration.sh
timeout-minutes: 30
env:
JINAHUB_USERNAME: ${{ secrets.JINAHUB_USERNAME }}
JINAHUB_PASSWORD: ${{ secrets.JINAHUB_PASSWORD }}

k8s-flow-test:
needs: update-schema
runs-on: ubuntu-latest
Expand All @@ -609,11 +599,12 @@ jobs:
python-version: "3.10"
- name: Prepare enviroment
run: |
docker build --build-arg DOCARRAY_VERSION="0.21.0" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
docker build --build-arg DOCARRAY_VERSION="0.21.0" --build-arg PYDANTIC_VERSION="==1.10.3" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
python -m pip install --upgrade pip
python -m pip install wheel
pip install ".[all]" --no-cache-dir
pip install docarray==0.21.0
pip install pydantic==1.10.3
jina
export JINA_LOG_LEVEL="ERROR"
curl -LO https://dl.k8s.io/release/v1.21.1/bin/linux/amd64/kubectl
Expand Down Expand Up @@ -651,11 +642,12 @@ jobs:
python-version: "3.10"
- name: Prepare enviroment
run: |
docker build --build-arg DOCARRAY_VERSION="0.21.0" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
docker build --build-arg DOCARRAY_VERSION="0.21.0" --build-arg PYDANTIC_VERSION="==1.10.3" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
python -m pip install --upgrade pip
python -m pip install wheel
pip install ".[all]" --no-cache-dir
pip install docarray==0.21.0
pip install pydantic==1.10.3
jina
export JINA_LOG_LEVEL="ERROR"
curl -LO https://dl.k8s.io/release/v1.21.1/bin/linux/amd64/kubectl
Expand Down Expand Up @@ -693,11 +685,12 @@ jobs:
python-version: "3.10"
- name: Prepare enviroment
run: |
docker build --build-arg DOCARRAY_VERSION="0.21.0" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
docker build --build-arg DOCARRAY_VERSION="0.21.0" --build-arg PYDANTIC_VERSION="==1.10.3" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
python -m pip install --upgrade pip
python -m pip install wheel
pip install ".[all]" --no-cache-dir
pip install docarray==0.21.0
pip install pydantic==1.10.3
jina
export JINA_LOG_LEVEL="ERROR"
curl -LO https://dl.k8s.io/release/v1.21.1/bin/linux/amd64/kubectl
Expand Down Expand Up @@ -735,11 +728,12 @@ jobs:
python-version: "3.10"
- name: Prepare enviroment
run: |
docker build --build-arg DOCARRAY_VERSION="0.21.0" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
docker build --build-arg DOCARRAY_VERSION="0.21.0" --build-arg PYDANTIC_VERSION="==1.10.3" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
python -m pip install --upgrade pip
python -m pip install wheel
pip install ".[all]" --no-cache-dir
pip install docarray==0.21.0
pip install pydantic==1.10.3
jina
export JINA_LOG_LEVEL="ERROR"
curl -LO https://dl.k8s.io/release/v1.21.1/bin/linux/amd64/kubectl
Expand Down Expand Up @@ -778,11 +772,12 @@ jobs:
python-version: "3.10"
- name: Prepare enviroment
run: |
docker build --build-arg DOCARRAY_VERSION="0.21.0" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
docker build --build-arg DOCARRAY_VERSION="0.21.0" --build-arg PYDANTIC_VERSION="==1.10.3" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
python -m pip install --upgrade pip
python -m pip install wheel
pip install ".[all]" --no-cache-dir
pip install docarray==0.21.0
pip install pydantic==1.10.3
jina
export JINA_LOG_LEVEL="ERROR"
curl -LO https://dl.k8s.io/release/v1.21.1/bin/linux/amd64/kubectl
Expand Down Expand Up @@ -818,11 +813,12 @@ jobs:
python-version: "3.10"
- name: Prepare enviroment
run: |
docker build --build-arg DOCARRAY_VERSION="0.21.0" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
docker build --build-arg DOCARRAY_VERSION="0.21.0" --build-arg PYDANTIC_VERSION="==1.10.3" -f Dockerfiles/test-pip.Dockerfile -t jinaai/jina:test-pip .
python -m pip install --upgrade pip
python -m pip install wheel
pip install ".[all]" --no-cache-dir
pip install docarray==0.21.0
pip install pydantic==1.10.3
jina
export JINA_LOG_LEVEL="ERROR"
env:
Expand Down Expand Up @@ -867,7 +863,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, 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]
needs: [core-test, docarray-v-two-test, stateful-docarray-v-two-test, import-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
Expand Down
Loading
Loading