From 86505c0c92e6e48df1e05ff10ec9be0e9a3b0574 Mon Sep 17 00:00:00 2001 From: Jen Hamon Date: Wed, 21 Feb 2024 16:58:22 -0500 Subject: [PATCH 1/9] Rebase --- .github/workflows/pr.yaml | 2 +- .github/workflows/testing-dependency.yaml | 42 +++++++++++++++------- .github/workflows/testing-integration.yaml | 2 +- .github/workflows/testing-unit.yaml | 1 + poetry.lock | 40 ++++++--------------- pyproject.toml | 18 +++++++--- 6 files changed, 55 insertions(+), 50 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 9880064b3..e48aa2681 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9, '3.10', 3.11] + python-version: [3.8, 3.12] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/testing-dependency.yaml b/.github/workflows/testing-dependency.yaml index 11422efa4..4cccd351c 100644 --- a/.github/workflows/testing-dependency.yaml +++ b/.github/workflows/testing-dependency.yaml @@ -32,7 +32,7 @@ jobs: - 3.8 # - 3.9 # - "3.10" - # - 3.11 + - 3.11 grpcio-version: - 1.44.0 # - 1.46.5 @@ -63,15 +63,12 @@ jobs: - 1.62.0 grpc-gateway-protoc-gen-openapiv2-version: - 0.1.0 - - steps: + steps: &grpc_steps - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Setup Poetry uses: ./.github/actions/setup-poetry with: @@ -85,7 +82,6 @@ jobs: run: poetry add protobuf==${{ matrix.protobuf-version }} - name: Install googleapis-common-protos ${{ matrix.googleapis-common-protos-version }} run: poetry add googleapis-common-protos==${{ matrix.googleapis-common-protos-version }} - - uses: nick-fields/retry@v3 with: timeout_minutes: 5 @@ -96,8 +92,32 @@ jobs: PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} INDEX_NAME: ${{ needs.dependency-matrix-setup.outputs.index_name }} + dependency-matrix-grpc-312: + name: Deps (GRPC) + needs: dependency-matrix-setup + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + fail-fast: false + matrix: + python-version: + - 3.12 + grpcio-version: + - 1.59.3 + - 1.60.0 + lz4-version: + - 3.1.3 + - 4.3.3 + protobuf-version: + - 3.20.3 + googleapis-common-protos-version: + - 1.53.0 + - 1.62.0 + grpc-gateway-protoc-gen-openapiv2-version: + - 0.1.0 - + steps: + *grpc_steps dependency-matrix-rest: name: Deps (REST) @@ -108,15 +128,11 @@ jobs: fail-fast: false matrix: python-version: - - 3.8 - - 3.9 - - '3.10' - - 3.11 + - 3.12 urllib3-version: - - 1.26.0 + - 1.26.5 - 1.26.18 - 2.0.2 - - 2.0.5 - 2.1.0 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/testing-integration.yaml b/.github/workflows/testing-integration.yaml index 16675f0a9..7abd94390 100644 --- a/.github/workflows/testing-integration.yaml +++ b/.github/workflows/testing-integration.yaml @@ -55,7 +55,7 @@ jobs: testConfig: - python-version: 3.8 pod: { environment: 'us-east1-gcp'} - - python-version: 3.11 + - python-version: 3.12 pod: { environment: 'us-east4-gcp'} fail-fast: false steps: diff --git a/.github/workflows/testing-unit.yaml b/.github/workflows/testing-unit.yaml index 156f7e27a..3574b1c2c 100644 --- a/.github/workflows/testing-unit.yaml +++ b/.github/workflows/testing-unit.yaml @@ -13,6 +13,7 @@ jobs: - 3.9 - '3.10' - 3.11 + - 3.12 use_grpc: - true - false diff --git a/poetry.lock b/poetry.lock index 299572a5d..2256d4941 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "astunparse" @@ -15,24 +15,6 @@ files = [ six = ">=1.6.1,<2.0" wheel = ">=0.23.0,<1.0" -[[package]] -name = "attrs" -version = "23.1.0" -description = "Classes Without Boilerplate" -optional = false -python-versions = ">=3.7" -files = [ - {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, - {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, -] - -[package.extras] -cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] -dev = ["attrs[docs,tests]", "pre-commit"] -docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] -tests = ["attrs[tests-no-zope]", "zope-interface"] -tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] - [[package]] name = "certifi" version = "2023.11.17" @@ -828,26 +810,25 @@ plugins = ["importlib-metadata"] [[package]] name = "pytest" -version = "7.2.0" +version = "8.0.0" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"}, - {file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"}, + {file = "pytest-8.0.0-py3-none-any.whl", hash = "sha256:50fb9cbe836c3f20f0dfa99c565201fb75dc54c8d76373cd1bde06b06657bdb6"}, + {file = "pytest-8.0.0.tar.gz", hash = "sha256:249b1b0864530ba251b7438274c4d251c58d868edaaec8762893ad4a0d71c36c"}, ] [package.dependencies] -attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=0.12,<2.0" +pluggy = ">=1.3.0,<2.0" tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" @@ -965,7 +946,6 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -1194,9 +1174,9 @@ files = [ test = ["pytest (>=6.0.0)", "setuptools (>=65)"] [extras] -grpc = ["googleapis-common-protos", "grpc-gateway-protoc-gen-openapiv2", "grpcio", "lz4", "protobuf"] +grpc = ["googleapis-common-protos", "grpc-gateway-protoc-gen-openapiv2", "grpcio", "grpcio", "lz4", "protobuf"] [metadata] lock-version = "2.0" -python-versions = ">=3.8,<3.13" -content-hash = "8d9297dab7ba94a73c8b104338a4c5508535c50645f6f64da888381df51ff99c" +python-versions = "^3.8" +content-hash = "86ee4df93f986b3294a0393718559e29f61e9cab511e2f4d98ee87355964bce6" diff --git a/pyproject.toml b/pyproject.toml index 0a1ba5c6e..4e4315c43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,8 @@ classifiers=[ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Database", "Topic :: Software Development", "Topic :: Software Development :: Libraries", @@ -47,15 +49,21 @@ classifiers=[ ] [tool.poetry.dependencies] -python = ">=3.8,<3.13" +python = "^3.8" typing-extensions = ">=3.7.4" -urllib3 = ">=1.26.0" +urllib3 = [ + { version = ">=1.26.0", python = ">=3.8,<3.12" }, + { version = ">=1.26.5", python = "^3.12" } +] tqdm = ">=4.64.1" # certifi does not follow semver. Should always be # on latest but setting a broad range to have maximum # compatibility with libraries that may pin version. certifi = ">=2019.11.17" -grpcio = { version = ">=1.44.0", optional = true } +grpcio = [ + { version = ">=1.44.0", optional = true, python = "^3.8,<3.12" }, + { version = "^1.59.0", optional = true, python = "^3.12" } +] grpc-gateway-protoc-gen-openapiv2 = { version = "0.1.0", optional = true } googleapis-common-protos = { version = ">=1.53.0", optional = true } lz4 = { version = ">=3.1.3", optional = true } @@ -82,11 +90,11 @@ numpy = [ ] pandas = ">=1.3.5" pdoc = "^14.1.0" -pytest = "7.2.0" +pytest = "8.0.0" pytest-asyncio = "0.15.1" pytest-cov = "2.10.1" pytest-mock = "3.6.1" -pytest-timeout = ">=1.4.2" +pytest-timeout = "2.2.0" urllib3_mock = "0.3.3" responses = ">=0.8.1" From 8cb0ccd68285357eaa8b869bb019be2f8d6d8fc5 Mon Sep 17 00:00:00 2001 From: Jen Hamon Date: Wed, 21 Feb 2024 13:31:49 -0500 Subject: [PATCH 2/9] github actions does not support yaml anchors --- .github/workflows/testing-dependency.yaml | 31 ++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing-dependency.yaml b/.github/workflows/testing-dependency.yaml index 4cccd351c..65b151465 100644 --- a/.github/workflows/testing-dependency.yaml +++ b/.github/workflows/testing-dependency.yaml @@ -63,7 +63,7 @@ jobs: - 1.62.0 grpc-gateway-protoc-gen-openapiv2-version: - 0.1.0 - steps: &grpc_steps + steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -115,9 +115,34 @@ jobs: - 1.62.0 grpc-gateway-protoc-gen-openapiv2-version: - 0.1.0 - steps: - *grpc_steps + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Setup Poetry + uses: ./.github/actions/setup-poetry + with: + include_grpc: true + include_types: false + - name: Install grpcio ${{ matrix.grpcio-version }} + run: poetry add grpcio==${{ matrix.grpcio-version }} + - name: Install lz4 ${{ matrix.lz4-version }} + run: poetry add lz4==${{ matrix.lz4-version }} + - name: Install protobuf ${{ matrix.protobuf-version }} + run: poetry add protobuf==${{ matrix.protobuf-version }} + - name: Install googleapis-common-protos ${{ matrix.googleapis-common-protos-version }} + run: poetry add googleapis-common-protos==${{ matrix.googleapis-common-protos-version }} + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 5 + max_attempts: 3 + retry_on: error + command: poetry run pytest tests/dependency/grpc -s -v + env: + PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} + INDEX_NAME: ${{ needs.dependency-matrix-setup.outputs.index_name }} dependency-matrix-rest: name: Deps (REST) From 070341b4b01e1c6978cf84000feffb0597a5a058 Mon Sep 17 00:00:00 2001 From: Jen Hamon Date: Wed, 21 Feb 2024 13:53:59 -0500 Subject: [PATCH 3/9] Adjust test matrix --- .github/workflows/testing-dependency.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing-dependency.yaml b/.github/workflows/testing-dependency.yaml index 65b151465..cea9ff4fe 100644 --- a/.github/workflows/testing-dependency.yaml +++ b/.github/workflows/testing-dependency.yaml @@ -30,9 +30,8 @@ jobs: matrix: python-version: - 3.8 - # - 3.9 - # - "3.10" - - 3.11 + - 3.9 + - "3.10" grpcio-version: - 1.44.0 # - 1.46.5 @@ -101,6 +100,7 @@ jobs: fail-fast: false matrix: python-version: + - 3.11 - 3.12 grpcio-version: - 1.59.3 From 5a6c5c6af4c85f0bd2884d3f0beb0f5f9b5bae7f Mon Sep 17 00:00:00 2001 From: Jen Hamon Date: Wed, 21 Feb 2024 16:14:09 -0500 Subject: [PATCH 4/9] Add coverage in data plane integration tests --- .github/actions/test-data-plane/action.yaml | 6 ++- .github/workflows/testing-dependency.yaml | 41 ++++++++++++++++++++- .github/workflows/testing-integration.yaml | 7 ++-- poetry.lock | 4 +- pyproject.toml | 4 +- 5 files changed, 52 insertions(+), 10 deletions(-) diff --git a/.github/actions/test-data-plane/action.yaml b/.github/actions/test-data-plane/action.yaml index 964f89271..9fafc0d50 100644 --- a/.github/actions/test-data-plane/action.yaml +++ b/.github/actions/test-data-plane/action.yaml @@ -25,6 +25,10 @@ inputs: PINECONE_API_KEY: description: 'The Pinecone API key' required: true + python_version: + description: 'The version of Python to use' + required: false + default: '3.9' outputs: index_name: @@ -37,7 +41,7 @@ runs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: ${{ inputs.python_version }} - name: Setup Poetry uses: ./.github/actions/setup-poetry diff --git a/.github/workflows/testing-dependency.yaml b/.github/workflows/testing-dependency.yaml index cea9ff4fe..e60626936 100644 --- a/.github/workflows/testing-dependency.yaml +++ b/.github/workflows/testing-dependency.yaml @@ -145,6 +145,45 @@ jobs: INDEX_NAME: ${{ needs.dependency-matrix-setup.outputs.index_name }} dependency-matrix-rest: + name: Deps (REST) + runs-on: ubuntu-latest + needs: dependency-matrix-setup + strategy: + max-parallel: 5 + fail-fast: false + matrix: + python-version: + - 3.8 + - 3.11 + urllib3-version: + - 1.26.0 + - 1.26.18 + - 2.0.2 + - 2.2.1 + steps: + - uses: actions/checkout@v4 + - name: 'Set up Python ${{ matrix.python-version }}' + uses: actions/setup-python@v5 + with: + python-version: '${{ matrix.python-version }}' + - name: Setup Poetry + uses: ./.github/actions/setup-poetry + with: + include_grpc: false + include_types: false + - name: 'Install urllib3 ${{ matrix.urllib3-version }}' + run: 'poetry add urllib3==${{ matrix.urllib3-version }}' + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 5 + max_attempts: 3 + retry_on: error + command: poetry run pytest tests/dependency/rest -s -v + env: + PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}' + INDEX_NAME: '${{ needs.dependency-matrix-setup.outputs.index_name }}' + + dependency-matrix-rest-312: name: Deps (REST) runs-on: ubuntu-latest needs: dependency-matrix-setup @@ -158,7 +197,7 @@ jobs: - 1.26.5 - 1.26.18 - 2.0.2 - - 2.1.0 + - 2.2.1 steps: - uses: actions/checkout@v4 - name: 'Set up Python ${{ matrix.python-version }}' diff --git a/.github/workflows/testing-integration.yaml b/.github/workflows/testing-integration.yaml index 7abd94390..22d37dba3 100644 --- a/.github/workflows/testing-integration.yaml +++ b/.github/workflows/testing-integration.yaml @@ -9,6 +9,7 @@ jobs: strategy: fail-fast: false matrix: + python_version: [3.8, 3.12] use_grpc: [true, false] metric: - cosine @@ -20,6 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/test-data-plane with: + python-version: '${{ matrix.python_version }}' use_grpc: '${{ matrix.use_grpc }}' metric: '${{ matrix.metric }}' spec: '${{ matrix.spec }}' @@ -88,9 +90,6 @@ jobs: DIMENSION: 1536 METRIC: 'cosine' - - - control-rest-serverless: name: control plane serverless runs-on: ubuntu-latest @@ -102,7 +101,7 @@ jobs: - python-version: 3.8 # Do one test run with 3.8 for sanity check pod: { environment: 'us-east1-gcp'} serverless: { cloud: 'aws', region: 'us-west-2'} - - python-version: 3.11 + - python-version: 3.12 pod: { environment: 'us-east1-gcp'} serverless: { cloud: 'aws', region: 'us-west-2'} fail-fast: false diff --git a/poetry.lock b/poetry.lock index 2256d4941..7091afaab 100644 --- a/poetry.lock +++ b/poetry.lock @@ -669,8 +669,8 @@ files = [ [package.dependencies] numpy = [ {version = ">=1.20.3", markers = "python_version < \"3.10\""}, - {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, {version = ">=1.21.0", markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, + {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, ] python-dateutil = ">=2.8.2" pytz = ">=2020.1" @@ -1179,4 +1179,4 @@ grpc = ["googleapis-common-protos", "grpc-gateway-protoc-gen-openapiv2", "grpcio [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "86ee4df93f986b3294a0393718559e29f61e9cab511e2f4d98ee87355964bce6" +content-hash = "5ed8ae420a559ebdacd7b2ec758a8ecea3eebb8980f4289018235a7ac74ebd29" diff --git a/pyproject.toml b/pyproject.toml index 4e4315c43..c38307440 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,8 +61,8 @@ tqdm = ">=4.64.1" # compatibility with libraries that may pin version. certifi = ">=2019.11.17" grpcio = [ - { version = ">=1.44.0", optional = true, python = "^3.8,<3.12" }, - { version = "^1.59.0", optional = true, python = "^3.12" } + { version = ">=1.44.0", optional = true, python = "^3.8,<3.11" }, + { version = "^1.59.0", optional = true, python = "^3.11" } ] grpc-gateway-protoc-gen-openapiv2 = { version = "0.1.0", optional = true } googleapis-common-protos = { version = ">=1.53.0", optional = true } From 31586c3ff4f1e334cadd9a2942ff78d1f62508fe Mon Sep 17 00:00:00 2001 From: Jen Hamon Date: Wed, 21 Feb 2024 17:03:03 -0500 Subject: [PATCH 5/9] Fix typo in CI config --- .github/workflows/testing-integration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing-integration.yaml b/.github/workflows/testing-integration.yaml index 22d37dba3..ee07e42f8 100644 --- a/.github/workflows/testing-integration.yaml +++ b/.github/workflows/testing-integration.yaml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/test-data-plane with: - python-version: '${{ matrix.python_version }}' + python_version: '${{ matrix.python_version }}' use_grpc: '${{ matrix.use_grpc }}' metric: '${{ matrix.metric }}' spec: '${{ matrix.spec }}' From 9f35aefb39e9aa59e071d2c043a04ca44b66d9d2 Mon Sep 17 00:00:00 2001 From: Jen Hamon Date: Wed, 21 Feb 2024 17:36:44 -0500 Subject: [PATCH 6/9] Move dependency testing into reusable actions --- .../actions/test-dependency-grpc/action.yaml | 66 ++++++++ .../actions/test-dependency-rest/action.yaml | 45 ++++++ .github/workflows/testing-dependency.yaml | 144 +++++------------- 3 files changed, 152 insertions(+), 103 deletions(-) create mode 100644 .github/actions/test-dependency-grpc/action.yaml create mode 100644 .github/actions/test-dependency-rest/action.yaml diff --git a/.github/actions/test-dependency-grpc/action.yaml b/.github/actions/test-dependency-grpc/action.yaml new file mode 100644 index 000000000..ac9c9cef6 --- /dev/null +++ b/.github/actions/test-dependency-grpc/action.yaml @@ -0,0 +1,66 @@ +name: 'Test GRPC Dependencies' +description: 'Runs sanity test with specific gRPC dependencies' + +inputs: + PINECONE_API_KEY: + description: 'The Pinecone API key' + required: true + index_name: + description: 'The name of the index' + required: true + python_version: + description: 'The version of Python to use' + required: false + default: '3.9' + grpcio_version: + description: 'The version of grpcio to install' + required: true + lz4_version: + description: 'The version of lz4 to install' + required: true + protobuf_version: + description: 'The version of protobuf to install' + required: true + googleapis_common_protos_version: + description: 'The version of googleapis-common-protos to install' + required: true + +runs: + using: 'composite' + steps: + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python_version }} + + - name: Setup Poetry + uses: ./.github/actions/setup-poetry + with: + include_grpc: true + include_types: false + + - name: Install grpcio ${{ inputs.grpcio_version }} + run: poetry add grpcio==${{ inputs.grpcio_version }} + shell: bash + + - name: Install lz4 ${{ inputs.lz4_version }} + run: poetry add lz4==${{ inputs.lz4_version }} + shell: bash + + - name: Install protobuf ${{ inputs.protobuf_version }} + run: poetry add protobuf==${{ inputs.protobuf_version }} + shell: bash + + - name: Install googleapis-common-protos ${{ inputs.googleapis_common_protos_version }} + run: poetry add googleapis-common-protos==${{ inputs.googleapis_common_protos_version }} + shell: bash + + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 5 + max_attempts: 3 + retry_on: error + command: poetry run pytest tests/dependency/grpc -s -v + env: + PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} + INDEX_NAME: ${{ inputs.index_name }} \ No newline at end of file diff --git a/.github/actions/test-dependency-rest/action.yaml b/.github/actions/test-dependency-rest/action.yaml new file mode 100644 index 000000000..77552e035 --- /dev/null +++ b/.github/actions/test-dependency-rest/action.yaml @@ -0,0 +1,45 @@ +name: 'Test REST Dependencies' +description: 'Runs sanity test with specific REST dependencies' + +inputs: + PINECONE_API_KEY: + description: 'The Pinecone API key' + required: true + index_name: + description: 'The name of the index' + required: true + python_version: + description: 'The version of Python to use' + required: false + default: '3.9' + urllib3_version: + description: 'The version of urllib3 to install' + required: true + +runs: + using: 'composite' + steps: + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python_version }} + + - name: Setup Poetry + uses: ./.github/actions/setup-poetry + with: + include_grpc: false + include_types: false + + - name: 'Install urllib3 ${{ matrix.urllib3-version }}' + run: 'poetry add urllib3==${{ matrix.urllib3-version }}' + shell: bash + + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 5 + max_attempts: 3 + retry_on: error + command: poetry run pytest tests/dependency/rest -s -v + env: + PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}' + INDEX_NAME: '${{ inputs.index_name }}' \ No newline at end of file diff --git a/.github/workflows/testing-dependency.yaml b/.github/workflows/testing-dependency.yaml index e60626936..a43a476a4 100644 --- a/.github/workflows/testing-dependency.yaml +++ b/.github/workflows/testing-dependency.yaml @@ -28,11 +28,11 @@ jobs: max-parallel: 5 fail-fast: false matrix: - python-version: + python_version: - 3.8 - 3.9 - "3.10" - grpcio-version: + grpcio_version: - 1.44.0 # - 1.46.5 # - 1.47.5 @@ -48,48 +48,31 @@ jobs: # - 1.58.0 # - 1.59.3 - 1.60.0 - lz4-version: + lz4_version: - 3.1.3 # - 3.1.10 - 4.0.0 # - 4.0.1 # - 4.1.0 - 4.3.3 - protobuf-version: + protobuf_version: - 3.20.3 - googleapis-common-protos-version: + googleapis_common_protos_version: - 1.53.0 - 1.62.0 - grpc-gateway-protoc-gen-openapiv2-version: + grpc_gateway_protoc_gen_openapiv2_version: - 0.1.0 steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - uses: ./.github/actions/test-data-plane with: - python-version: ${{ matrix.python-version }} - - name: Setup Poetry - uses: ./.github/actions/setup-poetry - with: - include_grpc: true - include_types: false - - name: Install grpcio ${{ matrix.grpcio-version }} - run: poetry add grpcio==${{ matrix.grpcio-version }} - - name: Install lz4 ${{ matrix.lz4-version }} - run: poetry add lz4==${{ matrix.lz4-version }} - - name: Install protobuf ${{ matrix.protobuf-version }} - run: poetry add protobuf==${{ matrix.protobuf-version }} - - name: Install googleapis-common-protos ${{ matrix.googleapis-common-protos-version }} - run: poetry add googleapis-common-protos==${{ matrix.googleapis-common-protos-version }} - - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 3 - retry_on: error - command: poetry run pytest tests/dependency/grpc -s -v - env: - PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} - INDEX_NAME: ${{ needs.dependency-matrix-setup.outputs.index_name }} + python_version: '${{ matrix.python_version }}' + index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}' + PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}' + grpcio_version: '${{ matrix.grpcio_version }}' + lz4_version: '${{ matrix.lz4_version }}' + protobuf_version: '${{ matrix.protobuf_version }}' + googleapis_common_protos_version: '${{ matrix.googleapis_common_protos_version }}' dependency-matrix-grpc-312: name: Deps (GRPC) @@ -99,50 +82,33 @@ jobs: max-parallel: 5 fail-fast: false matrix: - python-version: + python_version: - 3.11 - 3.12 - grpcio-version: + grpcio_version: - 1.59.3 - 1.60.0 - lz4-version: + lz4_version: - 3.1.3 - 4.3.3 - protobuf-version: + protobuf_version: - 3.20.3 - googleapis-common-protos-version: + googleapis_common_protos_version: - 1.53.0 - 1.62.0 - grpc-gateway-protoc-gen-openapiv2-version: + grpc_gateway_protoc_gen_openapiv2_version: - 0.1.0 steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Setup Poetry - uses: ./.github/actions/setup-poetry - with: - include_grpc: true - include_types: false - - name: Install grpcio ${{ matrix.grpcio-version }} - run: poetry add grpcio==${{ matrix.grpcio-version }} - - name: Install lz4 ${{ matrix.lz4-version }} - run: poetry add lz4==${{ matrix.lz4-version }} - - name: Install protobuf ${{ matrix.protobuf-version }} - run: poetry add protobuf==${{ matrix.protobuf-version }} - - name: Install googleapis-common-protos ${{ matrix.googleapis-common-protos-version }} - run: poetry add googleapis-common-protos==${{ matrix.googleapis-common-protos-version }} - - uses: nick-fields/retry@v3 + - uses: ./.github/actions/test-data-plane with: - timeout_minutes: 5 - max_attempts: 3 - retry_on: error - command: poetry run pytest tests/dependency/grpc -s -v - env: - PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} - INDEX_NAME: ${{ needs.dependency-matrix-setup.outputs.index_name }} + python_version: '${{ matrix.python_version }}' + index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}' + PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}' + grpcio_version: '${{ matrix.grpcio_version }}' + lz4_version: '${{ matrix.lz4_version }}' + protobuf_version: '${{ matrix.protobuf_version }}' + googleapis_common_protos_version: '${{ matrix.googleapis_common_protos_version }}' dependency-matrix-rest: name: Deps (REST) @@ -152,37 +118,23 @@ jobs: max-parallel: 5 fail-fast: false matrix: - python-version: + python_version: - 3.8 - 3.11 - urllib3-version: + urllib3_version: - 1.26.0 - 1.26.18 - 2.0.2 - 2.2.1 steps: - uses: actions/checkout@v4 - - name: 'Set up Python ${{ matrix.python-version }}' - uses: actions/setup-python@v5 - with: - python-version: '${{ matrix.python-version }}' - - name: Setup Poetry - uses: ./.github/actions/setup-poetry + - uses: ./.github/actions/test-data-plane with: - include_grpc: false - include_types: false - - name: 'Install urllib3 ${{ matrix.urllib3-version }}' - run: 'poetry add urllib3==${{ matrix.urllib3-version }}' - - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 3 - retry_on: error - command: poetry run pytest tests/dependency/rest -s -v - env: + python_version: '${{ matrix.python_version }}' + index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}' PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}' - INDEX_NAME: '${{ needs.dependency-matrix-setup.outputs.index_name }}' - + urllib3_version: '${{ matrix.urllib3_version }}' + dependency-matrix-rest-312: name: Deps (REST) runs-on: ubuntu-latest @@ -191,32 +143,18 @@ jobs: max-parallel: 5 fail-fast: false matrix: - python-version: + python_version: - 3.12 - urllib3-version: + urllib3_version: - 1.26.5 - 1.26.18 - 2.0.2 - 2.2.1 steps: - uses: actions/checkout@v4 - - name: 'Set up Python ${{ matrix.python-version }}' - uses: actions/setup-python@v5 - with: - python-version: '${{ matrix.python-version }}' - - name: Setup Poetry - uses: ./.github/actions/setup-poetry - with: - include_grpc: false - include_types: false - - name: 'Install urllib3 ${{ matrix.urllib3-version }}' - run: 'poetry add urllib3==${{ matrix.urllib3-version }}' - - uses: nick-fields/retry@v3 + - uses: ./.github/actions/test-data-plane with: - timeout_minutes: 5 - max_attempts: 3 - retry_on: error - command: poetry run pytest tests/dependency/rest -s -v - env: + python_version: '${{ matrix.python_version }}' + index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}' PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}' - INDEX_NAME: '${{ needs.dependency-matrix-setup.outputs.index_name }}' + urllib3_version: '${{ matrix.urllib3_version }}' From 2fd02392f393d2e513ee75296a24933be8b42539 Mon Sep 17 00:00:00 2001 From: Jen Hamon Date: Wed, 21 Feb 2024 17:45:53 -0500 Subject: [PATCH 7/9] Fix typo in CI config --- .github/workflows/testing-dependency.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing-dependency.yaml b/.github/workflows/testing-dependency.yaml index a43a476a4..fb6383913 100644 --- a/.github/workflows/testing-dependency.yaml +++ b/.github/workflows/testing-dependency.yaml @@ -64,7 +64,7 @@ jobs: - 0.1.0 steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/test-data-plane + - uses: ./.github/actions/test-dependency-grpc with: python_version: '${{ matrix.python_version }}' index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}' @@ -100,7 +100,7 @@ jobs: - 0.1.0 steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/test-data-plane + - uses: ./.github/actions/test-dependency-grpc with: python_version: '${{ matrix.python_version }}' index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}' @@ -128,7 +128,7 @@ jobs: - 2.2.1 steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/test-data-plane + - uses: ./.github/actions/test-dependency-rest with: python_version: '${{ matrix.python_version }}' index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}' @@ -152,7 +152,7 @@ jobs: - 2.2.1 steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/test-data-plane + - uses: ./.github/actions/test-dependency-rest with: python_version: '${{ matrix.python_version }}' index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}' From acfd66cbbe06a3e9e67eebc9d80e09e1c3676339 Mon Sep 17 00:00:00 2001 From: Jen Hamon Date: Wed, 21 Feb 2024 18:05:39 -0500 Subject: [PATCH 8/9] Fix typo in dep test action --- .github/actions/test-dependency-grpc/action.yaml | 2 +- .github/actions/test-dependency-rest/action.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/test-dependency-grpc/action.yaml b/.github/actions/test-dependency-grpc/action.yaml index ac9c9cef6..66dab01ba 100644 --- a/.github/actions/test-dependency-grpc/action.yaml +++ b/.github/actions/test-dependency-grpc/action.yaml @@ -62,5 +62,5 @@ runs: retry_on: error command: poetry run pytest tests/dependency/grpc -s -v env: - PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} + PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }} INDEX_NAME: ${{ inputs.index_name }} \ No newline at end of file diff --git a/.github/actions/test-dependency-rest/action.yaml b/.github/actions/test-dependency-rest/action.yaml index 77552e035..5321b2dbe 100644 --- a/.github/actions/test-dependency-rest/action.yaml +++ b/.github/actions/test-dependency-rest/action.yaml @@ -41,5 +41,5 @@ runs: retry_on: error command: poetry run pytest tests/dependency/rest -s -v env: - PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}' + PINECONE_API_KEY: '${{ inputs.PINECONE_API_KEY }}' INDEX_NAME: '${{ inputs.index_name }}' \ No newline at end of file From 97286a448e768b4b87915842df9fa1eb18ae4606 Mon Sep 17 00:00:00 2001 From: Jen Hamon Date: Wed, 21 Feb 2024 18:17:37 -0500 Subject: [PATCH 9/9] Update package metadata --- .github/workflows/testing-dependency.yaml | 8 ++++---- poetry.lock | 2 +- pyproject.toml | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/testing-dependency.yaml b/.github/workflows/testing-dependency.yaml index fb6383913..5ba301067 100644 --- a/.github/workflows/testing-dependency.yaml +++ b/.github/workflows/testing-dependency.yaml @@ -25,7 +25,7 @@ jobs: needs: dependency-matrix-setup runs-on: ubuntu-latest strategy: - max-parallel: 5 + max-parallel: 10 fail-fast: false matrix: python_version: @@ -79,7 +79,7 @@ jobs: needs: dependency-matrix-setup runs-on: ubuntu-latest strategy: - max-parallel: 5 + max-parallel: 10 fail-fast: false matrix: python_version: @@ -115,7 +115,7 @@ jobs: runs-on: ubuntu-latest needs: dependency-matrix-setup strategy: - max-parallel: 5 + max-parallel: 10 fail-fast: false matrix: python_version: @@ -140,7 +140,7 @@ jobs: runs-on: ubuntu-latest needs: dependency-matrix-setup strategy: - max-parallel: 5 + max-parallel: 10 fail-fast: false matrix: python_version: diff --git a/poetry.lock b/poetry.lock index 7091afaab..eb295655a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1179,4 +1179,4 @@ grpc = ["googleapis-common-protos", "grpc-gateway-protoc-gen-openapiv2", "grpcio [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "5ed8ae420a559ebdacd7b2ec758a8ecea3eebb8980f4289018235a7ac74ebd29" +content-hash = "3f9d76204d6753bdba849cc43cc9827e021e3cbdca7328cc9f411bb6133c6091" diff --git a/pyproject.toml b/pyproject.toml index c38307440..03e96f6d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,6 @@ classifiers=[ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", "Topic :: Database", "Topic :: Software Development", "Topic :: Software Development :: Libraries", @@ -62,7 +61,7 @@ tqdm = ">=4.64.1" certifi = ">=2019.11.17" grpcio = [ { version = ">=1.44.0", optional = true, python = "^3.8,<3.11" }, - { version = "^1.59.0", optional = true, python = "^3.11" } + { version = ">=1.59.0", optional = true, python = "^3.11" } ] grpc-gateway-protoc-gen-openapiv2 = { version = "0.1.0", optional = true } googleapis-common-protos = { version = ">=1.53.0", optional = true }