Skip to content

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

chore: update merge branch endpoint to only accept request without conflict (#10014)

h3n4lccc65abef5c3
diff --git a/backend/api/v1/branch_service.go b/backend/api/v1/branch_service.go
index b868c58d70..4ed40c4259 100644
--- a/backend/api/v1/branch_service.go
+++ b/backend/api/v1/branch_service.go
@@ -311,7 +311,7 @@ func (s *BranchService) UpdateBranch(ctx context.Context, request *v1pb.UpdateBr
}
// MergeBranch merges a personal draft branch to the target branch.
-func (s *BranchService) MergeBranch(ctx context.Context, request *v1pb.MergeBranchRequest) (*v1pb.MergeBranchResponse, error) {
+func (s *BranchService) MergeBranch(ctx context.Context, request *v1pb.MergeBranchRequest) (*v1pb.Branch, error) {
baseProjectID, baseBranchID, err := common.GetProjectAndBranchID(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
@@ -334,86 +334,80 @@ func (s *BranchService) MergeBranch(ctx context.Context, request *v1pb.MergeBran
return nil, status.Errorf(codes.Aborted, "there is concurrent update to the branch, please refresh and try again.")
}
- var mergedSchema string
- var mergedMetadata *storepb.DatabaseSchemaMetadata
- var mergedConfig *storepb.DatabaseConfig
- // While user specify the merged schema, backend would not participate in the merge process,
- // instead, it would just update the HEAD of the base branch to the merged schema.
- if request.MergedSchema != "" {
- mergedSchema = request.MergedSchema
- metadata, err := TransformSchemaStringToDatabaseMetadata(storepb.Engine(baseBranch.Engine), mergedSchema)
- if err != nil {
- return nil, status.Error(codes.Internal, fmt.Sprintf("failed to convert merged schema to metadata, %v", err))
- }
- mergedMetadata = metadata
- // FIXME(zp): Frontend pass the head branch and try merge config again?
- mergedConfig = baseBranch.Head.DatabaseConfig
- } else {
- headProjectID, headBranchID, err := common.GetProjectAndBranchID(request.HeadBranch)
- if err != nil {
- return nil, status.Errorf(codes.InvalidArgument, err.Error())
- }
- _, err = s.getProject(ctx, headProjectID)
- if err != nil {
- return nil, err
- }
- if err := s.checkBranchPermission(ctx, headProjectID); err != nil {
- return nil, err
- }
- headBranch, err := s.store.GetBranch(ctx, &store.FindBranchMessage{ProjectID: &headProjectID, ResourceID: &headBranchID, LoadFull: true})
- if err != nil {
- return nil, err
- }
- if headBranch == nil {
- return nil, status.Errorf(codes.NotFound, "branch %q not found", headBranchID)
- }
+ headProjectID, headBranchID, err := common.GetProjectAndBranchID(request.HeadBranch)
+ if err != nil {
+ return nil, status.Errorf(codes.InvalidArgument, err.Error())
+ }
+ _, err = s.getProject(ctx, headProjectID)
+ if err != nil {
+ return nil, err
+ }
+ if err := s.checkBranchPermission(ctx, headProjectID); err != nil {
+ return nil, err
+ }
+ headBranch, err := s.store.GetBranch(ctx, &store.FindBranchMessage{ProjectID: &headProjectID, ResourceID: &headBranchID, LoadFull: true})
+ if err != nil {
+ return nil, err
+ }
+ if headBranch == nil {
+ return nil, status.Errorf(codes.NotFound, "branch %q not found", headBranchID)
+ }
- // Restrict merging only when the head branch is not updated.
- // Maybe we can support auto-merging in the future.
- mergedMetadata, err = tryMerge(headBranch.Base.Metadata, headBranch.Head.Metadata, baseBranch.Head.Metadata)
- if err != nil {
- slog.Info("cannot merge branches", log.BBError(err))
- return &v1pb.MergeBranchResponse{Result: &v1pb.MergeBranchResponse_ConflictSchema{ConflictSchema: "TBD"}}, nil
- }
- if mergedMetadata == nil {
- // TODO(zp): bug, this should not be no change.
- return nil, status.Errorf(codes.FailedPrecondition, "failed to merge branch: no change")
- }
- mergedSchema, err = getDesignSchema(storepb.Engine(baseBranch.Engine), string(headBranch.HeadSchema), mergedMetadata)
- if err != nil {
- return nil, status.Errorf(codes.Internal, "failed to convert merged metadata to schema string, %v", err)
- }
- // XXX(zp): We only try to merge the schema config while the schema could be merged successfully. Otherwise, users manually merge the
- // metadata in the frontend, and config would be ignored.
- mergedConfig = utils.MergeDatabaseConfig(headBranch.Base.GetDatabaseConfig(), headBranch.Head.GetDatabaseConfig(), baseBranch.Head.GetDatabaseConfig())
+ // Restrict merging only when the head branch is not updated.
+ // Maybe we can support auto-merging in the future.
+ mergedMetadata, err := tryMerge(headBranch.Base.Metadata, headBranch.Head.Metadata, baseBranch.Head.Metadata)
+ if err != nil {
+ slog.Info("cannot merge branches", log.BBError(err))
+ return nil, status.Errorf(codes.Aborted, "cannot merge branches without conflict, error: %v", err)
+ }
+ if mergedMetadata == nil {
+ // TODO(zp): bug, this should not be no change.
+ return nil, status.Errorf(codes.FailedPrecondition, "failed to merge branch: no change")
}
+ mergedSchema, err := getDesignSchema(storepb.Engine(baseBranch.Engine), string(headBranch.HeadSchema), mergedMetadata)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to convert merged metadata to schema string, %v", err)
+ }
+ // XXX(zp): We only try to merge the schema config while the schema could be merged successfully. Otherwise, users manually merge the
+ // metadata in the frontend, and config would be ignored.
+ mergedConfig := utils.MergeDatabaseConfig(headBranch.Base.GetDatabaseConfig(), headBranch.Head.GetDatabaseConfig(), baseBranch.Head.GetDatabaseConfig())
principalID, ok := ctx.Value(common.PrincipalIDContextKey).(int)
if !ok {
return nil, status.Errorf(codes.Internal, "principal ID not found")
}
mergedSchemaBytes := []byte(mergedSchema)
- if err := s.store.UpdateBranch(ctx, &store.UpdateBranchMessage{
- ProjectID: baseProject.ResourceID,
- ResourceID: baseBranchID,
- UpdaterID: principalID,
- Head: &storepb.BranchSnapshot{
- Metadata: mergedMetadata,
- DatabaseConfig: mergedConfig,
- },
- HeadSchema: &mergedSchemaBytes,
- }); err != nil {
- return nil, status.Errorf(codes.Internal, "failed update branch, error %v", err)
+
+ baseBranchNewHead := &storepb.BranchSnapshot{
+ Metadata: mergedMetadata,
+ DatabaseConfig: mergedConfig,
}
- baseBranch, err = s.store.GetBranch(ctx, &store.FindBranchMessage{ProjectID: &baseProject.ResourceID, ResourceID: &baseBranchID})
- if err != nil {
- return nil, err
+ baseBranchNewHeadSchema := mergedSchemaBytes
+
+ if request.ValidateOnly {
+ baseBranch.Head = baseBranchNewHead
+ baseBranch.HeadSchema = baseBranchNewHeadSchema
+ } else {
+ if err := s.store.UpdateBranch(ctx, &store.UpdateBranchMessage{
+ ProjectID: baseProject.ResourceID,
+ ResourceID: baseBranchID,
+ UpdaterID: principalID,
+ Head: baseBranchNewHead,
+ HeadSchema: &baseBranchNewHeadSchema,
+ }); err != nil {
+ return nil, status.Errorf(codes.Internal, "failed update branch, error %v", err)
+ }
+ baseBranch, err = s.store.GetBranch(ctx, &store.FindBranchMessage{ProjectID: &baseProject.ResourceID, ResourceID: &baseBranchID})
+ if err != nil {
+ return nil, err
+ }
}
+
v1Branch, err := s.convertBranchToBranch(ctx, baseProject, baseBranch, v1pb.BranchView_BRANCH_VIEW_FULL)
if err != nil {
return nil, err
}
- return &v1pb.MergeBranchResponse{Result: &v1pb.MergeBranchResponse_Branch{Branch: v1Branch}}, nil
+ return v1Branch, nil
}
// RebaseBranch rebases a branch to the target branch.
diff --git a/frontend/src/types/proto/v1/branch_service.ts b/frontend/src/types/proto/v1/branch_service.ts
index 560fde43ed..f5c22fe8e1 100644
--- a/frontend/src/types/proto/v1/branch_service.ts
+++ b/frontend/src/types/proto/v1/branch_service.ts
@@ -203,34 +203,17 @@ export interface MergeBranchRequest {
* Format: projects/{project}/branches/{branch}
*/
headBranch: string;
- /** For failed merge, we will pass in this addition merged schema and use it for head. */
- mergedSchema: string;
/**
* The current etag of the branch.
* If an etag is provided and does not match the current etag of the branch,
* the call will be blocked and an ABORTED error will be returned.
- * The etag should be specified for using merged_schema. The etag should be the etag from named branch.
+ * The etag should be the etag from named branch.
*/
etag: string;
/** validate_only determines if the merge can occur seamlessly without any conflicts. */
validateOnly: boolean;
}
-export interface MergeBranchResponse {
- /** The merged branch when merge occurs seamlessly. */
- branch?:
- | Branch
- | undefined;
- /**
- * The conflict schema when merge has conflicts.
- * The conflict section is enclosed by the following.
- * <<<<< HEAD
- * ====
- * >>>>> main
- */
- conflictSchema?: string | undefined;
-}
-
export interface RebaseBranchRequest {
/**
* The name of the base branch to merge to.
@@ -1039,7 +1022,7 @@ export const UpdateBranchRequest = {
};
function createBaseMergeBranchRequest(): MergeBranchRequest {
- return { name: "", headBranch: "", mergedSchema: "", etag: "", validateOnly: false };
+ return { name: "", headBranch: "", etag: "", validateOnly: false };
}
export const MergeBranchRequest = {
@@ -1050,14 +1033,11 @@ export const MergeBranchRequest = {
if (message.headBranch !== "") {
writer.uint32(18).string(message.headBranch);
}
- if (message.mergedSchema !== "") {
- writer.uint32(26).string(message.mergedSchema);
- }
if (message.etag !== "") {
- writer.uint32(34).string(message.etag);
+ writer.uint32(26).string(message.etag);
}
if (message.validateOnly === true) {
- writer.uint32(40).bool(message.validateOnly);
+ writer.uint32(32).bool(message.validateOnly);
}
return writer;
},
@@ -1088,17 +1068,10 @@ export const MergeBranchRequest = {
break;
}
- message.mergedSchema = reader.string();
- continue;
- case 4:
- if (tag !== 34) {
- break;
- }
-
message.etag = reader.string();
continue;
- case 5:
- if (tag !== 40) {
+ case 4:
+ if (tag !== 32) {
break;
}
@@ -1117,7 +1090,6 @@ export const MergeBranchRequest = {
return {
name: isSet(object.name) ? globalThis.String(object.name) : "",
headBranch: isSet(object.headBranch) ? globalThis.String(object.headBranch) : "",
- mergedSchema: isSet(object.mergedSchema) ? globalThis.String(object.mergedSchema) : "",
etag: isSet(object.etag) ? globalThis.String(object.etag) : "",
validateOnly: isSet(object.validateOnly) ? globalThis.Boolean(object.validateOnly) : false,
};
@@ -1131,9 +1103,6 @@ export const MergeBranchRequest = {
if (message.headBranch !== "") {
obj.headBranch = message.headBranch;
}
- if (message.mergedSchema !== "") {
- obj.mergedSchema = message.mergedSchema;
- }
if (message.etag !== "") {
obj.etag = message.etag;
}
@@ -1150,89 +1119,12 @@ export const MergeBranchRequest = {
const message = createBaseMergeBranchRequest();
message.name = object.name ?? "";
message.headBranch = object.headBranch ?? "";
- message.mergedSchema = object.mergedSchema ?? "";
message.etag = object.etag ?? "";
message.validateOnly = object.validateOnly ?? false;
return message;
},
};
-function createBaseMergeBranchResponse(): MergeBranchResponse {
- return { branch: undefined, conflictSchema: undefined };
-}
-
-export const MergeBranchResponse = {
- encode(message: MergeBranchResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.branch !== undefined) {
- Branch.encode(message.branch, writer.uint32(10).fork()).ldelim();
- }
- if (message.conflictSchema !== undefined) {
- writer.uint32(18).string(message.conflictSchema);
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): MergeBranchResponse {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseMergeBranchResponse();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- if (tag !== 10) {
- break;
- }
-
- message.branch = Branch.decode(reader, reader.uint32());
- continue;
- case 2:
- if (tag !== 18) {
- break;
- }
-
- message.conflictSchema = reader.string();
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): MergeBranchResponse {
- return {
- branch: isSet(object.branch) ? Branch.fromJSON(object.branch) : undefined,
- conflictSchema: isSet(object.conflictSchema) ? globalThis.String(object.conflictSchema) : undefined,
- };
- },
-
- toJSON(message: MergeBranchResponse): unknown {
- const obj: any = {};
- if (message.branch !== undefined) {
- obj.branch = Branch.toJSON(message.branch);
- }
- if (message.conflictSchema !== undefined) {
- obj.conflictSchema = message.conflictSchema;
- }
- return obj;
- },
-
- create(base?: DeepPartial<MergeBranchResponse>): MergeBranchResponse {
- return MergeBranchResponse.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<MergeBranchResponse>): MergeBranchResponse {
- const message = createBaseMergeBranchResponse();
- message.branch = (object.branch !== undefined && object.branch !== null)
- ? Branch.fromPartial(object.branch)
- : undefined;
- message.conflictSchema = object.conflictSchema ?? undefined;
- return message;
- },
-};
-
function createBaseRebaseBranchRequest(): RebaseBranchRequest {
return { name: "", sourceDatabase: "", sourceBranch: "", mergedSchema: "", etag: "", validateOnly: false };
}
@@ -2049,7 +1941,7 @@ export const BranchServiceDefinition = {
name: "MergeBranch",
requestType: MergeBranchRequest,
requestStream: false,
- responseType: MergeBranchResponse,
+ responseType: Branch,
responseStream: false,
options: {
_unknownFields: {
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 4386a9d0dd..f515fcfc75 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -189,7 +189,6 @@
- [ListBranchesRequest](#bytebase-v1-ListBranchesRequest)
- [ListBranchesResponse](#bytebase-v1-ListBranchesResponse)
- [MergeBranchRequest](#bytebase-v1-MergeBranchRequest)
- - [MergeBranchResponse](#bytebase-v1-MergeBranchResponse)
- [RebaseBranchRequest](#bytebase-v1-RebaseBranchRequest)
- [RebaseBranchResponse](#bytebase-v1-RebaseBranchResponse)
- [UpdateBranchRequest](#bytebase-v1-UpdateBranchRequest)
@@ -3524,8 +3523,7 @@ When paginating, all other parameters provided to `ListBranches` must match the
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | The name of the base branch to merge to. Format: projects/{project}/branches/{branch} |
| head_branch | [string](#string) | | The head branch to merge from. Format: projects/{project}/branches/{branch} |
-| merged_schema | [string](#string) | | For failed merge, we will pass in this addition merged schema and use it for head. |
-| etag | [string](#string) | | The current etag of the branch. If an etag is provided and does not match the current etag of the branch, the call will be blocked and an ABORTED error will be returned. The etag should be specified for using merged_schema. The etag should be the etag from named branch. |
+| etag | [string](#string) | | The current etag of the branch. If an etag is provided and does not match the current etag of the branch, the call will be blocked and an ABORTED error will be returned. The etag should be the etag from named branch. |
| validate_only | [bool](#bool) | | validate_only determines if the merge can occur seamlessly without any conflicts. |
@@ -3533,22 +3531,6 @@ When paginating, all other parameters provided to `ListBranches` must match the
-<a name="bytebase-v1-MergeBranchResponse"></a>
-
-### MergeBranchResponse
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| branch | [Branch](#bytebase-v1-Branch) | | The merged branch when merge occurs seamlessly. |
-| conflict_schema | [string](#string) | | The conflict schema when merge has conflicts. The conflict section is enclosed by the following. &lt;&lt;&lt;&lt;&lt; HEAD ==== &gt;&gt;&gt;&gt;&gt; main |
-
-
-
-
-
-
<a name="bytebase-v1-RebaseBranchRequest"></a>
### RebaseBranchRequest
@@ -3634,7 +3616,7 @@ The branch&#39;s `name` field is used to identify the branch to update. Format:
| ListBranches | [ListBranchesRequest](#bytebase-v1-ListBranchesRequest) | [ListBranchesResponse](#bytebase-v1-ListBranchesResponse) | |
| CreateBranch | [CreateBranchRequest](#bytebase-v1-CreateBranchRequest) | [Branch](#bytebase-v1-Branch) | |
| UpdateBranch | [UpdateBranchRequest](#bytebase-v1-UpdateBranchRequest) | [Branch](#bytebase-v1-Branch) | |
-| MergeBranch | [MergeBranchRequest](#bytebase-v1-MergeBranchRequest) | [MergeBranchResponse](#bytebase-v1-MergeBranchResponse) | |
+| MergeBranch | [MergeBranchRequest](#bytebase-v1-MergeBranchRequest) | [Branch](#bytebase-v1-Branch) | |
| RebaseBranch | [RebaseBranchRequest](#bytebase-v1-RebaseBranchRequest) | [RebaseBranchResponse](#bytebase-v1-RebaseBranchResponse) | |
| DeleteBranch | [DeleteBranchRequest](#bytebase-v1-DeleteBranchRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
| DiffDatabase | [DiffDatabaseRequest](#bytebase-v1-DiffDatabaseRequest) | [DiffDatabaseResponse](#bytebase-v1-DiffDatabaseResponse) | DiffDatabase works similar to branch rebase. 1) set the base as the schema of a database; 2) apply the changes between base and head of branch to the new base (schema of database); 3) return the diff DDLs similar to DiffSchema in database service. 4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user will call DiffSchema() in database service to get diff DDLs. |
diff --git a/proto/generated-go/v1/branch_service.pb.go b/proto/generated-go/v1/branch_service.pb.go
index 85db20d51e..0860af0221 100644
--- a/proto/generated-go/v1/branch_service.pb.go
+++ b/proto/generated-go/v1/branch_service.pb.go
@@ -598,15 +598,13 @@ type MergeBranchRequest struct {
// The head branch to merge from.
// Format: projects/{project}/branches/{branch}
HeadBranch string `protobuf:"bytes,2,opt,name=head_branch,json=headBranch,proto3" json:"head_branch,omitempty"`
- // For failed merge, we will pass in this addition merged schema and use it for head.
- MergedSchema string `protobuf:"bytes,3,opt,name=merged_schema,json=mergedSchema,proto3" json:"merged_schema,omitempty"`
// The current etag of the branch.
// If an etag is provided and does not match the current etag of the branch,
// the call will be blocked and an ABORTED error will be returned.
- // The etag should be specified for using merged_schema. The etag should be the etag from named branch.
- Etag string `protobuf:"bytes,4,opt,name=etag,proto3" json:"etag,omitempty"`
+ // The etag should be the etag from named branch.
+ Etag string `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"`
// validate_only determines if the merge can occur seamlessly without any conflicts.
- ValidateOnly bool `protobuf:"varint,5,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"`
+ ValidateOnly bool `protobuf:"varint,4,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"`
}
func (x *MergeBranchRequest) Reset() {
@@ -655,13 +653,6 @@ func (x *MergeBranchRequest) GetHeadBranch() string {
return ""
}
-func (x *MergeBranchRequest) GetMergedSchema() string {
- if x != nil {
- return x.MergedSchema
- }
- return ""
-}
-
func (x *MergeBranchRequest) GetEtag() string {
if x != nil {
return x.Etag
@@ -676,93 +667,6 @@ func (x *MergeBranchRequest) GetValidateOnly() bool {
return false
}
-type MergeBranchResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Types that are assignable to Result:
- //
- // *MergeBranchResponse_Branch
- // *MergeBranchResponse_ConflictSchema
- Result isMergeBranchResponse_Result `protobuf_oneof:"result"`
-}
-
-func (x *MergeBranchResponse) Reset() {
- *x = MergeBranchResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_branch_service_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *MergeBranchResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*MergeBranchResponse) ProtoMessage() {}
-
-func (x *MergeBranchResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_branch_service_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use MergeBranchResponse.ProtoReflect.Descriptor instead.
-func (*MergeBranchResponse) Descriptor() ([]byte, []int) {
- return file_v1_branch_service_proto_rawDescGZIP(), []int{7}
-}
-
-func (m *MergeBranchResponse) GetResult() isMergeBranchResponse_Result {
- if m != nil {
- return m.Result
- }
- return nil
-}
-
-func (x *MergeBranchResponse) GetBranch() *Branch {
- if x, ok := x.GetResult().(*MergeBranchResponse_Branch); ok {
- return x.Branch
- }
- return nil
-}
-
-func (x *MergeBranchResponse) GetConflictSchema() string {
- if x, ok := x.GetResult().(*MergeBranchResponse_ConflictSchema); ok {
- return x.ConflictSchema
- }
- return ""
-}
-
-type isMergeBranchResponse_Result interface {
- isMergeBranchResponse_Result()
-}
-
-type MergeBranchResponse_Branch struct {
- // The merged branch when merge occurs seamlessly.
- Branch *Branch `protobuf:"bytes,1,opt,name=branch,proto3,oneof"`
-}
-
-type MergeBranchResponse_ConflictSchema struct {
- // The conflict schema when merge has conflicts.
- // The conflict section is enclosed by the following.
- // <<<<< HEAD
- // ====
- // >>>>> main
- ConflictSchema string `protobuf:"bytes,2,opt,name=conflict_schema,json=conflictSchema,proto3,oneof"`
-}
-
-func (*MergeBranchResponse_Branch) isMergeBranchResponse_Result() {}
-
-func (*MergeBranchResponse_ConflictSchema) isMergeBranchResponse_Result() {}
-
type RebaseBranchRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -794,7 +698,7 @@ type RebaseBranchRequest struct {
func (x *RebaseBranchRequest) Reset() {
*x = RebaseBranchRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_branch_service_proto_msgTypes[8]
+ mi := &file_v1_branch_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -807,7 +711,7 @@ func (x *RebaseBranchRequest) String() string {
func (*RebaseBranchRequest) ProtoMessage() {}
func (x *RebaseBranchRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_branch_service_proto_msgTypes[8]
+ mi := &file_v1_branch_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -820,7 +724,7 @@ func (x *RebaseBranchRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use RebaseBranchRequest.ProtoReflect.Descriptor instead.
func (*RebaseBranchRequest) Descriptor() ([]byte, []int) {
- return file_v1_branch_service_proto_rawDescGZIP(), []int{8}
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{7}
}
func (x *RebaseBranchRequest) GetName() string {
@@ -880,7 +784,7 @@ type RebaseBranchResponse struct {
func (x *RebaseBranchResponse) Reset() {
*x = RebaseBranchResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_branch_service_proto_msgTypes[9]
+ mi := &file_v1_branch_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -893,7 +797,7 @@ func (x *RebaseBranchResponse) String() string {
func (*RebaseBranchResponse) ProtoMessage() {}
func (x *RebaseBranchResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_branch_service_proto_msgTypes[9]
+ mi := &file_v1_branch_service_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -906,7 +810,7 @@ func (x *RebaseBranchResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use RebaseBranchResponse.ProtoReflect.Descriptor instead.
func (*RebaseBranchResponse) Descriptor() ([]byte, []int) {
- return file_v1_branch_service_proto_rawDescGZIP(), []int{9}
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{8}
}
func (m *RebaseBranchResponse) GetResult() isRebaseBranchResponse_Result {
@@ -965,7 +869,7 @@ type DeleteBranchRequest struct {
func (x *DeleteBranchRequest) Reset() {
*x = DeleteBranchRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_branch_service_proto_msgTypes[10]
+ mi := &file_v1_branch_service_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -978,7 +882,7 @@ func (x *DeleteBranchRequest) String() string {
func (*DeleteBranchRequest) ProtoMessage() {}
func (x *DeleteBranchRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_branch_service_proto_msgTypes[10]
+ mi := &file_v1_branch_service_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -991,7 +895,7 @@ func (x *DeleteBranchRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteBranchRequest.ProtoReflect.Descriptor instead.
func (*DeleteBranchRequest) Descriptor() ([]byte, []int) {
- return file_v1_branch_service_proto_rawDescGZIP(), []int{10}
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{9}
}
func (x *DeleteBranchRequest) GetName() string {
@@ -1015,7 +919,7 @@ type DiffDatabaseRequest struct {
func (x *DiffDatabaseRequest) Reset() {
*x = DiffDatabaseRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_branch_service_proto_msgTypes[11]
+ mi := &file_v1_branch_service_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1028,7 +932,7 @@ func (x *DiffDatabaseRequest) String() string {
func (*DiffDatabaseRequest) ProtoMessage() {}
func (x *DiffDatabaseRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_branch_service_proto_msgTypes[11]
+ mi := &file_v1_branch_service_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1041,7 +945,7 @@ func (x *DiffDatabaseRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DiffDatabaseRequest.ProtoReflect.Descriptor instead.
func (*DiffDatabaseRequest) Descriptor() ([]byte, []int) {
- return file_v1_branch_service_proto_rawDescGZIP(), []int{11}
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{10}
}
func (x *DiffDatabaseRequest) GetName() string {
@@ -1075,7 +979,7 @@ type DiffDatabaseResponse struct {
func (x *DiffDatabaseResponse) Reset() {
*x = DiffDatabaseResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_branch_service_proto_msgTypes[12]
+ mi := &file_v1_branch_service_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1088,7 +992,7 @@ func (x *DiffDatabaseResponse) String() string {
func (*DiffDatabaseResponse) ProtoMessage() {}
func (x *DiffDatabaseResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_branch_service_proto_msgTypes[12]
+ mi := &file_v1_branch_service_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1101,7 +1005,7 @@ func (x *DiffDatabaseResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use DiffDatabaseResponse.ProtoReflect.Descriptor instead.
func (*DiffDatabaseResponse) Descriptor() ([]byte, []int) {
- return file_v1_branch_service_proto_rawDescGZIP(), []int{12}
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{11}
}
func (x *DiffDatabaseResponse) GetDiff() string {
@@ -1170,7 +1074,7 @@ type DiffMetadataRequest struct {
func (x *DiffMetadataRequest) Reset() {
*x = DiffMetadataRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_branch_service_proto_msgTypes[13]
+ mi := &file_v1_branch_service_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1183,7 +1087,7 @@ func (x *DiffMetadataRequest) String() string {
func (*DiffMetadataRequest) ProtoMessage() {}
func (x *DiffMetadataRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_branch_service_proto_msgTypes[13]
+ mi := &file_v1_branch_service_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1196,7 +1100,7 @@ func (x *DiffMetadataRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DiffMetadataRequest.ProtoReflect.Descriptor instead.
func (*DiffMetadataRequest) Descriptor() ([]byte, []int) {
- return file_v1_branch_service_proto_rawDescGZIP(), []int{13}
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{12}
}
func (x *DiffMetadataRequest) GetSourceMetadata() *DatabaseMetadata {
@@ -1232,7 +1136,7 @@ type DiffMetadataResponse struct {
func (x *DiffMetadataResponse) Reset() {
*x = DiffMetadataResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_branch_service_proto_msgTypes[14]
+ mi := &file_v1_branch_service_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1245,7 +1149,7 @@ func (x *DiffMetadataResponse) String() string {
func (*DiffMetadataResponse) ProtoMessage() {}
func (x *DiffMetadataResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_branch_service_proto_msgTypes[14]
+ mi := &file_v1_branch_service_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1258,7 +1162,7 @@ func (x *DiffMetadataResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use DiffMetadataResponse.ProtoReflect.Descriptor instead.
func (*DiffMetadataResponse) Descriptor() ([]byte, []int) {
- return file_v1_branch_service_proto_rawDescGZIP(), []int{14}
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{13}
}
func (x *DiffMetadataResponse) GetDiff() string {
@@ -1366,26 +1270,16 @@ var file_v1_branch_service_proto_rawDesc = []byte{
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74,
- 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x22, 0xb1,
+ 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x22, 0x8c,
0x01, 0x0a, 0x12, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f,
0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12,
- 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x53, 0x63,
- 0x68, 0x65, 0x6d, 0x61, 0x12, 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x23, 0x0a,
- 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e,
- 0x6c, 0x79, 0x22, 0x79, 0x0a, 0x13, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63,
- 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x62, 0x72, 0x61,
- 0x6e, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x48, 0x00,
- 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x29, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x66,
- 0x6c, 0x69, 0x63, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x53, 0x63, 0x68,
- 0x65, 0x6d, 0x61, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xda, 0x01,
+ 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
+ 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69,
+ 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0xda, 0x01,
0x0a, 0x13, 0x52, 0x65, 0x62, 0x61, 0x73, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27,
@@ -1445,7 +1339,7 @@ var file_v1_branch_service_proto_rawDesc = []byte{
0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49,
0x45, 0x57, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x52,
0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02,
- 0x32, 0xc8, 0x09, 0x0a, 0x0d, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x32, 0xba, 0x09, 0x0a, 0x0d, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x70, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12,
0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,
0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13,
@@ -1479,51 +1373,50 @@ var file_v1_branch_service_proto_rawDesc = []byte{
0xe4, 0x93, 0x02, 0x31, 0x3a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x32, 0x27, 0x2f, 0x76,
0x31, 0x2f, 0x7b, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70,
0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68,
- 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42,
- 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72,
- 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x12,
- 0x8b, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x62, 0x61, 0x73, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
- 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x52, 0x65, 0x62, 0x61, 0x73, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63,
- 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x12, 0x79, 0x0a,
- 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65,
- 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,
+ 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7a, 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72,
+ 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x35, 0xda, 0x41, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f,
+ 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x6d, 0x65, 0x72, 0x67,
+ 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x62, 0x61, 0x73, 0x65, 0x42, 0x72, 0x61, 0x6e,
+ 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x52, 0x65, 0x62, 0x61, 0x73, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x52, 0x65, 0x62, 0x61, 0x73, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,
0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61,
- 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x91, 0x01, 0x0a, 0x0c, 0x44, 0x69, 0x66,
- 0x66, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x44, 0x61, 0x74, 0x61,
- 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79,
+ 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x12,
+ 0x79, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12,
+ 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65,
+ 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62,
+ 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x91, 0x01, 0x0a, 0x0c, 0x44,
+ 0x69, 0x66, 0x66, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x20, 0x2e, 0x62, 0x79,
0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x44, 0x61,
- 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c,
- 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2d, 0x2f,
- 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
- 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a,
- 0x64, 0x69, 0x66, 0x66, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x0c,
- 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d,
- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21,
+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66,
+ 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0x3c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22,
+ 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,
+ 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a,
+ 0x7d, 0x3a, 0x64, 0x69, 0x66, 0x66, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x7d,
+ 0x0a, 0x0c, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20,
0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66,
- 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76,
- 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x64,
- 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x11, 0x5a, 0x0f, 0x67,
- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,
+ 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d,
+ 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e,
+ 0x3a, 0x64, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x11, 0x5a,
+ 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1539,7 +1432,7 @@ func file_v1_branch_service_proto_rawDescGZIP() []byte {
}
var file_v1_branch_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_v1_branch_service_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
+var file_v1_branch_service_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_v1_branch_service_proto_goTypes = []interface{}{
(BranchView)(0), // 0: bytebase.v1.BranchView
(*Branch)(nil), // 1: bytebase.v1.Branch
@@ -1549,59 +1442,57 @@ var file_v1_branch_service_proto_goTypes = []interface{}{
(*CreateBranchRequest)(nil), // 5: bytebase.v1.CreateBranchRequest
(*UpdateBranchRequest)(nil), // 6: bytebase.v1.UpdateBranchRequest
(*MergeBranchRequest)(nil), // 7: bytebase.v1.MergeBranchRequest
- (*MergeBranchResponse)(nil), // 8: bytebase.v1.MergeBranchResponse
- (*RebaseBranchRequest)(nil), // 9: bytebase.v1.RebaseBranchRequest
- (*RebaseBranchResponse)(nil), // 10: bytebase.v1.RebaseBranchResponse
- (*DeleteBranchRequest)(nil), // 11: bytebase.v1.DeleteBranchRequest
- (*DiffDatabaseRequest)(nil), // 12: bytebase.v1.DiffDatabaseRequest
- (*DiffDatabaseResponse)(nil), // 13: bytebase.v1.DiffDatabaseResponse
- (*DiffMetadataRequest)(nil), // 14: bytebase.v1.DiffMetadataRequest
- (*DiffMetadataResponse)(nil), // 15: bytebase.v1.DiffMetadataResponse
- (*DatabaseMetadata)(nil), // 16: bytebase.v1.DatabaseMetadata
- (Engine)(0), // 17: bytebase.v1.Engine
- (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp
- (*fieldmaskpb.FieldMask)(nil), // 19: google.protobuf.FieldMask
- (*emptypb.Empty)(nil), // 20: google.protobuf.Empty
+ (*RebaseBranchRequest)(nil), // 8: bytebase.v1.RebaseBranchRequest
+ (*RebaseBranchResponse)(nil), // 9: bytebase.v1.RebaseBranchResponse
+ (*DeleteBranchRequest)(nil), // 10: bytebase.v1.DeleteBranchRequest
+ (*DiffDatabaseRequest)(nil), // 11: bytebase.v1.DiffDatabaseRequest
+ (*DiffDatabaseResponse)(nil), // 12: bytebase.v1.DiffDatabaseResponse
+ (*DiffMetadataRequest)(nil), // 13: bytebase.v1.DiffMetadataRequest
+ (*DiffMetadataResponse)(nil), // 14: bytebase.v1.DiffMetadataResponse
+ (*DatabaseMetadata)(nil), // 15: bytebase.v1.DatabaseMetadata
+ (Engine)(0), // 16: bytebase.v1.Engine
+ (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp
+ (*fieldmaskpb.FieldMask)(nil), // 18: google.protobuf.FieldMask
+ (*emptypb.Empty)(nil), // 19: google.protobuf.Empty
}
var file_v1_branch_service_proto_depIdxs = []int32{
- 16, // 0: bytebase.v1.Branch.schema_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 16, // 1: bytebase.v1.Branch.baseline_schema_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 17, // 2: bytebase.v1.Branch.engine:type_name -> bytebase.v1.Engine
- 18, // 3: bytebase.v1.Branch.create_time:type_name -> google.protobuf.Timestamp
- 18, // 4: bytebase.v1.Branch.update_time:type_name -> google.protobuf.Timestamp
+ 15, // 0: bytebase.v1.Branch.schema_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 15, // 1: bytebase.v1.Branch.baseline_schema_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 16, // 2: bytebase.v1.Branch.engine:type_name -> bytebase.v1.Engine
+ 17, // 3: bytebase.v1.Branch.create_time:type_name -> google.protobuf.Timestamp
+ 17, // 4: bytebase.v1.Branch.update_time:type_name -> google.protobuf.Timestamp
0, // 5: bytebase.v1.ListBranchesRequest.view:type_name -> bytebase.v1.BranchView
1, // 6: bytebase.v1.ListBranchesResponse.branches:type_name -> bytebase.v1.Branch
1, // 7: bytebase.v1.CreateBranchRequest.branch:type_name -> bytebase.v1.Branch
1, // 8: bytebase.v1.UpdateBranchRequest.branch:type_name -> bytebase.v1.Branch
- 19, // 9: bytebase.v1.UpdateBranchRequest.update_mask:type_name -> google.protobuf.FieldMask
- 1, // 10: bytebase.v1.MergeBranchResponse.branch:type_name -> bytebase.v1.Branch
- 1, // 11: bytebase.v1.RebaseBranchResponse.branch:type_name -> bytebase.v1.Branch
- 16, // 12: bytebase.v1.DiffMetadataRequest.source_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 16, // 13: bytebase.v1.DiffMetadataRequest.target_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 17, // 14: bytebase.v1.DiffMetadataRequest.engine:type_name -> bytebase.v1.Engine
- 2, // 15: bytebase.v1.BranchService.GetBranch:input_type -> bytebase.v1.GetBranchRequest
- 3, // 16: bytebase.v1.BranchService.ListBranches:input_type -> bytebase.v1.ListBranchesRequest
- 5, // 17: bytebase.v1.BranchService.CreateBranch:input_type -> bytebase.v1.CreateBranchRequest
- 6, // 18: bytebase.v1.BranchService.UpdateBranch:input_type -> bytebase.v1.UpdateBranchRequest
- 7, // 19: bytebase.v1.BranchService.MergeBranch:input_type -> bytebase.v1.MergeBranchRequest
- 9, // 20: bytebase.v1.BranchService.RebaseBranch:input_type -> bytebase.v1.RebaseBranchRequest
- 11, // 21: bytebase.v1.BranchService.DeleteBranch:input_type -> bytebase.v1.DeleteBranchRequest
- 12, // 22: bytebase.v1.BranchService.DiffDatabase:input_type -> bytebase.v1.DiffDatabaseRequest
- 14, // 23: bytebase.v1.BranchService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest
- 1, // 24: bytebase.v1.BranchService.GetBranch:output_type -> bytebase.v1.Branch
- 4, // 25: bytebase.v1.BranchService.ListBranches:output_type -> bytebase.v1.ListBranchesResponse
- 1, // 26: bytebase.v1.BranchService.CreateBranch:output_type -> bytebase.v1.Branch
- 1, // 27: bytebase.v1.BranchService.UpdateBranch:output_type -> bytebase.v1.Branch
- 8, // 28: bytebase.v1.BranchService.MergeBranch:output_type -> bytebase.v1.MergeBranchResponse
- 10, // 29: bytebase.v1.BranchService.RebaseBranch:output_type -> bytebase.v1.RebaseBranchResponse
- 20, // 30: bytebase.v1.BranchService.DeleteBranch:output_type -> google.protobuf.Empty
- 13, // 31: bytebase.v1.BranchService.DiffDatabase:output_type -> bytebase.v1.DiffDatabaseResponse
- 15, // 32: bytebase.v1.BranchService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse
- 24, // [24:33] is the sub-list for method output_type
- 15, // [15:24] is the sub-list for method input_type
- 15, // [15:15] is the sub-list for extension type_name
- 15, // [15:15] is the sub-list for extension extendee
- 0, // [0:15] is the sub-list for field type_name
+ 18, // 9: bytebase.v1.UpdateBranchRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 1, // 10: bytebase.v1.RebaseBranchResponse.branch:type_name -> bytebase.v1.Branch
+ 15, // 11: bytebase.v1.DiffMetadataRequest.source_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 15, // 12: bytebase.v1.DiffMetadataRequest.target_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 16, // 13: bytebase.v1.DiffMetadataRequest.engine:type_name -> bytebase.v1.Engine
+ 2, // 14: bytebase.v1.BranchService.GetBranch:input_type -> bytebase.v1.GetBranchRequest
+ 3, // 15: bytebase.v1.BranchService.ListBranches:input_type -> bytebase.v1.ListBranchesRequest
+ 5, // 16: bytebase.v1.BranchService.CreateBranch:input_type -> bytebase.v1.CreateBranchRequest
+ 6, // 17: bytebase.v1.BranchService.UpdateBranch:input_type -> bytebase.v1.UpdateBranchRequest
+ 7, // 18: bytebase.v1.BranchService.MergeBranch:input_type -> bytebase.v1.MergeBranchRequest
+ 8, // 19: bytebase.v1.BranchService.RebaseBranch:input_type -> bytebase.v1.RebaseBranchRequest
+ 10, // 20: bytebase.v1.BranchService.DeleteBranch:input_type -> bytebase.v1.DeleteBranchRequest
+ 11, // 21: bytebase.v1.BranchService.DiffDatabase:input_type -> bytebase.v1.DiffDatabaseRequest
+ 13, // 22: bytebase.v1.BranchService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest
+ 1, // 23: bytebase.v1.BranchService.GetBranch:output_type -> bytebase.v1.Branch
+ 4, // 24: bytebase.v1.BranchService.ListBranches:output_type -> bytebase.v1.ListBranchesResponse
+ 1, // 25: bytebase.v1.BranchService.CreateBranch:output_type -> bytebase.v1.Branch
+ 1, // 26: bytebase.v1.BranchService.UpdateBranch:output_type -> bytebase.v1.Branch
+ 1, // 27: bytebase.v1.BranchService.MergeBranch:output_type -> bytebase.v1.Branch
+ 9, // 28: bytebase.v1.BranchService.RebaseBranch:output_type -> bytebase.v1.RebaseBranchResponse
+ 19, // 29: bytebase.v1.BranchService.DeleteBranch:output_type -> google.protobuf.Empty
+ 12, // 30: bytebase.v1.BranchService.DiffDatabase:output_type -> bytebase.v1.DiffDatabaseResponse
+ 14, // 31: bytebase.v1.BranchService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse
+ 23, // [23:32] is the sub-list for method output_type
+ 14, // [14:23] is the sub-list for method input_type
+ 14, // [14:14] is the sub-list for extension type_name
+ 14, // [14:14] is the sub-list for extension extendee
+ 0, // [0:14] is the sub-list for field type_name
}
func init() { file_v1_branch_service_proto_init() }
@@ -1697,18 +1588,6 @@ func file_v1_branch_service_proto_init() {
}
}
file_v1_branch_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MergeBranchResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_branch_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RebaseBranchRequest); i {
case 0:
return &v.state
@@ -1720,7 +1599,7 @@ func file_v1_branch_service_proto_init() {
return nil
}
}
- file_v1_branch_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ file_v1_branch_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RebaseBranchResponse); i {
case 0:
return &v.state
@@ -1732,7 +1611,7 @@ func file_v1_branch_service_proto_init() {
return nil
}
}
- file_v1_branch_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ file_v1_branch_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteBranchRequest); i {
case 0:
return &v.state
@@ -1744,7 +1623,7 @@ func file_v1_branch_service_proto_init() {
return nil
}
}
- file_v1_branch_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ file_v1_branch_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DiffDatabaseRequest); i {
case 0:
return &v.state
@@ -1756,7 +1635,7 @@ func file_v1_branch_service_proto_init() {
return nil
}
}
- file_v1_branch_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ file_v1_branch_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DiffDatabaseResponse); i {
case 0:
return &v.state
@@ -1768,7 +1647,7 @@ func file_v1_branch_service_proto_init() {
return nil
}
}
- file_v1_branch_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ file_v1_branch_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DiffMetadataRequest); i {
case 0:
return &v.state
@@ -1780,7 +1659,7 @@ func file_v1_branch_service_proto_init() {
return nil
}
}
- file_v1_branch_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ file_v1_branch_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DiffMetadataResponse); i {
case 0:
return &v.state
@@ -1793,15 +1672,11 @@ func file_v1_branch_service_proto_init() {
}
}
}
- file_v1_branch_service_proto_msgTypes[7].OneofWrappers = []interface{}{
- (*MergeBranchResponse_Branch)(nil),
- (*MergeBranchResponse_ConflictSchema)(nil),
- }
- file_v1_branch_service_proto_msgTypes[9].OneofWrappers = []interface{}{
+ file_v1_branch_service_proto_msgTypes[8].OneofWrappers = []interface{}{
(*RebaseBranchResponse_Branch)(nil),
(*RebaseBranchResponse_ConflictSchema)(nil),
}
- file_v1_branch_service_proto_msgTypes[12].OneofWrappers = []interface{}{
+ file_v1_branch_service_proto_msgTypes[11].OneofWrappers = []interface{}{
(*DiffDatabaseResponse_Schema)(nil),
(*DiffDatabaseResponse_ConflictSchema)(nil),
}
@@ -1811,7 +1686,7 @@ func file_v1_branch_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_v1_branch_service_proto_rawDesc,
NumEnums: 1,
- NumMessages: 15,
+ NumMessages: 14,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/proto/generated-go/v1/branch_service_grpc.pb.go b/proto/generated-go/v1/branch_service_grpc.pb.go
index 37a4e2e041..2c12d04b56 100644
--- a/proto/generated-go/v1/branch_service_grpc.pb.go
+++ b/proto/generated-go/v1/branch_service_grpc.pb.go
@@ -39,7 +39,7 @@ type BranchServiceClient interface {
ListBranches(ctx context.Context, in *ListBranchesRequest, opts ...grpc.CallOption) (*ListBranchesResponse, error)
CreateBranch(ctx context.Context, in *CreateBranchRequest, opts ...grpc.CallOption) (*Branch, error)
UpdateBranch(ctx context.Context, in *UpdateBranchRequest, opts ...grpc.CallOption) (*Branch, error)
- MergeBranch(ctx context.Context, in *MergeBranchRequest, opts ...grpc.CallOption) (*MergeBranchResponse, error)
+ MergeBranch(ctx context.Context, in *MergeBranchRequest, opts ...grpc.CallOption) (*Branch, error)
RebaseBranch(ctx context.Context, in *RebaseBranchRequest, opts ...grpc.CallOption) (*RebaseBranchResponse, error)
DeleteBranch(ctx context.Context, in *DeleteBranchRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// DiffDatabase works similar to branch rebase.
@@ -96,8 +96,8 @@ func (c *branchServiceClient) UpdateBranch(ctx context.Context, in *UpdateBranch
return out, nil
}
-func (c *branchServiceClient) MergeBranch(ctx context.Context, in *MergeBranchRequest, opts ...grpc.CallOption) (*MergeBranchResponse, error) {
- out := new(MergeBranchResponse)
+func (c *branchServiceClient) MergeBranch(ctx context.Context, in *MergeBranchRequest, opts ...grpc.CallOption) (*Branch, error) {
+ out := new(Branch)
err := c.cc.Invoke(ctx, BranchService_MergeBranch_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@@ -149,7 +149,7 @@ type BranchServiceServer interface {
ListBranches(context.Context, *ListBranchesRequest) (*ListBranchesResponse, error)
CreateBranch(context.Context, *CreateBranchRequest) (*Branch, error)
UpdateBranch(context.Context, *UpdateBranchRequest) (*Branch, error)
- MergeBranch(context.Context, *MergeBranchRequest) (*MergeBranchResponse, error)
+ MergeBranch(context.Context, *MergeBranchRequest) (*Branch, error)
RebaseBranch(context.Context, *RebaseBranchRequest) (*RebaseBranchResponse, error)
DeleteBranch(context.Context, *DeleteBranchRequest) (*emptypb.Empty, error)
// DiffDatabase works similar to branch rebase.
@@ -179,7 +179,7 @@ func (UnimplementedBranchServiceServer) CreateBranch(context.Context, *CreateBra
func (UnimplementedBranchServiceServer) UpdateBranch(context.Context, *UpdateBranchRequest) (*Branch, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateBranch not implemented")
}
-func (UnimplementedBranchServiceServer) MergeBranch(context.Context, *MergeBranchRequest) (*MergeBranchResponse, error) {
+func (UnimplementedBranchServiceServer) MergeBranch(context.Context, *MergeBranchRequest) (*Branch, error) {
return nil, status.Errorf(codes.Unimplemented, "method MergeBranch not implemented")
}
func (UnimplementedBranchServiceServer) RebaseBranch(context.Context, *RebaseBranchRequest) (*RebaseBranchResponse, error) {
diff --git a/proto/v1/branch_service.proto b/proto/v1/branch_service.proto
index 310085f895..91daf58810 100644
--- a/proto/v1/branch_service.proto
+++ b/proto/v1/branch_service.proto
@@ -40,7 +40,7 @@ service BranchService {
option (google.api.method_signature) = "branch,update_mask";
}
- rpc MergeBranch(MergeBranchRequest) returns (MergeBranchResponse) {
+ rpc MergeBranch(MergeBranchRequest) returns (Branch) {
option (google.api.http) = {post: "/v1/{name=projects/*/branches/*}:merge"};
option (google.api.method_signature) = "name";
}
@@ -214,30 +214,14 @@ message MergeBranchRequest {
// Format: projects/{project}/branches/{branch}
string head_branch = 2;
- // For failed merge, we will pass in this addition merged schema and use it for head.
- string merged_schema = 3;
-
// The current etag of the branch.
// If an etag is provided and does not match the current etag of the branch,
// the call will be blocked and an ABORTED error will be returned.
- // The etag should be specified for using merged_schema. The etag should be the etag from named branch.
- string etag = 4 [(google.api.field_behavior) = OPTIONAL];
+ // The etag should be the etag from named branch.
+ string etag = 3 [(google.api.field_behavior) = OPTIONAL];
// validate_only determines if the merge can occur seamlessly without any conflicts.
- bool validate_only = 5;
-}
-
-message MergeBranchResponse {
- oneof result {
- // The merged branch when merge occurs seamlessly.
- Branch branch = 1;
- // The conflict schema when merge has conflicts.
- // The conflict section is enclosed by the following.
- // <<<<< HEAD
- // ====
- // >>>>> main
- string conflict_schema = 2;
- }
+ bool validate_only = 4;
}
message RebaseBranchRequest {