Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f5d1902
Fix typo
jhamon Jan 13, 2024
0a64e18
Fix typo
jhamon Jan 13, 2024
62bf3e9
Fix typo
jhamon Jan 13, 2024
225ec68
Skip create when already exists
jhamon Jan 13, 2024
c60441a
Fix typo
jhamon Jan 13, 2024
0603163
Fix typo
jhamon Jan 13, 2024
3cfbbaa
Fix typo
jhamon Jan 13, 2024
69b6223
Make vector count configurable
jhamon Jan 13, 2024
9426b99
Add step to inspect index via GCPS
jhamon Jan 13, 2024
f1af4f1
Move scripts, add assertions
jhamon Jan 13, 2024
31aa95b
Add more envs
jhamon Jan 13, 2024
b4b9f9f
Randomize index names
jhamon Jan 13, 2024
8cf42e0
Add cleanup step
jhamon Jan 13, 2024
f18b272
Prefix index names
jhamon Jan 13, 2024
e374185
Add to PR workflow
jhamon Jan 13, 2024
9fca04e
Rename workflow call
jhamon Jan 13, 2024
5080edb
Bump to the .dev9 release
jhamon Jan 13, 2024
b885ebf
Create collection on regional control plane
jhamon Jan 13, 2024
2fbe0b1
Fix errors in collections steps
jhamon Jan 14, 2024
d65b5cf
WIP on testing collections
jhamon Jan 14, 2024
e4c37b7
WIP on testing collections
jhamon Jan 14, 2024
c86b19b
Temporarily revert docs changes (#275)
jhamon Jan 13, 2024
12de7ae
Add missing certifi dependency (#277)
jhamon Jan 13, 2024
01775d0
Add missing .names() for list_collections() (#278)
jhamon Jan 14, 2024
dea93da
Update generated class
jhamon Jan 14, 2024
781e108
Bump to .dev10
jhamon Jan 14, 2024
fad95b0
Update collectioni creation
jhamon Jan 14, 2024
84068c0
Temp disable other tests
jhamon Jan 14, 2024
c7a57cb
Fix collection create
jhamon Jan 14, 2024
99de680
Move env matrix to workflow level
jhamon Jan 14, 2024
87c2bd4
Change cleanup so envs can run independently
jhamon Jan 14, 2024
c9b515d
Do not fail fast when workflows fail
jhamon Jan 14, 2024
f53fd99
Add missing checkout step
jhamon Jan 14, 2024
a38f2ec
Cleanup any collections left after all mgiration testing is done
jhamon Jan 14, 2024
a4f4a95
Cleanup collection after test run
jhamon Jan 14, 2024
3899c43
Fix delete-collection path
jhamon Jan 14, 2024
ec76cea
Remove azure from matrix
jhamon Jan 14, 2024
97a980b
Add create-from-collection
jhamon Jan 14, 2024
1814823
Add create-from-collection
jhamon Jan 14, 2024
a30d33b
Adjust script
jhamon Jan 14, 2024
ad8e51e
Adjust test-collection
jhamon Jan 14, 2024
a2caa3d
Disable collection cleanup
jhamon Jan 14, 2024
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
49 changes: 49 additions & 0 deletions .github/actions/create-collection-legacy/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Create Collection (Legacy / Regional Control Plane)'
description: 'Creates a collection to be used in other tests'

inputs:
pinecone_client_version:
description: 'The version of the Pinecone client to use'
required: false
default: '2.2.4'
collection_name_prefix:
description: 'The prefix for collection names'
required: true
index_name:
description: 'The name of the index to make the collection from'
required: true
PINECONE_ENVIRONMENT:
description: 'The environment of the collection'
required: true
PINECONE_API_KEY:
description: 'The Pinecone API key'
required: true

outputs:
collection_name:
description: 'The name of the collection, including randomized suffix'
value: ${{ steps.create-collection.outputs.collection_name }}

runs:
using: 'composite'
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install pinecone-client
shell: bash
run: |
pip install pinecone-client==${{ inputs.pinecone_client_version }}

- name: Create collection
id: create-collection
shell: bash
run: python3 scripts/2.x/create-collection-legacy.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ inputs.PINECONE_ENVIRONMENT }}
COLLECTION_NAME_PREFIX: ${{ inputs.collection_name_prefix }}
INDEX_NAME: ${{ inputs.index_name }}

58 changes: 58 additions & 0 deletions .github/actions/create-index-from-collection/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: 'Create Index from Collection'
description: 'Creates a pod index from a collection'

inputs:
index_name_prefix:
description: 'The prefix of the index name'
required: false
default: 'index-name'
collection_name:
description: 'The name of the collection to make the index from'
required: true
PINECONE_API_KEY:
description: 'The Pinecone API key'
required: true
PINECONE_ENVIRONMENT:
description: 'The environment of the collection'
required: true
dimension:
description: 'The dimension of the index'
required: false
default: '3'
metric:
description: 'The metric of the index'
required: false
default: 'cosine'
expected_vector_count:
description: 'The expected number of vectors in the index'
required: false

outputs:
index_name:
description: 'The name of the index, including randomized suffix'
value: ${{ steps.create-index.outputs.index_name }}

runs:
using: 'composite'
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Setup Poetry
uses: ./.github/actions/setup-poetry

- name: Create index
id: create-index
shell: bash
run: poetry run python3 scripts/3.x/create-pod-index-from-collection.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ inputs.PINECONE_ENVIRONMENT }}
INDEX_NAME_PREFIX: ${{ inputs.index_name_prefix }}
COLLECTION_NAME: ${{ inputs.collection_name }}
DIMENSION: ${{ inputs.dimension }}
METRIC: ${{ inputs.metric }}
EXPECTED_VECTOR_COUNT: ${{ inputs.expected_vector_count }}

21 changes: 16 additions & 5 deletions .github/actions/create-index-legacy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ inputs:
description: 'The version of the Pinecone client to use'
required: false
default: '2.2.4'
index_name:
description: 'The name of the index'
index_name_prefix:
description: 'The prefix for index names'
required: true
dimension:
description: 'The dimension of the index'
Expand All @@ -17,13 +17,22 @@ inputs:
description: 'The metric of the index'
required: false
default: 'cosine'
vectors_to_upsert:
description: 'The number of vectors to upsert'
required: false
default: '1000'
PINECONE_ENVIRONMENT:
description: 'The environment of the index'
required: true
PINECONE_API_KEY:
description: 'The Pinecone API key'
required: true

outputs:
index_name:
description: 'The name of the index, including randomized suffix'
value: ${{ steps.create-index.outputs.index_name }}

runs:
using: 'composite'
steps:
Expand All @@ -40,10 +49,12 @@ runs:
- name: Create index
id: create-index
shell: bash
run: ./python3 scripts/create-index-legacy.py
run: python3 scripts/2.x/create-index-legacy.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ inputs.PINECONE_ENVIRONMENT }}
INDEX_NAME: ${{ inputs.index_name }}
INDEX_NAME_PREFIX: ${{ inputs.index_name_prefix }}
DIMENSION: ${{ inputs.dimension }}
METRIC: ${{ inputs.metric }
METRIC: ${{ inputs.metric }}
VECTORS_TO_UPSERT: ${{ inputs.vectors_to_upsert }}

60 changes: 60 additions & 0 deletions .github/actions/create-index-pod/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: 'Create Pod Index via GCPS'
description: 'Creates an index to be used in other tests'

inputs:
pinecone_client_version:
description: 'The version of the Pinecone client to use'
required: false
default: '3.0.0.dev10'
index_name_prefix:
description: 'The prefix for index names'
required: true
dimension:
description: 'The dimension of the index'
required: false
default: '1536'
metric:
description: 'The metric of the index'
required: false
default: 'cosine'
vectors_to_upsert:
description: 'The number of vectors to upsert'
required: false
default: '1000'
PINECONE_ENVIRONMENT:
description: 'The environment of the index'
required: true
PINECONE_API_KEY:
description: 'The Pinecone API key'
required: true

outputs:
index_name:
description: 'The name of the index, including randomized suffix'
value: ${{ steps.create-index.outputs.index_name }}

runs:
using: 'composite'
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install pinecone-client
shell: bash
run: |
pip install pinecone-client==${{ inputs.pinecone_client_version }}

- name: Create index
id: create-index
shell: bash
run: python3 scripts/3.x/create-pod-index.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ inputs.PINECONE_ENVIRONMENT }}
INDEX_NAME_PREFIX: ${{ inputs.index_name_prefix }}
DIMENSION: ${{ inputs.dimension }}
METRIC: ${{ inputs.metric }}
VECTORS_TO_UPSERT: ${{ inputs.vectors_to_upsert }}

31 changes: 31 additions & 0 deletions .github/actions/delete-all-collections/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Delete all collections owned by API key'
description: 'Delete all collections owned by API key'

inputs:
pinecone_client_version:
description: 'The version of the Pinecone client to use'
required: true
PINECONE_API_KEY:
description: 'The Pinecone API key'
required: true

runs:
using: 'composite'
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install pinecone-client
shell: bash
run: |
pip install pinecone-client==${{ inputs.pinecone_client_version }}

- name: Delete all collections
id: delete-collections
shell: bash
run: python3 scripts/3.x/delete-all-collections.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}

32 changes: 32 additions & 0 deletions .github/actions/delete-all-indexes/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Delete all indexes owned by API key'
description: 'Delete all indexes owned by API key'

inputs:
pinecone_client_version:
description: 'The version of the Pinecone client to use'
required: false
default: '3.0.0.dev9'
PINECONE_API_KEY:
description: 'The Pinecone API key'
required: true

runs:
using: 'composite'
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install pinecone-client
shell: bash
run: |
pip install pinecone-client==${{ inputs.pinecone_client_version }}

- name: Delete all indexes
id: delete-indexes
shell: bash
run: python3 scripts/3.x/delete-all-indexes.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}

19 changes: 19 additions & 0 deletions .github/actions/delete-collection/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Delete Collection'
description: 'Deletes a collection'

inputs:
collection_name:
description: 'The name of the collection to delete'
required: true
PINECONE_API_KEY:
description: 'The Pinecone API key'
required: true


runs:
using: 'composite'
steps:
- name: Delete collection
shell: bash
run: |
curl -X DELETE "https://api.pinecone.io/collections/${{ inputs.collection_name }}" -H "Api-Key: ${{ inputs.PINECONE_API_KEY }}"
39 changes: 39 additions & 0 deletions .github/actions/test-collection/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'Test legacy collection on GCPS'
description: 'Uses new client to interact with collection created via legacy client'

inputs:
pinecone_client_version:
description: 'The version of the Pinecone client to use'
required: true
collection_name:
description: 'The name of the collection'
required: true
PINECONE_ENVIRONMENT:
description: 'The environment of the index'
required: true
PINECONE_API_KEY:
description: 'The Pinecone API key'
required: true

runs:
using: 'composite'
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install pinecone-client
shell: bash
run: |
pip install pinecone-client==${{ inputs.pinecone_client_version }}

- name: Test collection
id: test-collection
shell: bash
run: python3 scripts/3.x/test-collection.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ inputs.PINECONE_ENVIRONMENT }}
COLLECTION_NAME: ${{ inputs.collection_name }}
VECTORS_TO_UPSERT: ${{ inputs.vectors_to_upsert }}
44 changes: 44 additions & 0 deletions .github/actions/test-legacy-index/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 'Test legacy index on GCPS'
description: 'Uses new client to interact with index created via legacy client'

inputs:
pinecone_client_version:
description: 'The version of the Pinecone client to use'
required: true
index_name:
description: 'The name of the index'
required: true
PINECONE_ENVIRONMENT:
description: 'The environment of the index'
required: true
PINECONE_API_KEY:
description: 'The Pinecone API key'
required: true
vectors_to_upsert:
description: 'The number of vectors to upsert'
required: false
default: '1000'


runs:
using: 'composite'
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install pinecone-client
shell: bash
run: |
pip install pinecone-client==${{ inputs.pinecone_client_version }}

- name: Create index
id: create-index
shell: bash
run: python3 scripts/3.x/test-index.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ inputs.PINECONE_ENVIRONMENT }}
INDEX_NAME: ${{ inputs.index_name }}
VECTORS_TO_UPSERT: ${{ inputs.vectors_to_upsert }}
Loading