Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 13 additions & 14 deletions .github/workflows/alpha-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ on:
default: 'rc1'

jobs:
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
# 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:
- unit-tests
- integration-tests
- dependency-tests
# needs:
# - unit-tests
# - integration-tests
# - dependency-tests
with:
isPrerelease: true
ref: ${{ inputs.ref }}
Expand All @@ -49,4 +49,3 @@ jobs:
secrets:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PROD_PYPI_PUBLISH_TOKEN }}

12 changes: 4 additions & 8 deletions .github/workflows/testing-dependency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ jobs:
# - 4.1.0
- 4.3.3
protobuf_version:
- 4.25.3
- 5.29.1
protoc-gen-openapiv2:
- 0.0.1
googleapis_common_protos_version:
- 1.62.0
- 1.66.0
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-dependency-grpc
Expand All @@ -79,7 +79,6 @@ jobs:
lz4_version: '${{ matrix.lz4_version }}'
protobuf_version: '${{ matrix.protobuf_version }}'
googleapis_common_protos_version: '${{ matrix.googleapis_common_protos_version }}'
DD_TAGS: 'test.configuration.python:${{ matrix.python_version}},test.configuration.grpcio:${{ matrix.grpcio_version }},test.configuration.lz4:${{ matrix.lz4_version }},test.configuration.protobuf:${{ matrix.protobuf_version }},test.configuration.googleapis_common_protos:${{ matrix.googleapis_common_protos_version }}'

dependency-matrix-grpc-312:
name: Deps (GRPC)
Expand All @@ -99,11 +98,11 @@ jobs:
- 3.1.3
- 4.3.3
protobuf_version:
- 4.25.3
- 5.29.1
protoc-gen-openapiv2:
- 0.0.1
googleapis_common_protos_version:
- 1.62.0
- 1.66.0
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-dependency-grpc
Expand All @@ -115,7 +114,6 @@ jobs:
lz4_version: '${{ matrix.lz4_version }}'
protobuf_version: '${{ matrix.protobuf_version }}'
googleapis_common_protos_version: '${{ matrix.googleapis_common_protos_version }}'
DD_TAGS: 'test.configuration.python:${{ matrix.python_version}},test.configuration.grpcio:${{ matrix.grpcio_version }},test.configuration.lz4:${{ matrix.lz4_version }},test.configuration.protobuf:${{ matrix.protobuf_version }},test.configuration.googleapis_common_protos:${{ matrix.googleapis_common_protos_version }}'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warnings were showing in the log about these settings for the datadog ddtrace plugin, so I removed them while I was in this file making adjustments.


dependency-matrix-rest:
name: Deps (REST)
Expand All @@ -141,7 +139,6 @@ jobs:
index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}'
PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}'
urllib3_version: '${{ matrix.urllib3_version }}'
DD_TAGS: 'test.configuration.python:${{ matrix.python_version}},test.configuration.urllib3:${{ matrix.urllib3_version }}'

dependency-matrix-rest-312:
name: Deps (REST)
Expand All @@ -166,7 +163,6 @@ jobs:
index_name: '${{ needs.dependency-matrix-setup.outputs.index_name }}'
PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}'
urllib3_version: '${{ matrix.urllib3_version }}'
DD_TAGS: 'test.configuration.python:${{ matrix.python_version}},test.configuration.urllib3:${{ matrix.urllib3_version }}'

deps-cleanup:
name: Deps cleanup
Expand Down
2 changes: 1 addition & 1 deletion codegen/apis
Submodule apis updated from 38acd8 to 8562ca
8 changes: 8 additions & 0 deletions codegen/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: v1
plugins:
- plugin: buf.build/grpc/python:v1.59.0
out: gen
- plugin: buf.build/protocolbuffers/python:v29.0
out: gen
- plugin: buf.build/protocolbuffers/pyi:v29.1
out: gen
6 changes: 6 additions & 0 deletions codegen/buf.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/googleapis/googleapis
commit: acd896313c55464b993332136ded1b6e
digest: b5:025d83e25193feb8dac5e5576113c8737006218b3b09fbc0d0ff652614da5424b336edb15bea139eb90d14eba656774a979d1fbdae81cbab2013932b84b98f53
12 changes: 12 additions & 0 deletions codegen/buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# For details on buf.yaml configuration, visit https://buf.build/docs/configuration/v2/buf-yaml
version: v2
lint:
use:
- STANDARD
breaking:
use:
- FILE
deps:
- buf.build/googleapis/googleapis
modules:
- path: apis/_build/2025-01
54 changes: 54 additions & 0 deletions codegen/build-grpc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash

set -eux -o pipefail
version=$1 # e.g. 2024-07

update_apis_repo() {
echo "Updating apis repo"
pushd codegen/apis
git fetch
git checkout main
git pull
just build
popd
}

update_buf_config() {
pushd codegen
# Update buf config to find correct proto version
sed -i '' "s/[0-9][0-9][0-9][0-9]-[0-1][0-9]/${version}/g" buf.yaml

# Clean before building
rm -rf gen

# Ensure path valid by running the buf build command
buf build
popd
}

buf_generate() {
pushd codegen
# Generate the python code
buf generate
popd
}

update_apis_repo
update_buf_config
buf_generate

dest="pinecone/core/grpc/protos/"

# Remove existing files in dest
rm -rf "${dest}*.py"
rm -rf "${dest}*.pyi"

find codegen/gen/ -name "*.py" | while IFS= read -r file; do
sed -i '' "s/^import db_data/import pinecone.core.grpc.protos.db_data/g" "${file}"
done

# Copy the new generated files to dest directory
cp codegen/gen/* ${dest}

# Cleanup the intermediate files that were generated
rm -rf codegen/gen
Loading