Skip to content

Commit

Permalink
refactor: replace grpc/grpc-go with bufbuild/connect-go (#18)
Browse files Browse the repository at this point in the history
This will let us call directly into gRPC servers from TypeScript.

This refactoring was mostly mechanical modulo a (seeming) bug with bidi
streams in Connect that causes them to just hang. I routed around it by
splitting SyncSchema into two methods, {Pull,Push}Schema.

Fixes #17
  • Loading branch information
alecthomas authored May 2, 2023
1 parent 5440aa6 commit 5ad72bb
Show file tree
Hide file tree
Showing 39 changed files with 1,228 additions and 1,336 deletions.
21 changes: 17 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"problemMatcher": [
"$go"
],
"group": {
"kind": "build",
"isDefault": true
},
"group": "build",
"detail": "cd ${workspaceFolder}; go test ./..."
},
{
Expand All @@ -33,6 +30,22 @@
"isDefault": true
},
"detail": "cd ${workspaceFolder}; golangci-lint run"
},
{
"type": "go",
"label": "go: build workspace",
"command": "build",
"args": [
"./..."
],
"problemMatcher": [
"$go"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "cd /Users/alec/dev/ftl; go build ./..."
}
]
}
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @alecthomas @dhanji
* @alecthomas @dhanji @wesbillman
24 changes: 13 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ SCHEMA_IN = schema/schema.go schema/protobuf.go
SCHEMA_OUT = protos/xyz/block/ftl/v1/schema/schema.proto

SQLC_IN = sqlc.yaml \
backplane/internal/sql/schema/*.sql \
backplane/internal/sql/queries.sql
backplane/internal/sql/schema/*.sql \
backplane/internal/sql/queries.sql
SQLC_OUT = backplane/internal/sql/db.go \
$(shell grep -q copyfrom backplane/internal/sql/queries.sql && echo backplane/internal/sql/copyfrom.go) \
backplane/internal/sql/models.go \
backplane/internal/sql/queries.sql.go

PROTO_IN = protos/xyz/block/ftl/v1/ftl.proto \
protos/xyz/block/ftl/v1/schema/schema.proto
PROTO_OUT = protos/xyz/block/ftl/v1/ftl_grpc.pb.go \
protos/xyz/block/ftl/v1/schema/schema.pb.go \
protos/xyz/block/ftl/v1/ftl.pb.go
$(shell grep -q copyfrom backplane/internal/sql/queries.sql && echo backplane/internal/sql/copyfrom.go) \
backplane/internal/sql/models.go \
backplane/internal/sql/queries.sql.go

PROTO_IN = protos/buf.yaml \
protos/buf.gen.yaml \
protos/xyz/block/ftl/v1/ftl.proto \
protos/xyz/block/ftl/v1/schema/schema.proto
PROTO_OUT = protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go \
protos/xyz/block/ftl/v1/schema/schema.pb.go \
protos/xyz/block/ftl/v1/ftl.pb.go


.DEFAULT_GOAL := help
Expand Down
Loading

0 comments on commit 5ad72bb

Please sign in to comment.