Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind against v19 vitess protos #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21-bookworm
FROM golang:1.22-bookworm

RUN apt-get update && apt-get upgrade -y && \
apt-get install -y ruby && gem install license_finder && \
Expand Down
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,11 @@ $(BIN)/gofumpt: Makefile | $(BIN)
$(BIN)/staticcheck: Makefile | $(BIN)
$(TOOL_INSTALL) honnef.co/go/tools/cmd/staticcheck@v0.4.6

$(BIN)/enumcheck: Makefile | $(BIN)
$(TOOL_INSTALL) loov.dev/enumcheck@v0.0.0-20220314183541-8aa7b787306e

$(BIN)/govulncheck: Makefile | $(BIN)
$(TOOL_INSTALL) golang.org/x/vuln/cmd/govulncheck@v1.0.1

$(BIN)/buf: Makefile | $(BIN)
$(TOOL_INSTALL) github.com/bufbuild/buf/cmd/buf@v1.28.1
$(TOOL_INSTALL) github.com/bufbuild/buf/cmd/buf@v1.34.0

$(BIN)/yq: Makefile | $(BIN)
$(TOOL_INSTALL) github.com/mikefarah/yq/v4@v4.30.8
Expand All @@ -61,7 +58,6 @@ tools: \
$(PROTO_TOOLS) \
$(BIN)/gofumpt \
$(BIN)/staticcheck \
$(BIN)/enumcheck \
$(BIN)/govulncheck \
$(BIN)/yq

Expand All @@ -86,7 +82,7 @@ else
fd . -t f -e yaml -e yml -x $(BIN)/yq -iP eval-all . {} \;
endif

lint: lint-vet lint-staticcheck lint-enumcheck lint-govulncheck lint-proto
lint: lint-vet lint-staticcheck lint-govulncheck lint-proto

lint-vet:
go vet ./...
Expand All @@ -107,7 +103,7 @@ tests:
go test -v ./...

update-proto: $(BIN)/buf
$< mod update $(PROTO_SRC)
$< dep update $(PROTO_SRC)

push-proto: $(BIN)/buf
$< push $(PROTO_SRC)
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module github.com/planetscale/psdb

go 1.19
go 1.22

require (
connectrpc.com/connect v1.11.0
connectrpc.com/connect v1.14.0
github.com/klauspost/connect-compress/v2 v2.0.0
github.com/planetscale/vitess-types v0.0.0-20230808182149-da48f87540fa
github.com/planetscale/vitess-types v0.0.0-20240719025517-0912af807466
github.com/segmentio/asm v1.2.0
github.com/stretchr/testify v1.7.0
google.golang.org/protobuf v1.31.0
google.golang.org/protobuf v1.34.2
)

require (
Expand Down
21 changes: 11 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
connectrpc.com/connect v1.11.0 h1:Av2KQXxSaX4vjqhf5Cl01SX4dqYADQ38eBtr84JSUBk=
connectrpc.com/connect v1.11.0/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo=
connectrpc.com/connect v1.14.0 h1:PDS+J7uoz5Oui2VEOMcfz6Qft7opQM9hPiKvtGC01pA=
connectrpc.com/connect v1.14.0/go.mod h1:uoAq5bmhhn43TwhaKdGKN/bZcGtzPW1v+ngDTn5u+8s=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/connect-compress/v2 v2.0.0 h1:L7TVsLa6Oo9Hkkb6r3DwSrhBbcWlXjneqBj7fCRXviU=
github.com/klauspost/connect-compress/v2 v2.0.0/go.mod h1:604CD9JSAjGqtVzCM4SRgM/9TFTkWBcp+2wlQfGyJ6c=
github.com/planetscale/vitess-types v0.0.0-20230808182149-da48f87540fa h1:juLtMTt8CSth379yqZZh1v8JP9UpI/wQlBpsfo/qhdE=
github.com/planetscale/vitess-types v0.0.0-20230808182149-da48f87540fa/go.mod h1:xzNXoqcNPoV2oI52AwXf+213wzzf46KSOAjGXHrju7U=
github.com/planetscale/vitess-types v0.0.0-20240719025517-0912af807466 h1:/QuA5bm+6PqvSO1K4k3/d6v2g9+EAqMPIwJgroK4LMM=
github.com/planetscale/vitess-types v0.0.0-20240719025517-0912af807466/go.mod h1:uZSnwJb6bb4mPXSB1ECkfip6wiw3g8+dHnZgrzjST5E=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
Expand Down
4 changes: 2 additions & 2 deletions proto-src/buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ deps:
- remote: buf.build
owner: planetscale
repository: vitess
commit: 9c148f260a264212bb8f6e1343e87685
digest: shake256:766938ee30eaf36984dad02134bce5d20957c997f78afa580d2e3126dc4518eeb4b2bd5ade888b82e43df597f9a12ed512b488f89ace96d945586234c6c665bf
commit: 33ccc0d49d174b07b7b3b421c964e82a
digest: shake256:860d4e0bad0068dbe7181fd3580d47cd303f2c53fb956326bc448b8c9302171573577cd331edad2319d315e5d433744f9b9535f530d44b9088dac6198e8942fe
2 changes: 1 addition & 1 deletion proto-src/buf.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: v1
name: buf.build/planetscale/psdb
deps:
- buf.build/planetscale/vitess
- buf.build/planetscale/vitess:v19
breaking:
use:
- FILE
Expand Down
22 changes: 11 additions & 11 deletions proto-src/psdb/v1alpha1/database.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ syntax = "proto3";
package psdb.v1alpha1;

import "psdb/data/v1/data.proto";
import "vitess/query/v16/query.proto";
import "vitess/vtgate/v16/vtgate.proto";
import "vitess/vtrpc/v16/vtrpc.proto";
import "vitess/query/v19/query.proto";
import "vitess/vtgate/v19/vtgate.proto";
import "vitess/vtrpc/v19/vtrpc.proto";

option go_package = "github.com/planetscale/psdb/types/psdb/v1alpha1;psdbv1alpha1";

Expand All @@ -26,14 +26,14 @@ message ExecuteRequest {
Session session = 1;

string query = 2;
map<string, vitess.query.v16.BindVariable> bind_variables = 3;
map<string, vitess.query.v19.BindVariable> bind_variables = 3;
}

message ExecuteResponse {
Session session = 1;

vitess.query.v16.QueryResult result = 2;
vitess.vtrpc.v16.RPCError error = 3;
vitess.query.v19.QueryResult result = 2;
vitess.vtrpc.v19.RPCError error = 3;

// optional timing, in seconds, for the response, if empty or 0, this wasn't set
// does not exist in the response from a StreamExecute.
Expand All @@ -44,14 +44,14 @@ message PrepareRequest {
Session session = 1;

string query = 2;
map<string, vitess.query.v16.BindVariable> bind_variables = 3;
map<string, vitess.query.v19.BindVariable> bind_variables = 3;
}

message PrepareResponse {
Session session = 1;

repeated vitess.query.v16.Field fields = 2;
vitess.vtrpc.v16.RPCError error = 3;
repeated vitess.query.v19.Field fields = 2;
vitess.vtrpc.v19.RPCError error = 3;
}

message CloseSessionRequest {
Expand All @@ -60,12 +60,12 @@ message CloseSessionRequest {

message CloseSessionResponse {
Session session = 1;
vitess.vtrpc.v16.RPCError error = 2;
vitess.vtrpc.v19.RPCError error = 2;
}

message Session {
bytes signature = 1;
vitess.vtgate.v16.Session vitess_session = 2;
vitess.vtgate.v19.Session vitess_session = 2;
}

service Database {
Expand Down
16 changes: 8 additions & 8 deletions proto-src/psdbconnect/v1alpha1/connect.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ syntax = "proto3";

package psdbconnect.v1alpha1;

import "vitess/query/v16/query.proto";
import "vitess/vtrpc/v16/vtrpc.proto";
import "vitess/query/v19/query.proto";
import "vitess/vtrpc/v19/vtrpc.proto";

option go_package = "github.com/planetscale/psdb/types/psdbconnect/v1alpha1;psdbconnectv1alpha1";

Expand Down Expand Up @@ -46,25 +46,25 @@ message SyncRequest {
// DeletedRow denotes a row that is deleted from the table referenced in the SyncRequest
message DeletedRow {
// This result will contain only the primary keys from the deleted row.
vitess.query.v16.QueryResult result = 1;
vitess.query.v19.QueryResult result = 1;
}

// Updated denotes a row that is updated in the table referenced in the SyncRequest
message UpdatedRow {
// All values of the table before the update was made.
vitess.query.v16.QueryResult before = 1;
vitess.query.v19.QueryResult before = 1;
// All values of the table ater the update was made.
vitess.query.v16.QueryResult after = 2;
vitess.query.v19.QueryResult after = 2;
}

// SyncResponse denotes a response to the SyncRequest
message SyncResponse {
// An array of rows that denote inserts into the table.
repeated vitess.query.v16.QueryResult result = 1;
repeated vitess.query.v19.QueryResult result = 1;
// A state object to use that denotes the current state of the SyncResponse.
TableCursor cursor = 2;
// Any errors encountered in streaming data from the table.
vitess.vtrpc.v16.RPCError error = 3;
vitess.vtrpc.v19.RPCError error = 3;
// An array of rows that denote deletes from the table.
repeated DeletedRow deletes = 4;
// An array of rows that denote updates to the table.
Expand All @@ -85,7 +85,7 @@ message TableCursor {
// the SyncRequest will fail.
string position = 3;
// Any known last known primary key values from the a previous session.
vitess.query.v16.QueryResult last_known_pk = 4;
vitess.query.v19.QueryResult last_known_pk = 4;
}

service Connect {
Expand Down
4 changes: 2 additions & 2 deletions types/psdb/data/v1/data.pb.go

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

Loading
Loading