Skip to content

Commit

Permalink
[CLN] Fix CI and a couple other cleanups (chroma-core#1788)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- `port-forward` to `-lb` services correctly. This fixes the hanging CI.
	 - Remove unused var in cluster-test.sh.
- Remove `coordinator.port` helm chart config for consistency -- we can
add them all later.
	 - Fix tiltfile deps so the cluster comes up correctly.
- Explicitly pass coordinator port to sysdb client instantiation in
tests.

## Test plan
*How are these changes tested?*

- [ ] Tests pass locally with `pytest` for python, `yarn test` for js

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
  • Loading branch information
beggers committed Feb 28, 2024
1 parent ed7d8f8 commit e0dde68
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ k8s_resource(
# Production Chroma
k8s_resource('postgres', resource_deps=['k8s_setup'], labels=["infrastructure"])
k8s_resource('pulsar', resource_deps=['k8s_setup'], labels=["infrastructure"], port_forwards=['6650:6650', '8080:8080'])
k8s_resource('migration', resource_deps=['postgres'], labels=["chroma"])
k8s_resource('migration', resource_deps=['postgres'], labels=["infrastructure"])
k8s_resource('logservice', resource_deps=['migration'], labels=["chroma"])
k8s_resource('frontend-server', resource_deps=['pulsar'],labels=["chroma"], port_forwards=8000 )
k8s_resource('coordinator', resource_deps=['pulsar'], labels=["chroma"], port_forwards=50051)
k8s_resource('coordinator', resource_deps=['pulsar', 'frontend-server', 'migration'], labels=["chroma"], port_forwards=50051)
k8s_resource('worker', resource_deps=['coordinator'],labels=["chroma"])

# Extra stuff to make debugging and testing easier
Expand Down
9 changes: 3 additions & 6 deletions bin/cluster-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ export CHROMA_CLUSTER_TEST_ONLY=1
export CHROMA_SERVER_HOST=localhost:8000
export PULSAR_BROKER_URL=localhost
export CHROMA_COORDINATOR_HOST=localhost
export CHROMA_SERVER_GRPC_PORT="50051"



echo "Chroma Server is running at port $CHROMA_SERVER_HOST"
echo "Pulsar Broker is running at port $PULSAR_BROKER_URL"
echo "Chroma Coordinator is running at port $CHROMA_COORDINATOR_HOST"

kubectl -n chroma port-forward svc/coordinator 50051:50051 &
kubectl -n chroma port-forward svc/pulsar 6650:6650 &
kubectl -n chroma port-forward svc/pulsar 8080:8080 &
kubectl -n chroma port-forward svc/coordinator-lb 50051:50051 &
kubectl -n chroma port-forward svc/pulsar-lb 6650:6650 &
kubectl -n chroma port-forward svc/pulsar-lb 8080:8080 &
kubectl -n chroma port-forward svc/frontend-server 8000:8000 &

"$@"
1 change: 1 addition & 0 deletions chromadb/test/db/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def grpc_with_real_server() -> Generator[SysDB, None, None]:
Settings(
allow_reset=True,
chroma_collection_assignment_policy_impl="chromadb.test.db.test_system.MockAssignmentPolicy",
chroma_server_grpc_port=50051,
)
)
client = system.instance(GrpcSysDB)
Expand Down
2 changes: 1 addition & 1 deletion k8s/distributed-chroma/templates/coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ metadata:
spec:
ports:
- name: grpc
port: {{ .Values.coordinator.port }}
port: 50001
targetPort: grpc
selector:
app: coordinator
Expand Down
1 change: 0 additions & 1 deletion k8s/distributed-chroma/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ namespace: "chroma"

coordinator:
replicaCount: 1
port: 50051

0 comments on commit e0dde68

Please sign in to comment.