Skip to content

Commit 0d3cc45

Browse files
authored
Adjust supported python versions to ^3.8 (pinecone-io#312)
## Problem Extend test coverage for python 3.11 and 3.12. Adjust pyproject.toml python dependency to `^3.8` to ease some installation problems in projects which depend on us. ## Solution Tweak test matrix to add coverage for 3.11 and 3.12. Adjust pyproject.toml to reflect specific version deps for grpcio and urllib3. ## Type of Change - [x] New feature (non-breaking change which adds functionality) - [x] Infrastructure change (CI configs, etc) ## Test Plan Describe specific steps for validating this change.
1 parent 17b33e7 commit 0d3cc45

File tree

9 files changed

+227
-107
lines changed

9 files changed

+227
-107
lines changed

.github/actions/test-data-plane/action.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ inputs:
2525
PINECONE_API_KEY:
2626
description: 'The Pinecone API key'
2727
required: true
28+
python_version:
29+
description: 'The version of Python to use'
30+
required: false
31+
default: '3.9'
2832

2933
outputs:
3034
index_name:
@@ -37,7 +41,7 @@ runs:
3741
- name: Set up Python
3842
uses: actions/setup-python@v5
3943
with:
40-
python-version: 3.9
44+
python-version: ${{ inputs.python_version }}
4145

4246
- name: Setup Poetry
4347
uses: ./.github/actions/setup-poetry
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: 'Test GRPC Dependencies'
2+
description: 'Runs sanity test with specific gRPC dependencies'
3+
4+
inputs:
5+
PINECONE_API_KEY:
6+
description: 'The Pinecone API key'
7+
required: true
8+
index_name:
9+
description: 'The name of the index'
10+
required: true
11+
python_version:
12+
description: 'The version of Python to use'
13+
required: false
14+
default: '3.9'
15+
grpcio_version:
16+
description: 'The version of grpcio to install'
17+
required: true
18+
lz4_version:
19+
description: 'The version of lz4 to install'
20+
required: true
21+
protobuf_version:
22+
description: 'The version of protobuf to install'
23+
required: true
24+
googleapis_common_protos_version:
25+
description: 'The version of googleapis-common-protos to install'
26+
required: true
27+
28+
runs:
29+
using: 'composite'
30+
steps:
31+
- name: Set up Python
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: ${{ inputs.python_version }}
35+
36+
- name: Setup Poetry
37+
uses: ./.github/actions/setup-poetry
38+
with:
39+
include_grpc: true
40+
include_types: false
41+
42+
- name: Install grpcio ${{ inputs.grpcio_version }}
43+
run: poetry add grpcio==${{ inputs.grpcio_version }}
44+
shell: bash
45+
46+
- name: Install lz4 ${{ inputs.lz4_version }}
47+
run: poetry add lz4==${{ inputs.lz4_version }}
48+
shell: bash
49+
50+
- name: Install protobuf ${{ inputs.protobuf_version }}
51+
run: poetry add protobuf==${{ inputs.protobuf_version }}
52+
shell: bash
53+
54+
- name: Install googleapis-common-protos ${{ inputs.googleapis_common_protos_version }}
55+
run: poetry add googleapis-common-protos==${{ inputs.googleapis_common_protos_version }}
56+
shell: bash
57+
58+
- uses: nick-fields/retry@v3
59+
with:
60+
timeout_minutes: 5
61+
max_attempts: 3
62+
retry_on: error
63+
command: poetry run pytest tests/dependency/grpc -s -v
64+
env:
65+
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
66+
INDEX_NAME: ${{ inputs.index_name }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: 'Test REST Dependencies'
2+
description: 'Runs sanity test with specific REST dependencies'
3+
4+
inputs:
5+
PINECONE_API_KEY:
6+
description: 'The Pinecone API key'
7+
required: true
8+
index_name:
9+
description: 'The name of the index'
10+
required: true
11+
python_version:
12+
description: 'The version of Python to use'
13+
required: false
14+
default: '3.9'
15+
urllib3_version:
16+
description: 'The version of urllib3 to install'
17+
required: true
18+
19+
runs:
20+
using: 'composite'
21+
steps:
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ inputs.python_version }}
26+
27+
- name: Setup Poetry
28+
uses: ./.github/actions/setup-poetry
29+
with:
30+
include_grpc: false
31+
include_types: false
32+
33+
- name: 'Install urllib3 ${{ matrix.urllib3-version }}'
34+
run: 'poetry add urllib3==${{ matrix.urllib3-version }}'
35+
shell: bash
36+
37+
- uses: nick-fields/retry@v3
38+
with:
39+
timeout_minutes: 5
40+
max_attempts: 3
41+
retry_on: error
42+
command: poetry run pytest tests/dependency/rest -s -v
43+
env:
44+
PINECONE_API_KEY: '${{ inputs.PINECONE_API_KEY }}'
45+
INDEX_NAME: '${{ inputs.index_name }}'

.github/workflows/pr.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
python-version: [3.8, 3.9, '3.10', 3.11]
25+
python-version: [3.8, 3.12]
2626
steps:
2727
- uses: actions/checkout@v4
2828
- name: Set up Python ${{ matrix.python-version }}

.github/workflows/testing-dependency.yaml

+82-64
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@ jobs:
2525
needs: dependency-matrix-setup
2626
runs-on: ubuntu-latest
2727
strategy:
28-
max-parallel: 5
28+
max-parallel: 10
2929
fail-fast: false
3030
matrix:
31-
python-version:
31+
python_version:
3232
- 3.8
33-
# - 3.9
34-
# - "3.10"
35-
# - 3.11
36-
grpcio-version:
33+
- 3.9
34+
- "3.10"
35+
grpcio_version:
3736
- 1.44.0
3837
# - 1.46.5
3938
# - 1.47.5
@@ -49,94 +48,113 @@ jobs:
4948
# - 1.58.0
5049
# - 1.59.3
5150
- 1.60.0
52-
lz4-version:
51+
lz4_version:
5352
- 3.1.3
5453
# - 3.1.10
5554
- 4.0.0
5655
# - 4.0.1
5756
# - 4.1.0
5857
- 4.3.3
59-
protobuf-version:
58+
protobuf_version:
6059
- 3.20.3
61-
googleapis-common-protos-version:
60+
googleapis_common_protos_version:
6261
- 1.53.0
6362
- 1.62.0
64-
grpc-gateway-protoc-gen-openapiv2-version:
63+
grpc_gateway_protoc_gen_openapiv2_version:
6564
- 0.1.0
66-
6765
steps:
6866
- uses: actions/checkout@v4
69-
70-
- name: Set up Python ${{ matrix.python-version }}
71-
uses: actions/setup-python@v5
72-
with:
73-
python-version: ${{ matrix.python-version }}
74-
75-
- name: Setup Poetry
76-
uses: ./.github/actions/setup-poetry
67+
- uses: ./.github/actions/test-dependency-grpc
7768
with:
78-
include_grpc: true
79-
include_types: false
80-
- name: Install grpcio ${{ matrix.grpcio-version }}
81-
run: poetry add grpcio==${{ matrix.grpcio-version }}
82-
- name: Install lz4 ${{ matrix.lz4-version }}
83-
run: poetry add lz4==${{ matrix.lz4-version }}
84-
- name: Install protobuf ${{ matrix.protobuf-version }}
85-
run: poetry add protobuf==${{ matrix.protobuf-version }}
86-
- name: Install googleapis-common-protos ${{ matrix.googleapis-common-protos-version }}
87-
run: poetry add googleapis-common-protos==${{ matrix.googleapis-common-protos-version }}
69+
python_version: '${{ matrix.python_version }}'
70+
index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}'
71+
PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}'
72+
grpcio_version: '${{ matrix.grpcio_version }}'
73+
lz4_version: '${{ matrix.lz4_version }}'
74+
protobuf_version: '${{ matrix.protobuf_version }}'
75+
googleapis_common_protos_version: '${{ matrix.googleapis_common_protos_version }}'
8876

89-
- uses: nick-fields/retry@v3
77+
dependency-matrix-grpc-312:
78+
name: Deps (GRPC)
79+
needs: dependency-matrix-setup
80+
runs-on: ubuntu-latest
81+
strategy:
82+
max-parallel: 10
83+
fail-fast: false
84+
matrix:
85+
python_version:
86+
- 3.11
87+
- 3.12
88+
grpcio_version:
89+
- 1.59.3
90+
- 1.60.0
91+
lz4_version:
92+
- 3.1.3
93+
- 4.3.3
94+
protobuf_version:
95+
- 3.20.3
96+
googleapis_common_protos_version:
97+
- 1.53.0
98+
- 1.62.0
99+
grpc_gateway_protoc_gen_openapiv2_version:
100+
- 0.1.0
101+
steps:
102+
- uses: actions/checkout@v4
103+
- uses: ./.github/actions/test-dependency-grpc
90104
with:
91-
timeout_minutes: 5
92-
max_attempts: 3
93-
retry_on: error
94-
command: poetry run pytest tests/dependency/grpc -s -v
95-
env:
96-
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
97-
INDEX_NAME: ${{ needs.dependency-matrix-setup.outputs.index_name }}
98-
99-
100-
105+
python_version: '${{ matrix.python_version }}'
106+
index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}'
107+
PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}'
108+
grpcio_version: '${{ matrix.grpcio_version }}'
109+
lz4_version: '${{ matrix.lz4_version }}'
110+
protobuf_version: '${{ matrix.protobuf_version }}'
111+
googleapis_common_protos_version: '${{ matrix.googleapis_common_protos_version }}'
101112

102113
dependency-matrix-rest:
103114
name: Deps (REST)
104115
runs-on: ubuntu-latest
105116
needs: dependency-matrix-setup
106117
strategy:
107-
max-parallel: 5
118+
max-parallel: 10
108119
fail-fast: false
109120
matrix:
110-
python-version:
121+
python_version:
111122
- 3.8
112-
- 3.9
113-
- '3.10'
114123
- 3.11
115-
urllib3-version:
124+
urllib3_version:
116125
- 1.26.0
117126
- 1.26.18
118127
- 2.0.2
119-
- 2.0.5
120-
- 2.1.0
128+
- 2.2.1
121129
steps:
122130
- uses: actions/checkout@v4
123-
- name: 'Set up Python ${{ matrix.python-version }}'
124-
uses: actions/setup-python@v5
131+
- uses: ./.github/actions/test-dependency-rest
125132
with:
126-
python-version: '${{ matrix.python-version }}'
127-
- name: Setup Poetry
128-
uses: ./.github/actions/setup-poetry
129-
with:
130-
include_grpc: false
131-
include_types: false
132-
- name: 'Install urllib3 ${{ matrix.urllib3-version }}'
133-
run: 'poetry add urllib3==${{ matrix.urllib3-version }}'
134-
- uses: nick-fields/retry@v3
133+
python_version: '${{ matrix.python_version }}'
134+
index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}'
135+
PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}'
136+
urllib3_version: '${{ matrix.urllib3_version }}'
137+
138+
dependency-matrix-rest-312:
139+
name: Deps (REST)
140+
runs-on: ubuntu-latest
141+
needs: dependency-matrix-setup
142+
strategy:
143+
max-parallel: 10
144+
fail-fast: false
145+
matrix:
146+
python_version:
147+
- 3.12
148+
urllib3_version:
149+
- 1.26.5
150+
- 1.26.18
151+
- 2.0.2
152+
- 2.2.1
153+
steps:
154+
- uses: actions/checkout@v4
155+
- uses: ./.github/actions/test-dependency-rest
135156
with:
136-
timeout_minutes: 5
137-
max_attempts: 3
138-
retry_on: error
139-
command: poetry run pytest tests/dependency/rest -s -v
140-
env:
157+
python_version: '${{ matrix.python_version }}'
158+
index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}'
141159
PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}'
142-
INDEX_NAME: '${{ needs.dependency-matrix-setup.outputs.index_name }}'
160+
urllib3_version: '${{ matrix.urllib3_version }}'

.github/workflows/testing-integration.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12+
python_version: [3.8, 3.12]
1213
use_grpc: [true, false]
1314
metric:
1415
- cosine
@@ -20,6 +21,7 @@ jobs:
2021
- uses: actions/checkout@v4
2122
- uses: ./.github/actions/test-data-plane
2223
with:
24+
python_version: '${{ matrix.python_version }}'
2325
use_grpc: '${{ matrix.use_grpc }}'
2426
metric: '${{ matrix.metric }}'
2527
spec: '${{ matrix.spec }}'
@@ -55,7 +57,7 @@ jobs:
5557
testConfig:
5658
- python-version: 3.8
5759
pod: { environment: 'us-east1-gcp'}
58-
- python-version: 3.11
60+
- python-version: 3.12
5961
pod: { environment: 'us-east4-gcp'}
6062
fail-fast: false
6163
steps:
@@ -88,9 +90,6 @@ jobs:
8890
DIMENSION: 1536
8991
METRIC: 'cosine'
9092

91-
92-
93-
9493
control-rest-serverless:
9594
name: control plane serverless
9695
runs-on: ubuntu-latest
@@ -102,7 +101,7 @@ jobs:
102101
- python-version: 3.8 # Do one test run with 3.8 for sanity check
103102
pod: { environment: 'us-east1-gcp'}
104103
serverless: { cloud: 'aws', region: 'us-west-2'}
105-
- python-version: 3.11
104+
- python-version: 3.12
106105
pod: { environment: 'us-east1-gcp'}
107106
serverless: { cloud: 'aws', region: 'us-west-2'}
108107
fail-fast: false

.github/workflows/testing-unit.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
- 3.9
1414
- '3.10'
1515
- 3.11
16+
- 3.12
1617
use_grpc:
1718
- true
1819
- false

0 commit comments

Comments
 (0)