Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1.0 #54

Merged
merged 12 commits into from
Oct 14, 2024
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
81 changes: 81 additions & 0 deletions .github/workflows/extensive_vector_search_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Run long running vector search tests

on:
push:
branches:
- dev

jobs:
test-exhaustive-vector-search:
runs-on: ubuntu-24.04
continue-on-error: false


strategy:
matrix:
python-version: ["3.12"]


steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}


- name: Install dependencies
run: |
python -m pip install --upgrade pip
python setup.py
pip install -r requirements.txt
working-directory: tests


- name: Retrieve the secret and decode it to a file
env:
FEATURE_FILE: ${{ secrets.FEATURE_FILE }}
run: |
echo $FEATURE_FILE | base64 --decode > features.conf
working-directory: tests

- name: Docker Login
uses: docker/login-action@v2
with:
registry: aerospike.jfrog.io
username: ${{ secrets.JFROG_USERNAME }}
password: ${{ secrets.JFROG_PASSWORD }}


- name: Set up RANDFILE environment variable
run: echo "RANDFILE=$HOME/.rnd" >> $GITHUB_ENV

- name: Create .rnd file if it doesn't exist
run: touch $HOME/.rnd

- name: create config
run: |
assets/call_gen.sh
cat /etc/hosts
working-directory: tests

- name: Run unit tests
run: |

docker run -d --name aerospike-vector-search --network=host -p 5000:5000 -v $(pwd):/etc/aerospike-vector-search aerospike/aerospike-vector-search:0.10.0
docker run -d --name aerospike -p 3000:3000 -v .:/etc/aerospike aerospike/aerospike-server-enterprise:latest

sleep 5

python -m pytest standard -s --host 0.0.0.0 --port 5000 --extensive_vector_search -vs

mv .coverage coverage_data
working-directory: tests

- name: Upload test coverage
uses: actions/upload-artifact@v4
with:
name: coverage_exhaustive_vector_search
path: tests/coverage_data
160 changes: 97 additions & 63 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,18 @@ jobs:
sleep 5

docker ps
python -m pytest standard/aio -s --host 0.0.0.0 --port 5000
python -m pytest standard -s --host 0.0.0.0 --port 5000 --cov=aerospike_vector_search

mv .coverage coverage_data
working-directory: tests

- name: Upload test coverage
if: ${{ matrix.python-version == '3.12' }}
uses: actions/upload-artifact@v4
with:
name: coverage_normal
path: tests/coverage_data

test-tls:
runs-on: ubuntu-24.04
continue-on-error: true
Expand Down Expand Up @@ -142,10 +151,18 @@ jobs:


docker ps
python -m pytest standard/aio -s --host 0.0.0.0 --port 5000 --root_certificate tls/root.crt --ssl_target_name_override child -vs
python -m pytest standard -s --host 0.0.0.0 --port 5000 --root_certificate tls/root.crt --ssl_target_name_override child -vs --cov=aerospike_vector_search

mv .coverage coverage_data
working-directory: tests

- name: Upload test coverage
uses: actions/upload-artifact@v4
with:
name: coverage_tls
path: tests/coverage_data


test-tls-auth:
runs-on: ubuntu-24.04
continue-on-error: true
Expand Down Expand Up @@ -213,10 +230,17 @@ jobs:

sleep 5

python -m pytest standard/aio -s -vv --host 0.0.0.0 --port 5000 --root_certificate tls/root.crt --username admin --password admin --ssl_target_name_override child
python -m pytest standard -s -vv --host 0.0.0.0 --port 5000 --root_certificate tls/root.crt --username admin --password admin --ssl_target_name_override child --cov=aerospike_vector_search

mv .coverage coverage_data
working-directory: tests

- name: Upload test coverage
uses: actions/upload-artifact@v4
with:
name: coverage_tls_auth
path: tests/coverage_data


test-tls-auth-rbac:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -290,12 +314,20 @@ jobs:


docker ps
python -m pytest rbac -s -vv --host 0.0.0.0 --port 5000 --root_certificate tls/root.crt --ssl_target_name_override child
python -m pytest rbac -s -vv --host 0.0.0.0 --port 5000 --root_certificate tls/root.crt --ssl_target_name_override child --cov=aerospike_vector_search

docker logs aerospike-vector-search
docker logs aerospike

mv .coverage coverage_data
working-directory: tests

- name: Upload test coverage
uses: actions/upload-artifact@v4
with:
name: coverage_tls_auth_rbac
path: tests/coverage_data


test-mtls:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -363,12 +395,17 @@ jobs:

sleep 5

python -m pytest standard/aio -s --host 0.0.0.0 --port 5000 --root_certificate tls/root.crt --private_key tls/brawn.key.pem --certificate_chain tls/brawn.crt --ssl_target_name_override brawn -vs


python -m pytest standard -s --host 0.0.0.0 --port 5000 --root_certificate tls/root.crt --private_key tls/brawn.key.pem --certificate_chain tls/brawn.crt --ssl_target_name_override brawn -vs --cov=aerospike_vector_search

mv .coverage coverage_data
working-directory: tests

- name: Upload test coverage
uses: actions/upload-artifact@v4
with:
name: coverage_mtls
path: tests/coverage_data


test-mtls-auth:
runs-on: ubuntu-24.04
Expand All @@ -377,7 +414,7 @@ jobs:

strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.12"]


steps:
Expand Down Expand Up @@ -436,12 +473,17 @@ jobs:

sleep 5

python -m pytest standard/aio -s --host 0.0.0.0 --port 5000 --root_certificate tls/root.crt --private_key tls/brawn.key.pem --certificate_chain tls/brawn.crt --username admin --password admin --ssl_target_name_override brawn -vs


python -m pytest standard -s --host 0.0.0.0 --port 5000 --root_certificate tls/root.crt --private_key tls/brawn.key.pem --certificate_chain tls/brawn.crt --username admin --password admin --ssl_target_name_override brawn -vs --cov=aerospike_vector_search

mv .coverage coverage_data
working-directory: tests

- name: Upload test coverage
uses: actions/upload-artifact@v4
with:
name: coverage_mtls_auth
path: tests/coverage_data


test-mtls-auth-rbac:
runs-on: ubuntu-24.04
Expand All @@ -450,7 +492,7 @@ jobs:

strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.12"]


steps:
Expand Down Expand Up @@ -510,9 +552,17 @@ jobs:

sleep 5

python -m pytest rbac -s --host 0.0.0.0 --port 5000 --root_certificate tls/root.crt --private_key tls/brawn.key.pem --certificate_chain tls/brawn.crt --ssl_target_name_override brawn -vs
python -m pytest rbac -s --host 0.0.0.0 --port 5000 --root_certificate tls/root.crt --private_key tls/brawn.key.pem --certificate_chain tls/brawn.crt --ssl_target_name_override brawn -vs --cov=aerospike_vector_search

mv .coverage coverage_data
working-directory: tests

- name: Upload test coverage
uses: actions/upload-artifact@v4
with:
name: coverage_mtls_auth_rbac
path: tests/coverage_data

test-is-loadbalancer:
runs-on: ubuntu-24.04
continue-on-error: true
Expand Down Expand Up @@ -576,74 +626,58 @@ jobs:

sleep 5

python -m pytest standard/aio -s --host 0.0.0.0 --port 5000 --is_loadbalancer -vs
working-directory: tests

test-exhaustive-vector-search:
runs-on: ubuntu-24.04
continue-on-error: true
python -m pytest standard -s --host 0.0.0.0 --port 5000 --is_loadbalancer -vs --cov=aerospike_vector_search

mv .coverage coverage_data
working-directory: tests

strategy:
matrix:
python-version: ["3.12"]
- name: Upload test coverage
uses: actions/upload-artifact@v4
with:
name: coverage_is_load_balancer
path: tests/coverage_data


upload-to-codecov:
needs: [test-normal, test-tls, test-tls-auth, test-tls-auth-rbac, test-mtls, test-mtls-auth, test-mtls-auth-rbac, test-is-loadbalancer]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python setup.py
pip install -r requirements.txt
working-directory: tests

run: pip install coverage build

- name: Retrieve the secret and decode it to a file
env:
FEATURE_FILE: ${{ secrets.FEATURE_FILE }}
run: |
echo $FEATURE_FILE | base64 --decode > features.conf
working-directory: tests

- name: Docker Login
uses: docker/login-action@v2
- name: Download coverage reports
uses: actions/download-artifact@v4
with:
registry: aerospike.jfrog.io
username: ${{ secrets.JFROG_USERNAME }}
password: ${{ secrets.JFROG_PASSWORD }}
path: coverage_files

- name: List files
run: ls -R coverage_files

- name: Set up RANDFILE environment variable
run: echo "RANDFILE=$HOME/.rnd" >> $GITHUB_ENV

- name: Create .rnd file if it doesn't exist
run: touch $HOME/.rnd

- name: create config
- name: Combine coverage reports
run: |
assets/call_gen.sh
cat /etc/hosts
working-directory: tests

- name: Run unit tests
coverage combine $(find coverage_files -name "coverage_data")

# this is needed because the coverage files expect the source code
# to be installed in a certain location. TODO use relative files and source instead
# https://coverage.readthedocs.io/en/latest/config.html#config-run-relative-files
- name: Build and install aerospike-vector-search
run: |
python -m build
pip install dist/aerospike_vector_search-2.0.0-py3-none-any.whl

docker run -d --name aerospike-vector-search --network=host -p 5000:5000 -v $(pwd):/etc/aerospike-vector-search aerospike/aerospike-vector-search:0.10.0
docker run -d --name aerospike -p 3000:3000 -v .:/etc/aerospike aerospike/aerospike-server-enterprise:latest

sleep 5

python -m pytest standard/aio -s --host 0.0.0.0 --port 5000 --extensive_vector_search -vs
working-directory: tests
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}

#
# test-timeout-on-sandbox:
Expand Down Expand Up @@ -679,5 +713,5 @@ jobs:
# - name: Run unit tests
# run: |
#
# python -m pytest standard/aio -s --host 34.42.225.207 --port 5000 --with_latency
# python -m pytest standard -s --host 34.42.225.207 --port 5000 --with_latency
# working-directory: tests
Loading
Loading