Skip to content

Commit 499e654

Browse files
committed
Replace znly wit buf
1 parent 250e9d1 commit 499e654

File tree

23 files changed

+4451
-4735
lines changed

23 files changed

+4451
-4735
lines changed

cmd/db-manager/v1beta1/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ const (
4242
var dbIf common.KatibDBInterface
4343

4444
type server struct {
45+
health_pb.HealthServer
46+
api_pb.DBManagerServer
4547
}
4648

4749
// Report a log of Observations for a Trial.

cmd/suggestion/goptuna/v1beta1/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const (
3232
)
3333

3434
type healthService struct {
35+
health_pb.HealthServer
3536
}
3637

3738
func (s *healthService) Check(ctx context.Context, in *health_pb.HealthCheckRequest) (*health_pb.HealthCheckResponse, error) {
@@ -46,7 +47,8 @@ func main() {
4647
klog.Fatalf("Failed to listen: %v", err)
4748
}
4849
srv := grpc.NewServer()
49-
api_v1_beta1.RegisterSuggestionServer(srv, suggestion.NewSuggestionService())
50+
api_v1_beta1.RegisterSuggestionServer(srv, &suggestion.SuggestionService{}) // Updated code
51+
5052
health_pb.RegisterHealthServer(srv, &healthService{})
5153

5254
klog.Infof("Start Goptuna suggestion service: %s", address)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: v1
2+
plugins:
3+
- plugin: buf.build/protocolbuffers/python:v26.0
4+
out: python
5+
- plugin: buf.build/grpc/python:v1.62.1
6+
out: python
7+
- plugin: buf.build/protocolbuffers/go:v1.33.0
8+
out: ./
9+
- plugin: buf.build/grpc/go
10+
out: ./

pkg/apis/manager/health/buf.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: v1
2+
breaking:
3+
use:
4+
- FILE
5+
lint:
6+
use:
7+
- DEFAULT

pkg/apis/manager/health/build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ set -e
2020
cd "$(dirname "$0")"
2121

2222
proto="health.proto"
23-
docker run -i --rm -v "$PWD:$PWD" -w "$PWD" znly/protoc --python_out=plugins=grpc:./python --go_out=plugins=grpc:. -I. $proto
24-
docker run -i --rm -v "$PWD:$PWD" -w "$PWD" znly/protoc --plugin=protoc-gen-grpc=/usr/bin/grpc_python_plugin --python_out=./python --grpc_out=./python -I. $proto
23+
buf generate --template=buf.gen.yaml $proto

0 commit comments

Comments
 (0)