Skip to content

Commit

Permalink
Move Protobuf contracts to top-level (#39)
Browse files Browse the repository at this point in the history
* Move Proto contracts to top-level

* Rename operator-scheduler APIs dir for consistency

* Use symlink for scheduler APIs in operator

* Fix import path in operator to use same generated Go as scheduler

* Add Make target for scheduler Protos

* Add Make targets for other Protos + simplify config

* Use Proto import paths relative to import base (API root dir)

* Simplify Proto generation further for API contracts

* Fix Proto import paths in operator

* Regenerate Go files from Protos

* Remove Proto-generation Make targets from app-specific Makefiles

The Proto-to-Golang generation is now handled within the API contracts dir,
thus the application-specific generation is redundant and duplicative.

* Fix Proto import path in proxy notebook

* Fix Proto import path in local agent notebook

* Fix Proto import path in local scheduler notebook

* Fix Proto import path in k8s scheduler notebook

* Add symlink for scheduler to API contracts

* Remove leftover API experiment file
  • Loading branch information
agrski authored Dec 22, 2021
1 parent a0be779 commit 59a20b3
Show file tree
Hide file tree
Showing 28 changed files with 421 additions and 2,216 deletions.
16 changes: 16 additions & 0 deletions apis/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PROTOC_IMPORT_PATH := -I.

PROTOC_GO_PATH := --go_opt=paths=source_relative
PROTOC_GO_OUT := --go_out=.
PROTOC_GO_GRPC_PATH := --go-grpc_opt=paths=source_relative
PROTOC_GO_GRPC_OUT := --go-grpc_out=.
PROTOC_GO_OPTIONS = $(PROTOC_GO_PATH) $(PROTOC_GO_OUT) $(PROTOC_GO_GRPC_PATH) $(PROTOC_GO_GRPC_OUT)

.PHONY: build
build:
protoc \
$(PROTOC_IMPORT_PATH) \
$(PROTOC_GO_OPTIONS) \
./mlops/agent/agent.proto \
./mlops/proxy/proxy.proto \
./mlops/scheduler/scheduler.proto
File renamed without changes.
312 changes: 157 additions & 155 deletions scheduler/apis/mlops/agent/agent.pb.go → apis/mlops/agent/agent.pb.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package seldon.mlops.agent;

option go_package = "github.com/seldonio/seldon-core/scheduler/apis/mlops/agent";

import "scheduler.proto";
import "mlops/scheduler/scheduler.proto";

// [START Messages]

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package seldon.mlops.proxy;

option go_package = "github.com/seldonio/seldon-core/scheduler/apis/mlops/proxy";

import "scheduler.proto";
import "mlops/scheduler/scheduler.proto";

// [START Messages]

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes
Loading

0 comments on commit 59a20b3

Please sign in to comment.