Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: rebase branch API (#9685)
Danny Xu88739c4f51f2
diff --git a/frontend/src/types/proto/v1/branch_service.ts b/frontend/src/types/proto/v1/branch_service.tsindex 1516c91ec2..f4e1de6daa 100644--- a/frontend/src/types/proto/v1/branch_service.ts+++ b/frontend/src/types/proto/v1/branch_service.ts@@ -194,6 +194,33 @@ export interface MergeBranchRequest {* Format: projects/{project}/branches/{branch}*/headBranch: string;+ /** For failed merge. */+ mergedSchema: string;+}++export interface RebaseBranchRequest {+ /**+ * The name of the base branch to merge to.+ * Format: projects/{project}/branches/{branch}+ */+ name: string;+ /**+ * The database (remote upstream) used to rebase.+ * We use its schema as baseline and reapply the difference between base and head of the named branch.+ * Format: instances/{instance}/databases/{database}+ */+ sourceDatabase: string;+ /**+ * The branch (remote upstream) used to rebase. We use its head as baseline.+ * We use its head schema as baseline and reapply the difference between base and head of the named branch.+ * Format: projects/{project}/branches/{branch}+ */+ sourceBranch: string;+ /**+ * For failed merge, we will pass in this addition merged schema and use it for head.+ * This has to be set together with source_database or source_branch.+ */+ mergedSchema: string;}export interface DeleteBranchRequest {@@ -916,7 +943,7 @@ export const UpdateBranchRequest = {};function createBaseMergeBranchRequest(): MergeBranchRequest {- return { name: "", headBranch: "" };+ return { name: "", headBranch: "", mergedSchema: "" };}export const MergeBranchRequest = {@@ -927,6 +954,9 @@ export const MergeBranchRequest = {if (message.headBranch !== "") {writer.uint32(18).string(message.headBranch);}+ if (message.mergedSchema !== "") {+ writer.uint32(26).string(message.mergedSchema);+ }return writer;},@@ -951,6 +981,13 @@ export const MergeBranchRequest = {message.headBranch = reader.string();continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.mergedSchema = reader.string();+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -964,6 +1001,7 @@ 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) : "",};},@@ -975,6 +1013,9 @@ export const MergeBranchRequest = {if (message.headBranch !== "") {obj.headBranch = message.headBranch;}+ if (message.mergedSchema !== "") {+ obj.mergedSchema = message.mergedSchema;+ }return obj;},@@ -985,6 +1026,111 @@ export const MergeBranchRequest = {const message = createBaseMergeBranchRequest();message.name = object.name ?? "";message.headBranch = object.headBranch ?? "";+ message.mergedSchema = object.mergedSchema ?? "";+ return message;+ },+};++function createBaseRebaseBranchRequest(): RebaseBranchRequest {+ return { name: "", sourceDatabase: "", sourceBranch: "", mergedSchema: "" };+}++export const RebaseBranchRequest = {+ encode(message: RebaseBranchRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ if (message.sourceDatabase !== "") {+ writer.uint32(18).string(message.sourceDatabase);+ }+ if (message.sourceBranch !== "") {+ writer.uint32(26).string(message.sourceBranch);+ }+ if (message.mergedSchema !== "") {+ writer.uint32(34).string(message.mergedSchema);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): RebaseBranchRequest {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseRebaseBranchRequest();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.name = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.sourceDatabase = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.sourceBranch = reader.string();+ continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.mergedSchema = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): RebaseBranchRequest {+ return {+ name: isSet(object.name) ? globalThis.String(object.name) : "",+ sourceDatabase: isSet(object.sourceDatabase) ? globalThis.String(object.sourceDatabase) : "",+ sourceBranch: isSet(object.sourceBranch) ? globalThis.String(object.sourceBranch) : "",+ mergedSchema: isSet(object.mergedSchema) ? globalThis.String(object.mergedSchema) : "",+ };+ },++ toJSON(message: RebaseBranchRequest): unknown {+ const obj: any = {};+ if (message.name !== "") {+ obj.name = message.name;+ }+ if (message.sourceDatabase !== "") {+ obj.sourceDatabase = message.sourceDatabase;+ }+ if (message.sourceBranch !== "") {+ obj.sourceBranch = message.sourceBranch;+ }+ if (message.mergedSchema !== "") {+ obj.mergedSchema = message.mergedSchema;+ }+ return obj;+ },++ create(base?: DeepPartial<RebaseBranchRequest>): RebaseBranchRequest {+ return RebaseBranchRequest.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<RebaseBranchRequest>): RebaseBranchRequest {+ const message = createBaseRebaseBranchRequest();+ message.name = object.name ?? "";+ message.sourceDatabase = object.sourceDatabase ?? "";+ message.sourceBranch = object.sourceBranch ?? "";+ message.mergedSchema = object.mergedSchema ?? "";return message;},};@@ -1436,7 +1582,7 @@ export const BranchServiceDefinition = {responseStream: false,options: {_unknownFields: {- 8410: [new Uint8Array([16, 110, 97, 109, 101, 44, 116, 97, 114, 103, 101, 116, 95, 110, 97, 109, 101])],+ 8410: [new Uint8Array([4, 110, 97, 109, 101])],578365826: [new Uint8Array([40,@@ -1485,6 +1631,64 @@ export const BranchServiceDefinition = {},},},+ rebaseBranch: {+ name: "RebaseBranch",+ requestType: RebaseBranchRequest,+ requestStream: false,+ responseType: Branch,+ responseStream: false,+ options: {+ _unknownFields: {+ 8410: [new Uint8Array([4, 110, 97, 109, 101])],+ 578365826: [+ new Uint8Array([+ 41,+ 34,+ 39,+ 47,+ 118,+ 49,+ 47,+ 123,+ 110,+ 97,+ 109,+ 101,+ 61,+ 112,+ 114,+ 111,+ 106,+ 101,+ 99,+ 116,+ 115,+ 47,+ 42,+ 47,+ 98,+ 114,+ 97,+ 110,+ 99,+ 104,+ 101,+ 115,+ 47,+ 42,+ 125,+ 58,+ 114,+ 101,+ 98,+ 97,+ 115,+ 101,+ ]),+ ],+ },+ },+ },deleteBranch: {name: "DeleteBranch",requestType: DeleteBranchRequest,diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex fca0028a30..19e6af9e56 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -193,6 +193,7 @@- [ListBranchesRequest](#bytebase-v1-ListBranchesRequest)- [ListBranchesResponse](#bytebase-v1-ListBranchesResponse)- [MergeBranchRequest](#bytebase-v1-MergeBranchRequest)+ - [RebaseBranchRequest](#bytebase-v1-RebaseBranchRequest)- [UpdateBranchRequest](#bytebase-v1-UpdateBranchRequest)- [BranchView](#bytebase-v1-BranchView)@@ -3566,6 +3567,25 @@ 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. |+++++++<a name="bytebase-v1-RebaseBranchRequest"></a>++### RebaseBranchRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the base branch to merge to. Format: projects/{project}/branches/{branch} |+| source_database | [string](#string) | | The database (remote upstream) used to rebase. We use its schema as baseline and reapply the difference between base and head of the named branch. Format: instances/{instance}/databases/{database} |+| source_branch | [string](#string) | | The branch (remote upstream) used to rebase. We use its head as baseline. We use its head schema as baseline and reapply the difference between base and head of the named branch. 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. This has to be set together with source_database or source_branch. |@@ -3621,6 +3641,7 @@ The branch's `name` field is used to identify the branch to update. Format:| CreateBranch | [CreateBranchRequest](#bytebase-v1-CreateBranchRequest) | [Branch](#bytebase-v1-Branch) | || UpdateBranch | [UpdateBranchRequest](#bytebase-v1-UpdateBranchRequest) | [Branch](#bytebase-v1-Branch) | || MergeBranch | [MergeBranchRequest](#bytebase-v1-MergeBranchRequest) | [Branch](#bytebase-v1-Branch) | |+| RebaseBranch | [RebaseBranchRequest](#bytebase-v1-RebaseBranchRequest) | [Branch](#bytebase-v1-Branch) | || DeleteBranch | [DeleteBranchRequest](#bytebase-v1-DeleteBranchRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | || DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | |diff --git a/proto/generated-go/v1/branch_service.pb.go b/proto/generated-go/v1/branch_service.pb.goindex 9725824bd0..2393790819 100644--- a/proto/generated-go/v1/branch_service.pb.go+++ b/proto/generated-go/v1/branch_service.pb.go@@ -586,6 +586,8 @@ 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.+ MergedSchema string `protobuf:"bytes,3,opt,name=merged_schema,json=mergedSchema,proto3" json:"merged_schema,omitempty"`}func (x *MergeBranchRequest) Reset() {@@ -634,6 +636,94 @@ func (x *MergeBranchRequest) GetHeadBranch() string {return ""}+func (x *MergeBranchRequest) GetMergedSchema() string {+ if x != nil {+ return x.MergedSchema+ }+ return ""+}++type RebaseBranchRequest struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of the base branch to merge to.+ // Format: projects/{project}/branches/{branch}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The database (remote upstream) used to rebase.+ // We use its schema as baseline and reapply the difference between base and head of the named branch.+ // Format: instances/{instance}/databases/{database}+ SourceDatabase string `protobuf:"bytes,2,opt,name=source_database,json=sourceDatabase,proto3" json:"source_database,omitempty"`+ // The branch (remote upstream) used to rebase. We use its head as baseline.+ // We use its head schema as baseline and reapply the difference between base and head of the named branch.+ // Format: projects/{project}/branches/{branch}+ SourceBranch string `protobuf:"bytes,3,opt,name=source_branch,json=sourceBranch,proto3" json:"source_branch,omitempty"`+ // For failed merge, we will pass in this addition merged schema and use it for head.+ // This has to be set together with source_database or source_branch.+ MergedSchema string `protobuf:"bytes,4,opt,name=merged_schema,json=mergedSchema,proto3" json:"merged_schema,omitempty"`+}++func (x *RebaseBranchRequest) Reset() {+ *x = RebaseBranchRequest{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_branch_service_proto_msgTypes[7]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *RebaseBranchRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*RebaseBranchRequest) ProtoMessage() {}++func (x *RebaseBranchRequest) 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 RebaseBranchRequest.ProtoReflect.Descriptor instead.+func (*RebaseBranchRequest) Descriptor() ([]byte, []int) {+ return file_v1_branch_service_proto_rawDescGZIP(), []int{7}+}++func (x *RebaseBranchRequest) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *RebaseBranchRequest) GetSourceDatabase() string {+ if x != nil {+ return x.SourceDatabase+ }+ return ""+}++func (x *RebaseBranchRequest) GetSourceBranch() string {+ if x != nil {+ return x.SourceBranch+ }+ return ""+}++func (x *RebaseBranchRequest) GetMergedSchema() string {+ if x != nil {+ return x.MergedSchema+ }+ return ""+}+type DeleteBranchRequest struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -647,7 +737,7 @@ type DeleteBranchRequest struct {func (x *DeleteBranchRequest) Reset() {*x = DeleteBranchRequest{}if protoimpl.UnsafeEnabled {- mi := &file_v1_branch_service_proto_msgTypes[7]+ mi := &file_v1_branch_service_proto_msgTypes[8]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -660,7 +750,7 @@ func (x *DeleteBranchRequest) String() string {func (*DeleteBranchRequest) ProtoMessage() {}func (x *DeleteBranchRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_branch_service_proto_msgTypes[7]+ mi := &file_v1_branch_service_proto_msgTypes[8]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -673,7 +763,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{7}+ return file_v1_branch_service_proto_rawDescGZIP(), []int{8}}func (x *DeleteBranchRequest) GetName() string {@@ -699,7 +789,7 @@ type DiffMetadataRequest struct {func (x *DiffMetadataRequest) Reset() {*x = DiffMetadataRequest{}if protoimpl.UnsafeEnabled {- mi := &file_v1_branch_service_proto_msgTypes[8]+ mi := &file_v1_branch_service_proto_msgTypes[9]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -712,7 +802,7 @@ func (x *DiffMetadataRequest) String() string {func (*DiffMetadataRequest) ProtoMessage() {}func (x *DiffMetadataRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_branch_service_proto_msgTypes[8]+ mi := &file_v1_branch_service_proto_msgTypes[9]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -725,7 +815,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{8}+ return file_v1_branch_service_proto_rawDescGZIP(), []int{9}}func (x *DiffMetadataRequest) GetSourceMetadata() *DatabaseMetadata {@@ -761,7 +851,7 @@ type DiffMetadataResponse struct {func (x *DiffMetadataResponse) Reset() {*x = DiffMetadataResponse{}if protoimpl.UnsafeEnabled {- mi := &file_v1_branch_service_proto_msgTypes[9]+ mi := &file_v1_branch_service_proto_msgTypes[10]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -774,7 +864,7 @@ func (x *DiffMetadataResponse) String() string {func (*DiffMetadataResponse) ProtoMessage() {}func (x *DiffMetadataResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_branch_service_proto_msgTypes[9]+ mi := &file_v1_branch_service_proto_msgTypes[10]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -787,7 +877,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{9}+ return file_v1_branch_service_proto_rawDescGZIP(), []int{10}}func (x *DiffMetadataResponse) GetDiff() string {@@ -894,98 +984,117 @@ var file_v1_branch_service_proto_rawDesc = []byte{0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01,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, 0x22, 0x53, 0x0a, 0x12, 0x4d, 0x65,+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x73, 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, 0x24, 0x0a, 0x0b, 0x68, 0x65, 0x61,- 0x64, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,- 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22,- 0x2e, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 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, 0x22,- 0xdc, 0x01, 0x0a, 0x13, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63,- 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,- 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,- 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42,- 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61,- 0x64, 0x61, 0x74, 0x61, 0x12, 0x4b, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6d,- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61,- 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41,- 0x02, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,- 0x61, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,- 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,- 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x2a,- 0x0a, 0x14, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65,- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x01,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x2a, 0x56, 0x0a, 0x0a, 0x42, 0x72,- 0x61, 0x6e, 0x63, 0x68, 0x56, 0x69, 0x65, 0x77, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x52, 0x41, 0x4e,- 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,- 0x49, 0x45, 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, 0xa5, 0x07, 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, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42,- 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,- 0xe4, 0x93, 0x02, 0x22, 0x12, 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, 0x80, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x42,- 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,- 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e,- 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0xda, 0x41,- 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61,- 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d,- 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0c, 0x43, 0x72,- 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 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, 0x3e, 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x72, 0x61,- 0x6e, 0x63, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63,- 0x68, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70,- 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63,- 0x68, 0x12, 0x93, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e,- 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71,+ 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, 0x22,+ 0xa1, 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, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62,+ 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63,+ 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75,+ 0x72, 0x63, 0x65, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,+ 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x23,+ 0x0a, 0x0d, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18,+ 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x53, 0x63, 0x68,+ 0x65, 0x6d, 0x61, 0x22, 0x2e, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 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, 0x22, 0xdc, 0x01, 0x0a, 0x13, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61,+ 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x0f, 0x73,+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64,+ 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4b, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67,+ 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28,+ 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,+ 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,+ 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x65, 0x74,+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18,+ 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69,+ 0x6e, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,+ 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69,+ 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x2a, 0x56,+ 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x56, 0x69, 0x65, 0x77, 0x12, 0x1b, 0x0a, 0x17,+ 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50,+ 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 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, 0x97, 0x08, 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, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x4c, 0xda, 0x41, 0x12, 0x62, 0x72,- 0x61, 0x6e, 0x63, 0x68, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b,- 0x82, 0xd3, 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, 0x86, 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, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x41, 0xda,- 0x41, 0x10, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x61,- 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e,+ 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61,+ 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 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, 0x3a, 0x6d, 0x65, 0x72, 0x67, 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,+ 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x0c, 0x4c,+ 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72,+ 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,+ 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,+ 0x22, 0x2b, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31,+ 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,+ 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x85, 0x01,+ 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65,+ 0x61, 0x74, 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, 0x3e, 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,+ 0x2c, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x06, 0x62,+ 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65,+ 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62,+ 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x93, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,+ 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 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, 0x4c, 0xda,+ 0x41, 0x12, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,+ 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 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, 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, 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,+ 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 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, 0x7d, 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, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 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, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,+ 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a,+ 0x7d, 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, 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 (@@ -1001,7 +1110,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, 10)+var file_v1_branch_service_proto_msgTypes = make([]protoimpl.MessageInfo, 11)var file_v1_branch_service_proto_goTypes = []interface{}{(BranchView)(0), // 0: bytebase.v1.BranchView(*Branch)(nil), // 1: bytebase.v1.Branch@@ -1011,45 +1120,48 @@ 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- (*DeleteBranchRequest)(nil), // 8: bytebase.v1.DeleteBranchRequest- (*DiffMetadataRequest)(nil), // 9: bytebase.v1.DiffMetadataRequest- (*DiffMetadataResponse)(nil), // 10: bytebase.v1.DiffMetadataResponse- (*DatabaseMetadata)(nil), // 11: bytebase.v1.DatabaseMetadata- (Engine)(0), // 12: bytebase.v1.Engine- (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp- (*fieldmaskpb.FieldMask)(nil), // 14: google.protobuf.FieldMask- (*emptypb.Empty)(nil), // 15: google.protobuf.Empty+ (*RebaseBranchRequest)(nil), // 8: bytebase.v1.RebaseBranchRequest+ (*DeleteBranchRequest)(nil), // 9: bytebase.v1.DeleteBranchRequest+ (*DiffMetadataRequest)(nil), // 10: bytebase.v1.DiffMetadataRequest+ (*DiffMetadataResponse)(nil), // 11: bytebase.v1.DiffMetadataResponse+ (*DatabaseMetadata)(nil), // 12: bytebase.v1.DatabaseMetadata+ (Engine)(0), // 13: bytebase.v1.Engine+ (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp+ (*fieldmaskpb.FieldMask)(nil), // 15: google.protobuf.FieldMask+ (*emptypb.Empty)(nil), // 16: google.protobuf.Empty}var file_v1_branch_service_proto_depIdxs = []int32{- 11, // 0: bytebase.v1.Branch.schema_metadata:type_name -> bytebase.v1.DatabaseMetadata- 11, // 1: bytebase.v1.Branch.baseline_schema_metadata:type_name -> bytebase.v1.DatabaseMetadata- 12, // 2: bytebase.v1.Branch.engine:type_name -> bytebase.v1.Engine- 13, // 3: bytebase.v1.Branch.create_time:type_name -> google.protobuf.Timestamp- 13, // 4: bytebase.v1.Branch.update_time:type_name -> google.protobuf.Timestamp+ 12, // 0: bytebase.v1.Branch.schema_metadata:type_name -> bytebase.v1.DatabaseMetadata+ 12, // 1: bytebase.v1.Branch.baseline_schema_metadata:type_name -> bytebase.v1.DatabaseMetadata+ 13, // 2: bytebase.v1.Branch.engine:type_name -> bytebase.v1.Engine+ 14, // 3: bytebase.v1.Branch.create_time:type_name -> google.protobuf.Timestamp+ 14, // 4: bytebase.v1.Branch.update_time:type_name -> google.protobuf.Timestamp0, // 5: bytebase.v1.ListBranchesRequest.view:type_name -> bytebase.v1.BranchView1, // 6: bytebase.v1.ListBranchesResponse.branches:type_name -> bytebase.v1.Branch1, // 7: bytebase.v1.CreateBranchRequest.branch:type_name -> bytebase.v1.Branch1, // 8: bytebase.v1.UpdateBranchRequest.branch:type_name -> bytebase.v1.Branch- 14, // 9: bytebase.v1.UpdateBranchRequest.update_mask:type_name -> google.protobuf.FieldMask- 11, // 10: bytebase.v1.DiffMetadataRequest.source_metadata:type_name -> bytebase.v1.DatabaseMetadata- 11, // 11: bytebase.v1.DiffMetadataRequest.target_metadata:type_name -> bytebase.v1.DatabaseMetadata- 12, // 12: bytebase.v1.DiffMetadataRequest.engine:type_name -> bytebase.v1.Engine+ 15, // 9: bytebase.v1.UpdateBranchRequest.update_mask:type_name -> google.protobuf.FieldMask+ 12, // 10: bytebase.v1.DiffMetadataRequest.source_metadata:type_name -> bytebase.v1.DatabaseMetadata+ 12, // 11: bytebase.v1.DiffMetadataRequest.target_metadata:type_name -> bytebase.v1.DatabaseMetadata+ 13, // 12: bytebase.v1.DiffMetadataRequest.engine:type_name -> bytebase.v1.Engine2, // 13: bytebase.v1.BranchService.GetBranch:input_type -> bytebase.v1.GetBranchRequest3, // 14: bytebase.v1.BranchService.ListBranches:input_type -> bytebase.v1.ListBranchesRequest5, // 15: bytebase.v1.BranchService.CreateBranch:input_type -> bytebase.v1.CreateBranchRequest6, // 16: bytebase.v1.BranchService.UpdateBranch:input_type -> bytebase.v1.UpdateBranchRequest7, // 17: bytebase.v1.BranchService.MergeBranch:input_type -> bytebase.v1.MergeBranchRequest- 8, // 18: bytebase.v1.BranchService.DeleteBranch:input_type -> bytebase.v1.DeleteBranchRequest- 9, // 19: bytebase.v1.BranchService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest- 1, // 20: bytebase.v1.BranchService.GetBranch:output_type -> bytebase.v1.Branch- 4, // 21: bytebase.v1.BranchService.ListBranches:output_type -> bytebase.v1.ListBranchesResponse- 1, // 22: bytebase.v1.BranchService.CreateBranch:output_type -> bytebase.v1.Branch- 1, // 23: bytebase.v1.BranchService.UpdateBranch:output_type -> bytebase.v1.Branch- 1, // 24: bytebase.v1.BranchService.MergeBranch:output_type -> bytebase.v1.Branch- 15, // 25: bytebase.v1.BranchService.DeleteBranch:output_type -> google.protobuf.Empty- 10, // 26: bytebase.v1.BranchService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse- 20, // [20:27] is the sub-list for method output_type- 13, // [13:20] is the sub-list for method input_type+ 8, // 18: bytebase.v1.BranchService.RebaseBranch:input_type -> bytebase.v1.RebaseBranchRequest+ 9, // 19: bytebase.v1.BranchService.DeleteBranch:input_type -> bytebase.v1.DeleteBranchRequest+ 10, // 20: bytebase.v1.BranchService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest+ 1, // 21: bytebase.v1.BranchService.GetBranch:output_type -> bytebase.v1.Branch+ 4, // 22: bytebase.v1.BranchService.ListBranches:output_type -> bytebase.v1.ListBranchesResponse+ 1, // 23: bytebase.v1.BranchService.CreateBranch:output_type -> bytebase.v1.Branch+ 1, // 24: bytebase.v1.BranchService.UpdateBranch:output_type -> bytebase.v1.Branch+ 1, // 25: bytebase.v1.BranchService.MergeBranch:output_type -> bytebase.v1.Branch+ 1, // 26: bytebase.v1.BranchService.RebaseBranch:output_type -> bytebase.v1.Branch+ 16, // 27: bytebase.v1.BranchService.DeleteBranch:output_type -> google.protobuf.Empty+ 11, // 28: bytebase.v1.BranchService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse+ 21, // [21:29] is the sub-list for method output_type+ 13, // [13:21] is the sub-list for method input_type13, // [13:13] is the sub-list for extension type_name13, // [13:13] is the sub-list for extension extendee0, // [0:13] is the sub-list for field type_name@@ -1148,7 +1260,7 @@ func file_v1_branch_service_proto_init() {}}file_v1_branch_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*DeleteBranchRequest); i {+ switch v := v.(*RebaseBranchRequest); i {case 0:return &v.statecase 1:@@ -1160,7 +1272,7 @@ func file_v1_branch_service_proto_init() {}}file_v1_branch_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*DiffMetadataRequest); i {+ switch v := v.(*DeleteBranchRequest); i {case 0:return &v.statecase 1:@@ -1172,6 +1284,18 @@ func file_v1_branch_service_proto_init() {}}file_v1_branch_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*DiffMetadataRequest); 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[10].Exporter = func(v interface{}, i int) interface{} {switch v := v.(*DiffMetadataResponse); i {case 0:return &v.state@@ -1190,7 +1314,7 @@ func file_v1_branch_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_v1_branch_service_proto_rawDesc,NumEnums: 1,- NumMessages: 10,+ NumMessages: 11,NumExtensions: 0,NumServices: 1,},diff --git a/proto/generated-go/v1/branch_service.pb.gw.go b/proto/generated-go/v1/branch_service.pb.gw.goindex 3774823918..feb8f2dcd5 100644--- a/proto/generated-go/v1/branch_service.pb.gw.go+++ b/proto/generated-go/v1/branch_service.pb.gw.go@@ -409,6 +409,76 @@ func local_request_BranchService_MergeBranch_0(ctx context.Context, marshaler ru}+var (+ filter_BranchService_RebaseBranch_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}+)++func request_BranchService_RebaseBranch_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq RebaseBranchRequest+ var metadata runtime.ServerMetadata++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")+ }++ protoReq.Name, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)+ }++ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_RebaseBranch_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ msg, err := client.RebaseBranch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err++}++func local_request_BranchService_RebaseBranch_0(ctx context.Context, marshaler runtime.Marshaler, server BranchServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq RebaseBranchRequest+ var metadata runtime.ServerMetadata++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")+ }++ protoReq.Name, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)+ }++ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_RebaseBranch_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ msg, err := server.RebaseBranch(ctx, &protoReq)+ return msg, metadata, err++}+func request_BranchService_DeleteBranch_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {var protoReq DeleteBranchRequestvar metadata runtime.ServerMetadata@@ -626,6 +696,31 @@ func RegisterBranchServiceHandlerServer(ctx context.Context, mux *runtime.ServeM})+ mux.Handle("POST", pattern_BranchService_RebaseBranch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ var err error+ var annotatedContext context.Context+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.BranchService/RebaseBranch", runtime.WithHTTPPathPattern("/v1/{name=projects/*/branches/*}:rebase"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_BranchService_RebaseBranch_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }++ forward_BranchService_RebaseBranch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })+mux.Handle("DELETE", pattern_BranchService_DeleteBranch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -827,6 +922,28 @@ func RegisterBranchServiceHandlerClient(ctx context.Context, mux *runtime.ServeM})+ mux.Handle("POST", pattern_BranchService_RebaseBranch_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)+ var err error+ var annotatedContext context.Context+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.BranchService/RebaseBranch", runtime.WithHTTPPathPattern("/v1/{name=projects/*/branches/*}:rebase"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_BranchService_RebaseBranch_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }++ forward_BranchService_RebaseBranch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })+mux.Handle("DELETE", pattern_BranchService_DeleteBranch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -885,6 +1002,8 @@ var (pattern_BranchService_MergeBranch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "branches", "name"}, "merge"))+ pattern_BranchService_RebaseBranch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "branches", "name"}, "rebase"))+pattern_BranchService_DeleteBranch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "branches", "name"}, ""))pattern_BranchService_DiffMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "schemaDesign"}, "diffMetadata"))@@ -901,6 +1020,8 @@ var (forward_BranchService_MergeBranch_0 = runtime.ForwardResponseMessage+ forward_BranchService_RebaseBranch_0 = runtime.ForwardResponseMessage+forward_BranchService_DeleteBranch_0 = runtime.ForwardResponseMessageforward_BranchService_DiffMetadata_0 = runtime.ForwardResponseMessagediff --git a/proto/generated-go/v1/branch_service_grpc.pb.go b/proto/generated-go/v1/branch_service_grpc.pb.goindex 8bcee391bc..2b2de1aa12 100644--- a/proto/generated-go/v1/branch_service_grpc.pb.go+++ b/proto/generated-go/v1/branch_service_grpc.pb.go@@ -25,6 +25,7 @@ const (BranchService_CreateBranch_FullMethodName = "/bytebase.v1.BranchService/CreateBranch"BranchService_UpdateBranch_FullMethodName = "/bytebase.v1.BranchService/UpdateBranch"BranchService_MergeBranch_FullMethodName = "/bytebase.v1.BranchService/MergeBranch"+ BranchService_RebaseBranch_FullMethodName = "/bytebase.v1.BranchService/RebaseBranch"BranchService_DeleteBranch_FullMethodName = "/bytebase.v1.BranchService/DeleteBranch"BranchService_DiffMetadata_FullMethodName = "/bytebase.v1.BranchService/DiffMetadata")@@ -38,6 +39,7 @@ type BranchServiceClient interface {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) (*Branch, error)+ RebaseBranch(ctx context.Context, in *RebaseBranchRequest, opts ...grpc.CallOption) (*Branch, error)DeleteBranch(ctx context.Context, in *DeleteBranchRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error)}@@ -95,6 +97,15 @@ func (c *branchServiceClient) MergeBranch(ctx context.Context, in *MergeBranchRereturn out, nil}+func (c *branchServiceClient) RebaseBranch(ctx context.Context, in *RebaseBranchRequest, opts ...grpc.CallOption) (*Branch, error) {+ out := new(Branch)+ err := c.cc.Invoke(ctx, BranchService_RebaseBranch_FullMethodName, in, out, opts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}+func (c *branchServiceClient) DeleteBranch(ctx context.Context, in *DeleteBranchRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {out := new(emptypb.Empty)err := c.cc.Invoke(ctx, BranchService_DeleteBranch_FullMethodName, in, out, opts...)@@ -122,6 +133,7 @@ type BranchServiceServer interface {CreateBranch(context.Context, *CreateBranchRequest) (*Branch, error)UpdateBranch(context.Context, *UpdateBranchRequest) (*Branch, error)MergeBranch(context.Context, *MergeBranchRequest) (*Branch, error)+ RebaseBranch(context.Context, *RebaseBranchRequest) (*Branch, error)DeleteBranch(context.Context, *DeleteBranchRequest) (*emptypb.Empty, error)DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error)mustEmbedUnimplementedBranchServiceServer()@@ -146,6 +158,9 @@ func (UnimplementedBranchServiceServer) UpdateBranch(context.Context, *UpdateBrafunc (UnimplementedBranchServiceServer) MergeBranch(context.Context, *MergeBranchRequest) (*Branch, error) {return nil, status.Errorf(codes.Unimplemented, "method MergeBranch not implemented")}+func (UnimplementedBranchServiceServer) RebaseBranch(context.Context, *RebaseBranchRequest) (*Branch, error) {+ return nil, status.Errorf(codes.Unimplemented, "method RebaseBranch not implemented")+}func (UnimplementedBranchServiceServer) DeleteBranch(context.Context, *DeleteBranchRequest) (*emptypb.Empty, error) {return nil, status.Errorf(codes.Unimplemented, "method DeleteBranch not implemented")}@@ -255,6 +270,24 @@ func _BranchService_MergeBranch_Handler(srv interface{}, ctx context.Context, dereturn interceptor(ctx, in, info, handler)}+func _BranchService_RebaseBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(RebaseBranchRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(BranchServiceServer).RebaseBranch(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: BranchService_RebaseBranch_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(BranchServiceServer).RebaseBranch(ctx, req.(*RebaseBranchRequest))+ }+ return interceptor(ctx, in, info, handler)+}+func _BranchService_DeleteBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {in := new(DeleteBranchRequest)if err := dec(in); err != nil {@@ -318,6 +351,10 @@ var BranchService_ServiceDesc = grpc.ServiceDesc{MethodName: "MergeBranch",Handler: _BranchService_MergeBranch_Handler,},+ {+ MethodName: "RebaseBranch",+ Handler: _BranchService_RebaseBranch_Handler,+ },{MethodName: "DeleteBranch",Handler: _BranchService_DeleteBranch_Handler,diff --git a/proto/v1/branch_service.proto b/proto/v1/branch_service.protoindex 42c63e8d23..a5d8567b19 100644--- a/proto/v1/branch_service.proto+++ b/proto/v1/branch_service.proto@@ -42,7 +42,12 @@ service BranchService {rpc MergeBranch(MergeBranchRequest) returns (Branch) {option (google.api.http) = {post: "/v1/{name=projects/*/branches/*}:merge"};- option (google.api.method_signature) = "name,target_name";+ option (google.api.method_signature) = "name";+ }++ rpc RebaseBranch(RebaseBranchRequest) returns (Branch) {+ option (google.api.http) = {post: "/v1/{name=projects/*/branches/*}:rebase"};+ option (google.api.method_signature) = "name";}rpc DeleteBranch(DeleteBranchRequest) returns (google.protobuf.Empty) {@@ -190,7 +195,30 @@ message MergeBranchRequest {// The head branch to merge from.// Format: projects/{project}/branches/{branch}- string head_branch = 2 [(google.api.field_behavior) = REQUIRED];+ string head_branch = 2;++ // For failed merge.+ string merged_schema = 3;+}++message RebaseBranchRequest {+ // The name of the base branch to merge to.+ // Format: projects/{project}/branches/{branch}+ string name = 1 [(google.api.field_behavior) = REQUIRED];++ // The database (remote upstream) used to rebase.+ // We use its schema as baseline and reapply the difference between base and head of the named branch.+ // Format: instances/{instance}/databases/{database}+ string source_database = 2;++ // The branch (remote upstream) used to rebase. We use its head as baseline.+ // We use its head schema as baseline and reapply the difference between base and head of the named branch.+ // Format: projects/{project}/branches/{branch}+ string source_branch = 3;++ // For failed merge, we will pass in this addition merged schema and use it for head.+ // This has to be set together with source_database or source_branch.+ string merged_schema = 4;}message DeleteBranchRequest {diff --git a/scripts/check_link_test.go b/scripts/check_link_test.goindex e7b0173f81..2342c27b12 100644--- a/scripts/check_link_test.go+++ b/scripts/check_link_test.go@@ -97,7 +97,7 @@ func checkLinkWithRetry(link string) error {if err != nil {return errors.Wrapf(err, "failed to request link: %s", link)}- if res.StatusCode != http.StatusOK {+ if res.StatusCode != http.StatusOK && res.StatusCode != http.StatusPermanentRedirect {time.Sleep(1 * time.Minute)continue}