Skip to content

Commit

Permalink
fix: Fixed chart issue with boolean flags
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
tazarov committed Jul 29, 2023
1 parent a9d741d commit cd09329
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ on:
push:
branches:
- develop
- main
jobs:
release:
strategy:
matrix:
kubernetes-version: [ 1.24.0, 1.27.3 ]
isPersistent: [ true, false ]
allowReset: [ true, false ]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -34,7 +37,7 @@ jobs:
- name: Install chromadb
run: |
set -e
helm install chromadb chromadb/chromadb
helm install chromadb chromadb/chromadb --set chromadb.isPersistent=${{ matrix.isPersistent }} --set chromadb.allowReset=${{ matrix.allowReset }}
- name: Wait for deployment to be ready
run: |
set -e
Expand Down
2 changes: 1 addition & 1 deletion charts/chromadb-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ keywords:
- ai/ml
type: application

version: 0.1.5
version: 0.1.6
# chromadb version
appVersion: "0.4.3"
10 changes: 5 additions & 5 deletions charts/chromadb-chart/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ spec:
fieldPath: metadata.name
- name: IS_PERSISTENT
value: "{{ .Values.chromadb.isPersistent }}"
{{- if eq .Values.chromadb.isPersistent "true" }}
{{- if eq .Values.chromadb.isPersistent true }}
- name: PERSIST_DIRECTORY
value: "{{ .Values.chromadb.persistDirectory }}"
{{- end }}
- name: ALLOW_RESET
value: "{{ .Values.chromadb.allowReset | default "false" }}"
value: "{{ .Values.chromadb.allowReset | default false}}"
- name: ANONYMIZED_TELEMETRY
value: "{{ .Values.chromadb.anonymizedTelemetry | default "false" }}"
value: "{{ .Values.chromadb.anonymizedTelemetry | default false }}"
{{- if .Values.chromadb.corsAllowOrigins }}
- name: CHROMA_SERVER_CORS_ALLOW_ORIGINS
value: '{{ .Values.chromadb.corsAllowOrigins | join "\",\"" | printf "[\"%s\"]"}}'
Expand Down Expand Up @@ -79,7 +79,7 @@ spec:
- mountPath: /chroma/log_config.yaml
name: log-config
subPath: log_config.yaml
{{- if eq .Values.chromadb.isPersistent "true" }}
{{- if eq .Values.chromadb.isPersistent true }}
- mountPath: "{{.Values.chromadb.persistDirectory}}"
name: data
{{- end }}
Expand All @@ -106,7 +106,7 @@ spec:
configMap:
name: "{{ include "chart.fullname" . }}-log-config"
defaultMode: 0644
{{- if eq .Values.chromadb.isPersistent "true" }}
{{- if eq .Values.chromadb.isPersistent true }}
volumeClaimTemplates:
- metadata:
name: data
Expand Down
6 changes: 3 additions & 3 deletions charts/chromadb-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ startupProbe:
initialDelaySeconds: 10

chromadb:
allowReset: "false"
isPersistent: "true"
allowReset: false
isPersistent: true
persistDirectory: /index_data
logConfigFileLocation: config/log_config.yaml
anonymizedTelemetry: "false"
anonymizedTelemetry: false
corsAllowOrigins:
- "*"
# apiImpl: "chromadb.api.fastapi.FastAPI" # this doesn't seem to be working.
Expand Down
1 change: 1 addition & 0 deletions tests/test_chroma.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
def test_chroma():
client = chromadb.HttpClient(host="localhost", port=8000)
client.heartbeat()
client.reset()
# collection = client.create_collection("all1-my-documents")


Expand Down

0 comments on commit cd09329

Please sign in to comment.