Skip to content

Commit

Permalink
Support for K8s 1.28.x (#15)
Browse files Browse the repository at this point in the history
* feat: Added integration workflow

Refs: #1

* fix: Added kubectl wait to wait for deployment to complete

Refs: #1

* fix: Some issue with service. Experimenting with listing service.

Refs: #1

* fix: Fixed the service issue and added matrix testing of kube versions

Refs: #1

* chore: Updated test matrix to match chart kubeVersion range >=1.24 <= 1.27

Refs: #1

* fix: Fixed chart issue with boolean flags

- Added further variance to the test matrix by including allowReset and isPersistent flags (no specific tests are implemented but those are coming soon)

Refs: #1

* fix: Added docker image hnswlib rebuild + sqlite3 for debugging

- Added a small test to ensure chroma is up and running.
- Docker image rebuilt.

* docs: Added small clarification how to build/push the docker image.

* chore: Added bug and feature request issue templates and docker image in ghcr

Refs: #2

* feat: Backup and restore feature

Refs: #6

* feat: Backup and restore feature

- Adding sudo to the image for fsfreeze use

Refs: #6

* feat: Backup and restore feature

- Making chroma user sudoer

Refs: #6

* feat: Adding tests for v0.4.5

* feat: Adding Chroma 0.4.5 support to chart

* feat: Updating WFs

* feat: Lowering chart requirements to k8s API 1.23.0

* feat: Adding multi-platform build

* fix: Moved platforms out of the matrix and directly into platform parameter of build-push action

* fix: Fixed a typo in build images workflow.

* chore: Removing hnswlib reinstall to check multi-arch build

* feat: Adding support for Chroma 0.4.6

* chore: Updating integration tests

* feat: Updating chart version and default version to 0.4.6

* fix: chroma-hnswlib reinstall is needed as it does uniformly work across platforms.

* chore: Chart version bump for hnsw lib fix

* chore: Chart version bump for hnsw lib fix

* feat: Support for k8s API 1.28 and Chroma 0.4.7

Refs: #14

* feat: Support for k8s API 1.28 and Chroma 0.4.7

- Bumping upper bound of chart support.
- Removed isPeristent/allowReset from test matrix to reduce generated jobs.

Refs: #14

* fix: Made the integration test install local copy of the chart instead of pullingit.

* fix: Updating chart version to allow RC

Refs: #14

* chore: Version bumps

- Default Chroma version set to 0.4.7
- Chart version bump

Refs: #14
  • Loading branch information
tazarov authored Aug 27, 2023
1 parent d0e0472 commit d1434cb
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-images-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: "ghcr.io/amikos-tech/chromadb-chart/chroma"
LATEST_VERSION: "0.4.6"
LATEST_VERSION: "0.4.7"

jobs:
build-images:
strategy:
matrix:
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6 ]
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7 ]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: "ghcr.io/amikos-tech/chromadb-chart/chroma"
LATEST_VERSION: "0.4.6"
LATEST_VERSION: "0.4.7"

jobs:
build-images:
strategy:
matrix:
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6 ]
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7 ]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ jobs:
release:
strategy:
matrix:
kubernetes-version: [1.23.0, 1.24.0, 1.27.3 ]
isPersistent: [ true, false ]
allowReset: [ true, false ]
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6 ]
kubernetes-version: [1.23.0, 1.24.0, 1.27.3, v1.28.0-rc.0 ]
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7 ]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -33,16 +31,16 @@ jobs:
uses: medyagh/setup-minikube@latest
with:
kubernetes-version: ${{ matrix.kubernetes-version }}
- name: Add helm repo
run: |
set -e
helm repo add chromadb https://amikos-tech.github.io/chromadb-chart/
helm repo update
# - name: Add helm repo
# run: |
# set -e
# helm repo add chromadb https://amikos-tech.github.io/chromadb-chart/
# helm repo update
- name: Install chromadb
run: |
set -e
helm install chromadb chromadb/chromadb --set chromadb.isPersistent=${{ matrix.isPersistent }} \
--set chromadb.allowReset=${{ matrix.allowReset }} \
helm install chromadb ./charts/chromadb-chart --set chromadb.isPersistent=true \
--set chromadb.allowReset=true \
--set chromadb.chromaVersion=${{ matrix.chroma-version }}
- name: Wait for deployment to be ready
run: |
Expand Down
6 changes: 3 additions & 3 deletions charts/chromadb-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ maintainers:
- name: Amikos Tech
email: [email protected]
url: https://amikos.tech
kubeVersion: ">= 1.23.0 <= 1.27.x"
kubeVersion: ">= 1.23.0 <= 1.28.x || >= 1.28.0-rc.0 <= 1.28.x-rc.x"
home: "https://github.com/amikos-tech/chromadb-chart"
sources:
- "https://github.com/amikos-tech/chromadb-chart"
Expand All @@ -17,6 +17,6 @@ keywords:
- ai/ml
type: application

version: 0.1.13
version: 0.1.14
# chromadb version
appVersion: "0.4.6"
appVersion: "0.4.7"
2 changes: 1 addition & 1 deletion charts/chromadb-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ startupProbe:
initialDelaySeconds: 10

chromadb:
apiVersion: "0.4.6"
apiVersion: "0.4.7"
allowReset: false
isPersistent: true
persistDirectory: /index_data
Expand Down
2 changes: 1 addition & 1 deletion image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG CHROMA_VERSION=0.4.6
ARG CHROMA_VERSION=0.4.7
FROM ghcr.io/chroma-core/chroma:${CHROMA_VERSION} as base

COPY ./image/docker_entrypoint.sh /docker_entrypoint.sh
Expand Down
17 changes: 14 additions & 3 deletions tests/test_chroma.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.DEBUG)
logger = logging.getLogger(__name__)


def get_embedding_function():
"""
Get the embedding function
Expand All @@ -28,18 +30,27 @@ def get_embedding_function():


def test_chroma():
client = chromadb.HttpClient(host="localhost", port=8000)
client = chromadb.HttpClient(host="34.135.246.105", port=8000)
client.heartbeat()
# client.reset()
collection = client.get_or_create_collection("all1-my-documents",
embedding_function=sentence_transformer_ef)
collection.add(documents=["this is a test embedding"], metadatas=[{"type": "page"}], ids=[str(uuid.uuid4())])
assert len(collection.get()['ids']) == 1
transf = sentence_transformer_ef(["this is a test embedding"])
print(transf)
# collection.add(documents=["this is a test embedding"], metadatas=[{"type": "page"}], ids=[str(uuid.uuid4())])
# assert len(collection.get()['ids']) == 1


def test_reset():
client = chromadb.HttpClient(host="localhost", port=8000)
client.heartbeat()
client.reset()


def test_auth():
client = chromadb.HttpClient(host="localhost", port="8000", headers={"Authorization": "Token test"})
client.heartbeat()


if __name__ == '__main__':
test_chroma()

0 comments on commit d1434cb

Please sign in to comment.