Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update proto api method (#10956)

ecmadaob233bcb76335
diff --git a/backend/server/routers.go b/backend/server/routers.go
index e2557eb7df..e253f3008a 100644
--- a/backend/server/routers.go
+++ b/backend/server/routers.go
@@ -77,7 +77,7 @@ func configureEchoRouters(e *echo.Echo, grpcServer *grpc.Server, mux *grpcruntim
e.GET("/healthz", func(c echo.Context) error {
return c.String(http.StatusOK, "OK")
})
- e.GET("/v1:adminExecute", echo.WrapHandler(wsproxy.WebsocketProxy(
+ e.POST("/v1:adminExecute", echo.WrapHandler(wsproxy.WebsocketProxy(
mux,
wsproxy.WithTokenCookieName("access-token"),
// 10M.
diff --git a/frontend/src/types/proto/v1/sql_service.ts b/frontend/src/types/proto/v1/sql_service.ts
index f65987762e..9d2adb7bce 100644
--- a/frontend/src/types/proto/v1/sql_service.ts
+++ b/frontend/src/types/proto/v1/sql_service.ts
@@ -2351,7 +2351,7 @@ export const SQLServiceDefinition = {
options: {
_unknownFields: {
578365826: [
- new Uint8Array([18, 18, 16, 47, 118, 49, 58, 97, 100, 109, 105, 110, 69, 120, 101, 99, 117, 116, 101]),
+ new Uint8Array([18, 34, 16, 47, 118, 49, 58, 97, 100, 109, 105, 110, 69, 120, 101, 99, 117, 116, 101]),
],
},
},
diff --git a/frontend/src/types/proto/v1/worksheet_service.ts b/frontend/src/types/proto/v1/worksheet_service.ts
index df3f3947f4..cad6068e54 100644
--- a/frontend/src/types/proto/v1/worksheet_service.ts
+++ b/frontend/src/types/proto/v1/worksheet_service.ts
@@ -1281,7 +1281,7 @@ export const WorksheetServiceDefinition = {
122,
101,
114,
- 26,
+ 50,
48,
47,
118,
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index d97e945923..9de8ff0c90 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -27288,7 +27288,7 @@ The types come from the Golang SQL driver. </p></td>
<tr>
<td>AdminExecute</td>
- <td>GET</td>
+ <td>POST</td>
<td>/v1:adminExecute</td>
<td></td>
</tr>
@@ -27884,7 +27884,7 @@ Format: worksheets/{worksheet} </p></td>
<tr>
<td>UpdateWorksheetOrganizer</td>
- <td>PUT</td>
+ <td>PATCH</td>
<td>/v1/{organizer.worksheet=worksheets/*}/organizer</td>
<td>organizer</td>
</tr>
diff --git a/proto/generated-go/v1/sql_service.pb.go b/proto/generated-go/v1/sql_service.pb.go
index c4d21131ac..28d920cbeb 100644
--- a/proto/generated-go/v1/sql_service.pb.go
+++ b/proto/generated-go/v1/sql_service.pb.go
@@ -1768,7 +1768,7 @@ var file_v1_sql_service_proto_rawDesc = []byte{
0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79,
0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45,
0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x3a, 0x61, 0x64, 0x6d, 0x69,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x3a, 0x61, 0x64, 0x6d, 0x69,
0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x78, 0x0a, 0x0d,
0x44, 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x21, 0x2e,
0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66,
diff --git a/proto/generated-go/v1/sql_service.pb.gw.go b/proto/generated-go/v1/sql_service.pb.gw.go
index 174c01115f..a92c3c6b5b 100644
--- a/proto/generated-go/v1/sql_service.pb.gw.go
+++ b/proto/generated-go/v1/sql_service.pb.gw.go
@@ -380,7 +380,7 @@ func RegisterSQLServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
})
- mux.Handle("GET", pattern_SQLService_AdminExecute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_SQLService_AdminExecute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -597,7 +597,7 @@ func RegisterSQLServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
})
- mux.Handle("GET", pattern_SQLService_AdminExecute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_SQLService_AdminExecute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
diff --git a/proto/generated-go/v1/worksheet_service.pb.go b/proto/generated-go/v1/worksheet_service.pb.go
index 94fa3c9389..651204fdef 100644
--- a/proto/generated-go/v1/worksheet_service.pb.go
+++ b/proto/generated-go/v1/worksheet_service.pb.go
@@ -852,7 +852,7 @@ var file_v1_worksheet_service_proto_rawDesc = []byte{
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
0x65, 0x72, 0x22, 0x5b, 0xda, 0x41, 0x15, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72,
0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x3d, 0x3a, 0x09, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x1a, 0x30, 0x2f,
+ 0x02, 0x3d, 0x3a, 0x09, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x32, 0x30, 0x2f,
0x76, 0x31, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x77, 0x6f,
0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x3d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65,
0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x12,
diff --git a/proto/generated-go/v1/worksheet_service.pb.gw.go b/proto/generated-go/v1/worksheet_service.pb.gw.go
index dda320be06..f4236fdc36 100644
--- a/proto/generated-go/v1/worksheet_service.pb.gw.go
+++ b/proto/generated-go/v1/worksheet_service.pb.gw.go
@@ -253,9 +253,20 @@ func request_WorksheetService_UpdateWorksheetOrganizer_0(ctx context.Context, ma
var protoReq UpdateWorksheetOrganizerRequest
var metadata runtime.ServerMetadata
- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Organizer); err != nil && err != io.EOF {
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Organizer); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {
+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Organizer); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ } else {
+ protoReq.UpdateMask = fieldMask
+ }
+ }
var (
val string
@@ -290,9 +301,20 @@ func local_request_WorksheetService_UpdateWorksheetOrganizer_0(ctx context.Conte
var protoReq UpdateWorksheetOrganizerRequest
var metadata runtime.ServerMetadata
- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Organizer); err != nil && err != io.EOF {
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Organizer); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {
+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Organizer); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ } else {
+ protoReq.UpdateMask = fieldMask
+ }
+ }
var (
val string
@@ -481,7 +503,7 @@ func RegisterWorksheetServiceHandlerServer(ctx context.Context, mux *runtime.Ser
})
- mux.Handle("PUT", pattern_WorksheetService_UpdateWorksheetOrganizer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("PATCH", pattern_WorksheetService_UpdateWorksheetOrganizer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -660,7 +682,7 @@ func RegisterWorksheetServiceHandlerClient(ctx context.Context, mux *runtime.Ser
})
- mux.Handle("PUT", pattern_WorksheetService_UpdateWorksheetOrganizer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("PATCH", pattern_WorksheetService_UpdateWorksheetOrganizer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
diff --git a/proto/v1/sql_service.proto b/proto/v1/sql_service.proto
index 85f86a7455..f784703ef4 100644
--- a/proto/v1/sql_service.proto
+++ b/proto/v1/sql_service.proto
@@ -25,7 +25,7 @@ service SQLService {
};
}
rpc AdminExecute(stream AdminExecuteRequest) returns (stream AdminExecuteResponse) {
- option (google.api.http) = {get: "/v1:adminExecute"};
+ option (google.api.http) = {post: "/v1:adminExecute"};
}
rpc DifferPreview(DifferPreviewRequest) returns (DifferPreviewResponse) {
option (google.api.http) = {
diff --git a/proto/v1/worksheet_service.proto b/proto/v1/worksheet_service.proto
index 16543bc9b3..d84d6ae6c0 100644
--- a/proto/v1/worksheet_service.proto
+++ b/proto/v1/worksheet_service.proto
@@ -39,7 +39,7 @@ service WorksheetService {
rpc UpdateWorksheetOrganizer(UpdateWorksheetOrganizerRequest) returns (WorksheetOrganizer) {
option (google.api.http) = {
- put: "/v1/{organizer.worksheet=worksheets/*}/organizer"
+ patch: "/v1/{organizer.worksheet=worksheets/*}/organizer"
body: "organizer"
};
option (google.api.method_signature) = "organizer,update_mask";