Skip to content

Commit

Permalink
Fix coordinator segfault, gitignore tests, CI (#1553)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- Fix coordinator segfault on start due to trying to copy a value into
non-initialized struct.
	 - Add coordinator binary and testdata to `.gitignore`
 - New functionality
	 - Coordinator CI

## 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 Dec 20, 2023
1 parent 9f28330 commit a02a0d7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/chroma-coordinator-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Chroma Coordinator Tests

on:
push:
branches:
- main
pull_request:
branches:
- main
- '**'
workflow_dispatch:

jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build and test
run: cd go/coordinator && make test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

**/__pycache__

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

*.log

**/data__nogit
Expand Down
8 changes: 5 additions & 3 deletions go/coordinator/cmd/grpccoordinator/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import (
"io"
"time"

"github.com/chroma/chroma-coordinator/cmd/flag"
"github.com/chroma/chroma-coordinator/internal/grpccoordinator"
"github.com/chroma/chroma-coordinator/internal/grpccoordinator/grpcutils"
"github.com/chroma/chroma-coordinator/internal/utils"
"github.com/spf13/cobra"
)

var (
conf = grpccoordinator.Config{}
conf = grpccoordinator.Config{
GrpcConfig: &grpcutils.GrpcConfig{},
}

Cmd = &cobra.Command{
Use: "coordinator",
Expand All @@ -24,7 +26,7 @@ var (
func init() {

// GRPC
flag.GRPCAddr(Cmd, &conf.GrpcConfig.BindAddress)
Cmd.Flags().StringVar(&conf.GrpcConfig.BindAddress, "grpc-bind-address", "", "GRPC bind address")

// System Catalog
Cmd.Flags().StringVar(&conf.SystemCatalogProvider, "system-catalog-provider", "memory", "System catalog provider")
Expand Down

0 comments on commit a02a0d7

Please sign in to comment.