Skip to content

Commit d1434cb

Browse files
authored
Support for K8s 1.28.x (#15)
* 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
1 parent d0e0472 commit d1434cb

File tree

7 files changed

+32
-23
lines changed

7 files changed

+32
-23
lines changed

.github/workflows/build-images-dev.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ on:
77
env:
88
REGISTRY: ghcr.io
99
IMAGE_NAME: "ghcr.io/amikos-tech/chromadb-chart/chroma"
10-
LATEST_VERSION: "0.4.6"
10+
LATEST_VERSION: "0.4.7"
1111

1212
jobs:
1313
build-images:
1414
strategy:
1515
matrix:
16-
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6 ]
16+
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7 ]
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout

.github/workflows/build-images.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ on:
77
env:
88
REGISTRY: ghcr.io
99
IMAGE_NAME: "ghcr.io/amikos-tech/chromadb-chart/chroma"
10-
LATEST_VERSION: "0.4.6"
10+
LATEST_VERSION: "0.4.7"
1111

1212
jobs:
1313
build-images:
1414
strategy:
1515
matrix:
16-
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6 ]
16+
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7 ]
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout

.github/workflows/integration-test.yml

+9-11
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ jobs:
1212
release:
1313
strategy:
1414
matrix:
15-
kubernetes-version: [1.23.0, 1.24.0, 1.27.3 ]
16-
isPersistent: [ true, false ]
17-
allowReset: [ true, false ]
18-
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6 ]
15+
kubernetes-version: [1.23.0, 1.24.0, 1.27.3, v1.28.0-rc.0 ]
16+
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7 ]
1917
runs-on: ubuntu-latest
2018
steps:
2119
- name: Checkout
@@ -33,16 +31,16 @@ jobs:
3331
uses: medyagh/setup-minikube@latest
3432
with:
3533
kubernetes-version: ${{ matrix.kubernetes-version }}
36-
- name: Add helm repo
37-
run: |
38-
set -e
39-
helm repo add chromadb https://amikos-tech.github.io/chromadb-chart/
40-
helm repo update
34+
# - name: Add helm repo
35+
# run: |
36+
# set -e
37+
# helm repo add chromadb https://amikos-tech.github.io/chromadb-chart/
38+
# helm repo update
4139
- name: Install chromadb
4240
run: |
4341
set -e
44-
helm install chromadb chromadb/chromadb --set chromadb.isPersistent=${{ matrix.isPersistent }} \
45-
--set chromadb.allowReset=${{ matrix.allowReset }} \
42+
helm install chromadb ./charts/chromadb-chart --set chromadb.isPersistent=true \
43+
--set chromadb.allowReset=true \
4644
--set chromadb.chromaVersion=${{ matrix.chroma-version }}
4745
- name: Wait for deployment to be ready
4846
run: |

charts/chromadb-chart/Chart.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ maintainers:
44
- name: Amikos Tech
55
66
url: https://amikos.tech
7-
kubeVersion: ">= 1.23.0 <= 1.27.x"
7+
kubeVersion: ">= 1.23.0 <= 1.28.x || >= 1.28.0-rc.0 <= 1.28.x-rc.x"
88
home: "https://github.com/amikos-tech/chromadb-chart"
99
sources:
1010
- "https://github.com/amikos-tech/chromadb-chart"
@@ -17,6 +17,6 @@ keywords:
1717
- ai/ml
1818
type: application
1919

20-
version: 0.1.13
20+
version: 0.1.14
2121
# chromadb version
22-
appVersion: "0.4.6"
22+
appVersion: "0.4.7"

charts/chromadb-chart/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ startupProbe:
9393
initialDelaySeconds: 10
9494

9595
chromadb:
96-
apiVersion: "0.4.6"
96+
apiVersion: "0.4.7"
9797
allowReset: false
9898
isPersistent: true
9999
persistDirectory: /index_data

image/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG CHROMA_VERSION=0.4.6
1+
ARG CHROMA_VERSION=0.4.7
22
FROM ghcr.io/chroma-core/chroma:${CHROMA_VERSION} as base
33

44
COPY ./image/docker_entrypoint.sh /docker_entrypoint.sh

tests/test_chroma.py

+14-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.DEBUG)
1212
logger = logging.getLogger(__name__)
13+
14+
1315
def get_embedding_function():
1416
"""
1517
Get the embedding function
@@ -28,18 +30,27 @@ def get_embedding_function():
2830

2931

3032
def test_chroma():
31-
client = chromadb.HttpClient(host="localhost", port=8000)
33+
client = chromadb.HttpClient(host="34.135.246.105", port=8000)
3234
client.heartbeat()
3335
# client.reset()
3436
collection = client.get_or_create_collection("all1-my-documents",
3537
embedding_function=sentence_transformer_ef)
36-
collection.add(documents=["this is a test embedding"], metadatas=[{"type": "page"}], ids=[str(uuid.uuid4())])
37-
assert len(collection.get()['ids']) == 1
38+
transf = sentence_transformer_ef(["this is a test embedding"])
39+
print(transf)
40+
# collection.add(documents=["this is a test embedding"], metadatas=[{"type": "page"}], ids=[str(uuid.uuid4())])
41+
# assert len(collection.get()['ids']) == 1
42+
3843

3944
def test_reset():
4045
client = chromadb.HttpClient(host="localhost", port=8000)
4146
client.heartbeat()
4247
client.reset()
4348

49+
50+
def test_auth():
51+
client = chromadb.HttpClient(host="localhost", port="8000", headers={"Authorization": "Token test"})
52+
client.heartbeat()
53+
54+
4455
if __name__ == '__main__':
4556
test_chroma()

0 commit comments

Comments
 (0)