Skip to content

Commit

Permalink
[CLN] Move go/coordinator to go/ since there's more stuff there (#…
Browse files Browse the repository at this point in the history
…1769)

## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- Move `go/coordinator` to `go/` since more than just the Coordinator
lives there now.

## 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 authored Feb 26, 2024
1 parent 3908b7b commit 1c91ec0
Show file tree
Hide file tree
Showing 119 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chroma-cluster-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ jobs:
- name: Start Tilt
run: tilt ci
- name: Test
run: bin/cluster-test.sh bash -c 'cd go/coordinator && go test -timeout 30s -run ^TestNodeWatcher$ github.com/chroma/chroma-coordinator/internal/memberlist_manager'
run: bin/cluster-test.sh bash -c 'cd go && go test -timeout 30s -run ^TestNodeWatcher$ github.com/chroma/chroma-coordinator/internal/memberlist_manager'
2 changes: 1 addition & 1 deletion .github/workflows/chroma-coordinator-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Build and test
run: cd go/coordinator && make test
run: cd go && make test
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

**/__pycache__

go/coordinator/bin/
go/coordinator/**/testdata/
go/bin/
go/**/testdata/

*.log

Expand Down
4 changes: 2 additions & 2 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ update_settings(max_parallel_updates=6)

docker_build('migration',
context='.',
dockerfile='./go/coordinator/Dockerfile.migration'
dockerfile='./go/Dockerfile.migration'
)

docker_build('coordinator',
context='.',
dockerfile='./go/coordinator/Dockerfile'
dockerfile='./go/Dockerfile'
)

docker_build('server',
Expand Down
2 changes: 1 addition & 1 deletion bin/reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

eval $(minikube -p chroma-test docker-env)

docker build -t chroma-coordinator:latest -f go/coordinator/Dockerfile .
docker build -t chroma-coordinator:latest -f go/Dockerfile .

kubectl delete deployment coordinator -n chroma

Expand Down
2 changes: 1 addition & 1 deletion chromadb/ingest/impl/simple_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def assign_collection(self, collection_id: UUID) -> str:

@overrides
def get_topics(self) -> Sequence[str]:
# Mirrors go/coordinator/internal/coordinator/assignment_policy.go
# Mirrors go/internal/coordinator/assignment_policy.go
return [
f"persistent://{self._tenant_id}/{self._topic_ns}/chroma_log_{i}"
for i in range(16)
Expand Down
6 changes: 3 additions & 3 deletions go/coordinator/Dockerfile → go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ FROM golang:1.20-alpine3.18 as build
WORKDIR /src/chroma-coordinator
RUN apk add --no-cache make git build-base bash

ADD ./go/coordinator/go.mod ./go.mod
ADD ./go/coordinator/go.sum ./go.sum
ADD ./go/go.mod ./go.mod
ADD ./go/go.sum ./go.sum
ENV PATH=$PATH:/go/bin
RUN go mod download

ADD ./go/coordinator ./
ADD ./go/ ./
ENV GOCACHE=/root/.cache/go-build
RUN --mount=type=cache,target="/root/.cache/go-build" make

Expand Down
4 changes: 4 additions & 0 deletions go/Dockerfile.migration
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM arigaio/atlas:latest
workdir /app
COPY ./go/migrations migrations
COPY ./go/atlas.hcl atlas.hcl
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions go/coordinator/Dockerfile.migration

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions idl/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ proto_python:
proto_go:
@echo "Generating gRPC code for golang..."
@protoc \
--go_out=../go/coordinator/internal/proto/coordinatorpb \
--go_out=../go/internal/proto/coordinatorpb \
--go_opt paths=source_relative \
--plugin protoc-gen-go="${GOPATH}/bin/protoc-gen-go" \
--go-grpc_out=../go/coordinator/internal/proto/coordinatorpb \
--go-grpc_out=../go/internal/proto/coordinatorpb \
--go-grpc_opt paths=source_relative \
--plugin protoc-gen-go-grpc="${GOPATH}/bin/protoc-gen-go-grpc" \
chromadb/proto/*.proto
@mv ../go/coordinator/internal/proto/coordinatorpb/chromadb/proto/logservice*.go ../go/coordinator/internal/proto/logservicepb/
@mv ../go/coordinator/internal/proto/coordinatorpb/chromadb/proto/*.go ../go/coordinator/internal/proto/coordinatorpb/
@rm -rf ../go/coordinator/internal/proto/coordinatorpb/chromadb
@mv ../go/internal/proto/coordinatorpb/chromadb/proto/logservice*.go ../go/internal/proto/logservicepb/
@mv ../go/internal/proto/coordinatorpb/chromadb/proto/*.go ../go/internal/proto/coordinatorpb/
@rm -rf ../go/internal/proto/coordinatorpb/chromadb
@echo "Done"

0 comments on commit 1c91ec0

Please sign in to comment.