Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
17e0566
Update generated client code (#215)
jhamon Oct 16, 2023
2981ab4
Config / init refactor for state encapsulation (#220)
jhamon Oct 20, 2023
70c80a8
Downgrade to openapi 5.2, add template overrides (#229)
jhamon Oct 31, 2023
d7219a1
[spruce] Pin docs-build python version (#235)
jhamon Nov 3, 2023
85fce4f
Remove numpy dependency (#233)
jhamon Nov 4, 2023
e73726d
Move all grpc stuff into pinecone.grpc subpackage (#238)
jhamon Nov 6, 2023
f636a79
Remove unused deps (#237)
jhamon Nov 6, 2023
46228c3
[spruce] Bump to pytest 7.2.0 to fix security issue (#241)
jhamon Nov 6, 2023
8d66a51
Add static type checking with mypy (#240)
jhamon Nov 7, 2023
dbbed94
Regenerate client with updated openapi spec (#243)
jhamon Nov 10, 2023
3d6cb0d
[spruce] Integration testing WIP (#244)
jhamon Nov 18, 2023
a851d64
[spruce] Add additional_headers config (#245)
jhamon Nov 19, 2023
b6da95f
Fix typo in debug print code
jhamon Nov 20, 2023
e46ed60
Fix ServerlessSpec issue
jhamon Nov 21, 2023
6980a3c
Fix host store bug with targeting indexes
jhamon Nov 21, 2023
fc5dca2
[Fix] Prelease CI job uses bump action to version (#246)
jhamon Nov 21, 2023
41828e0
[spruce] Make list results iterable (#247)
jhamon Nov 22, 2023
468b754
Update the README.md to Spruce
Nov 26, 2023
8440197
[spruce] Allow GRPCIndexBase to use config.host to establish endpoint…
austin-denoble Nov 27, 2023
f9ce054
Update client with inlined type definitions under IndexModel and Crea…
jhamon Nov 27, 2023
90120b1
[Spruce] Integration test fixes (#250)
jhamon Nov 27, 2023
203a0df
[spruce] Add names() helper method on list results (#252)
jhamon Nov 30, 2023
1318537
Cleanup exception hierarchy (#251)
jhamon Dec 1, 2023
5226fcf
[spruce] Fix issue with polling after delete index (#253)
jhamon Dec 1, 2023
3792139
[Bug] Stop coercion of strings into datetime objects (#255)
jhamon Dec 20, 2023
bcf5393
Parameterize integration tests on environment (#256)
jhamon Dec 26, 2023
2a26369
Wire up pool_threads config (#258)
jhamon Dec 27, 2023
e53ea92
Update publish job with pypi api tokens (#262)
jhamon Dec 28, 2023
596a9f6
Restore __version__ attribute to package (#264)
jhamon Jan 5, 2024
a858f52
Accept host urls both with and without https prefix (#265)
jhamon Jan 8, 2024
257ae25
Dependency testing, support python3.8, downgrade urllib3 (#263)
jhamon Jan 10, 2024
65343d5
Update publish workflows with new testing setup (#266)
jhamon Jan 10, 2024
1dd381e
Expand urllib3 compatibility to 1.26.0 (#267)
jhamon Jan 10, 2024
93a04ca
Data plane integration testing suite (#268)
jhamon Jan 12, 2024
5370b09
Add `usage.read_units` in fetch/query responses (#270)
jhamon Jan 13, 2024
d86dd1b
Remove deprecated `queries` option in `query()` (#272)
jhamon Jan 13, 2024
d0a38b5
Suppress TqdmExperimentalWarning (#273)
jhamon Jan 13, 2024
3f2a324
Script for generating load on a test index (#271)
jhamon Jan 13, 2024
5a28523
Initial steps on migration testing
jhamon Jan 13, 2024
41a11a1
Resolve merge conflicts
jhamon Jan 13, 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
2 changes: 2 additions & 0 deletions .github/actions/build-docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ runs:

- name: Setup Poetry
uses: ./.github/actions/setup-poetry
with:
include_grpc: 'true'

- name: Build html documentation
shell: bash
Expand Down
49 changes: 49 additions & 0 deletions .github/actions/create-index-legacy/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Create Index (Legacy / Regional Control Plane)'
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: '2.2.4'
index_name:
description: 'The name of the index'
required: true
dimension:
description: 'The dimension of the index'
required: false
default: '1536'
metric:
description: 'The metric of the index'
required: false
default: 'cosine'
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: Create index
id: create-index
shell: bash
run: ./python3 scripts/create-index-legacy.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ inputs.PINECONE_ENVIRONMENT }}
INDEX_NAME: ${{ inputs.index_name }}
DIMENSION: ${{ inputs.dimension }}
METRIC: ${{ inputs.metric }
55 changes: 55 additions & 0 deletions .github/actions/create-index/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: 'Create Index'
description: 'Creates an index to be used in other tests'

inputs:
region:
description: 'The region of the index'
required: false
default: 'us-west-2'
cloud:
description: 'The cloud of the index'
required: false
default: 'aws'
name_prefix:
description: 'The prefix of the index name'
required: false
default: 'index-name'
dimension:
description: 'The dimension of the index'
required: false
default: '3'
metric:
description: 'The metric of the index'
required: false
default: 'cosine'
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: Setup Poetry
uses: ./.github/actions/setup-poetry

- name: Create index
id: create-index
shell: bash
run: poetry run python3 scripts/create.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
NAME_PREFIX: ${{ inputs.name_prefix }}
REGION: ${{ inputs.region }}
CLOUD: ${{ inputs.cloud }}
DIMENSION: ${{ inputs.dimension }}
METRIC: ${{ inputs.metric }}
29 changes: 29 additions & 0 deletions .github/actions/delete-index/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Delete Index'
description: 'Deletes an index to be used in other tests'

inputs:
index_name:
description: 'The name of the index to delete'
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: Setup Poetry
uses: ./.github/actions/setup-poetry

- name: Delete index
shell: bash
run: poetry run python3 scripts/delete.py
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
INDEX_NAME: ${{ inputs.index_name }}
32 changes: 22 additions & 10 deletions .github/actions/setup-poetry/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
name: 'Setup Poetry'
description: 'Installs Poetry and dependencies'
inputs:
include_grpc:
description: 'Install gRPC dependencies'
required: true
default: 'false'
include_dev:
description: 'Install dev dependencies'
required: true
default: 'true'
include_types:
description: 'Install typing dependencies (mypy, type stubs, etc)'
required: true
default: 'true'

runs:
using: 'composite'
steps:
Expand All @@ -8,14 +22,12 @@ runs:

- name: Install dependencies
shell: bash
env:
INCLUDE_GRPC: ${{ inputs.include_grpc }}
INCLUDE_DEV: ${{ inputs.include_dev }}
INCLUDE_TYPES: ${{ inputs.include_types }}
run: |
poetry install

# We separate the gRPC dependencies from the REST client's install
# behavior, so we test installing the grpc dependencies here as well
# The dependencies that are specific to gRPC are defined in pyproject.toml
# under tool.poetry.extras
- name: Install gRPC dependencies
shell: bash
run: |
poetry install --extras "grpc"
GRPC_FLAG=$( [ "$INCLUDE_GRPC" = "true" ] && echo "--extras grpc" || echo "" )
DEV_FLAG=$( [ "$INCLUDE_DEV" = "false" ] && echo "--without dev" || echo "" )
TYPING_FLAG=$( [ "$INCLUDE_TYPES" = "true" ] && echo "--with types" || echo "" )
poetry install $DEV_FLAG $TYPING_FLAG $GRPC_FLAG
57 changes: 57 additions & 0 deletions .github/actions/test-data-plane/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: 'Test Data Plane'
description: 'Runs tests on the Pinecone data plane'

# - pod vs serverless
# - grpc vs rest
# - metric -> vector vs sparse vector
# - namespace: default vs custom
# - environment: free vs paid
# - with metadata vs without metadata

inputs:
metric:
description: 'The metric of the index'
required: true
spec:
description: 'The deploy spec of the index'
required: true
use_grpc:
description: 'Whether to use gRPC or REST'
required: true
freshness_timeout_seconds:
description: 'The number of seconds to wait for the index to become fresh'
required: false
default: '60'
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: Setup Poetry
uses: ./.github/actions/setup-poetry
with:
include_grpc: ${{ inputs.use_grpc }}
include_dev: 'true'

- name: Run data plane tests
id: data-plane-tests
shell: bash
run: poetry run pytest tests/integration/data
env:
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
USE_GRPC: ${{ inputs.use_grpc }}
METRIC: ${{ inputs.metric }}
SPEC: ${{ inputs.spec }}
FRESHNESS_TIMEOUT_SECONDS: ${{ inputs.freshness_timeout_seconds }}
20 changes: 15 additions & 5 deletions .github/workflows/alpha-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,28 @@ on:
default: 'rc1'

jobs:
testing:
uses: './.github/workflows/testing.yaml'
unit-tests:
uses: './.github/workflows/testing-unit.yaml'
secrets: inherit
integration-tests:
uses: './.github/workflows/testing-integration.yaml'
secrets: inherit
dependency-tests:
uses: './.github/workflows/testing-dependency.yaml'
secrets: inherit

pypi:
uses: './.github/workflows/publish-to-pypi.yaml'
needs: testing
needs:
- unit-tests
- integration-tests
- dependency-tests
with:
isPrerelease: true
ref: ${{ inputs.ref }}
releaseLevel: ${{ inputs.releaseLevel }}
prereleaseSuffix: ${{ inputs.prereleaseSuffix }}
TWINE_REPOSITORY: 'pypi'
secrets:
PYPI_USERNAME: ${{ secrets.PROD_PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PROD_PYPI_PASSWORD }}
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PROD_PYPI_PUBLISH_TOKEN }}
47 changes: 47 additions & 0 deletions .github/workflows/migration-paths.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'Migration testing'

on:
workflow_dispatch: {}


jobs:
create-index-legacy-paid:
name: Create index
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
env:
- asia-southeast1-gcp
# - asia-northeast1-gcp
# - eu-west1-gcp
# - eu-west4-gcp
# - northamerica-northeast1-gcp
# - us-central1-gcp
# - us-east1-gcp
# - us-east4-gcp
# - us-west1-gcp
# - us-west4-gcp
# - eastus-azure
# - us-east-1-aws

# - gcp-starter
# - asia-southeast1-gcp-free
# - us-west1-gcp-free
# - us-west4-gcp-free


steps:
- name: Checkout
uses: actions/checkout@v4

- name: Create on legacy control plane
id: create-legacy
uses: ./.github/actions/create-index-legacy
with:
PINECONE_API_KEY: ${{ secrets.V3MIGRATION_API_KEY__ONE_KEY_MANY_ENVS }}
PINECONE_ENVIRONMENT: ${{ matrix.env }}
pinecone_client_version: 2.2.4
index_name: migration-testing-index
dimension: 1536
metric: cosine
20 changes: 15 additions & 5 deletions .github/workflows/nightly-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ on:
- cron: '0 0 * * *'

jobs:
run-tests:
uses: './.github/workflows/testing.yaml'
unit-tests:
uses: './.github/workflows/testing-unit.yaml'
secrets: inherit
integration-tests:
uses: './.github/workflows/testing-integration.yaml'
secrets: inherit
dependency-tests:
uses: './.github/workflows/testing-dependency.yaml'
secrets: inherit

pypi-nightly:
needs: run-tests
needs:
- unit-tests
- integration-tests
- dependency-tests
timeout-minutes: 30
name: pypi-nightly
runs-on: ubuntu-latest
Expand Down Expand Up @@ -58,6 +68,6 @@ jobs:
id: pypi_upload
env:
TWINE_REPOSITORY: pypi
PYPI_USERNAME: ${{ secrets.PROD_PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PROD_PYPI_PASSWORD }}
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PROD_PYPI_PUBLISH_TOKEN }}
run: make upload
Loading