Skip to content

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

feat: task release source (#14049)

p0nyf231e1a3f89c
diff --git a/backend/api/v1/rollout_service_task.go b/backend/api/v1/rollout_service_task.go
index a63a8010a3..6ac2b5c1b2 100644
--- a/backend/api/v1/rollout_service_task.go
+++ b/backend/api/v1/rollout_service_task.go
@@ -361,6 +361,9 @@ func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s
payload := &storepb.TaskDatabaseUpdatePayload{
SpecId: spec.Id,
SchemaVersion: getOrDefaultSchemaVersion(c.SchemaVersion),
+ TaskReleaseSource: &storepb.TaskReleaseSource{
+ File: spec.SpecReleaseSource.GetFile(),
+ },
}
bytes, err := protojson.Marshal(payload)
if err != nil {
@@ -386,6 +389,9 @@ func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s
SpecId: spec.Id,
SheetId: int32(sheetUID),
SchemaVersion: getOrDefaultSchemaVersion(c.SchemaVersion),
+ TaskReleaseSource: &storepb.TaskReleaseSource{
+ File: spec.SpecReleaseSource.GetFile(),
+ },
}
bytes, err := protojson.Marshal(payload)
if err != nil {
@@ -411,6 +417,9 @@ func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s
SpecId: spec.Id,
SheetId: int32(sheetUID),
SchemaVersion: getOrDefaultSchemaVersion(c.SchemaVersion),
+ TaskReleaseSource: &storepb.TaskReleaseSource{
+ File: spec.SpecReleaseSource.GetFile(),
+ },
}
bytes, err := protojson.Marshal(payload)
if err != nil {
@@ -442,6 +451,9 @@ func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s
SheetId: int32(sheetUID),
SchemaVersion: getOrDefaultSchemaVersion(c.SchemaVersion),
Flags: c.GhostFlags,
+ TaskReleaseSource: &storepb.TaskReleaseSource{
+ File: spec.SpecReleaseSource.GetFile(),
+ },
}
bytesSync, err := json.Marshal(payloadSync)
if err != nil {
@@ -494,6 +506,9 @@ func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s
SheetId: int32(sheetUID),
SchemaVersion: getOrDefaultSchemaVersion(c.SchemaVersion),
PreUpdateBackupDetail: preUpdateBackupDetail,
+ TaskReleaseSource: &storepb.TaskReleaseSource{
+ File: spec.SpecReleaseSource.GetFile(),
+ },
}
bytes, err := protojson.Marshal(payload)
if err != nil {
diff --git a/frontend/src/types/proto/store/task.ts b/frontend/src/types/proto/store/task.ts
index 26d54dbc8b..f5a86cc1c2 100644
--- a/frontend/src/types/proto/store/task.ts
+++ b/frontend/src/types/proto/store/task.ts
@@ -28,7 +28,7 @@ export interface TaskDatabaseCreatePayload {
labels: string;
}
-/** TaskDatabaseDataUpdatePayload is the task payload for database data update (DML). */
+/** TaskDatabaseUpdatePayload is the task payload for updating database (DDL & DML). */
export interface TaskDatabaseUpdatePayload {
/** common fields */
skipped: boolean;
@@ -41,6 +41,7 @@ export interface TaskDatabaseUpdatePayload {
| undefined;
/** flags is used for ghost sync */
flags: { [key: string]: string };
+ taskReleaseSource: TaskReleaseSource | undefined;
}
export interface TaskDatabaseUpdatePayload_FlagsEntry {
@@ -57,6 +58,11 @@ export interface TaskDatabaseDataExportPayload {
format: ExportFormat;
}
+export interface TaskReleaseSource {
+ /** Format: projects/{project}/releases/{release}/files/{file} */
+ file: string;
+}
+
function createBaseTaskDatabaseCreatePayload(): TaskDatabaseCreatePayload {
return {
skipped: false,
@@ -287,6 +293,7 @@ function createBaseTaskDatabaseUpdatePayload(): TaskDatabaseUpdatePayload {
sheetId: 0,
preUpdateBackupDetail: undefined,
flags: {},
+ taskReleaseSource: undefined,
};
}
@@ -313,6 +320,9 @@ export const TaskDatabaseUpdatePayload: MessageFns<TaskDatabaseUpdatePayload> =
Object.entries(message.flags).forEach(([key, value]) => {
TaskDatabaseUpdatePayload_FlagsEntry.encode({ key: key as any, value }, writer.uint32(58).fork()).join();
});
+ if (message.taskReleaseSource !== undefined) {
+ TaskReleaseSource.encode(message.taskReleaseSource, writer.uint32(66).fork()).join();
+ }
return writer;
},
@@ -375,6 +385,13 @@ export const TaskDatabaseUpdatePayload: MessageFns<TaskDatabaseUpdatePayload> =
message.flags[entry7.key] = entry7.value;
}
continue;
+ case 8:
+ if (tag !== 66) {
+ break;
+ }
+
+ message.taskReleaseSource = TaskReleaseSource.decode(reader, reader.uint32());
+ continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -400,6 +417,9 @@ export const TaskDatabaseUpdatePayload: MessageFns<TaskDatabaseUpdatePayload> =
return acc;
}, {})
: {},
+ taskReleaseSource: isSet(object.taskReleaseSource)
+ ? TaskReleaseSource.fromJSON(object.taskReleaseSource)
+ : undefined,
};
},
@@ -432,6 +452,9 @@ export const TaskDatabaseUpdatePayload: MessageFns<TaskDatabaseUpdatePayload> =
});
}
}
+ if (message.taskReleaseSource !== undefined) {
+ obj.taskReleaseSource = TaskReleaseSource.toJSON(message.taskReleaseSource);
+ }
return obj;
},
@@ -455,6 +478,9 @@ export const TaskDatabaseUpdatePayload: MessageFns<TaskDatabaseUpdatePayload> =
}
return acc;
}, {});
+ message.taskReleaseSource = (object.taskReleaseSource !== undefined && object.taskReleaseSource !== null)
+ ? TaskReleaseSource.fromPartial(object.taskReleaseSource)
+ : undefined;
return message;
},
};
@@ -637,6 +663,63 @@ export const TaskDatabaseDataExportPayload: MessageFns<TaskDatabaseDataExportPay
},
};
+function createBaseTaskReleaseSource(): TaskReleaseSource {
+ return { file: "" };
+}
+
+export const TaskReleaseSource: MessageFns<TaskReleaseSource> = {
+ encode(message: TaskReleaseSource, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.file !== "") {
+ writer.uint32(10).string(message.file);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): TaskReleaseSource {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseTaskReleaseSource();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.file = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): TaskReleaseSource {
+ return { file: isSet(object.file) ? globalThis.String(object.file) : "" };
+ },
+
+ toJSON(message: TaskReleaseSource): unknown {
+ const obj: any = {};
+ if (message.file !== "") {
+ obj.file = message.file;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<TaskReleaseSource>): TaskReleaseSource {
+ return TaskReleaseSource.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<TaskReleaseSource>): TaskReleaseSource {
+ const message = createBaseTaskReleaseSource();
+ message.file = object.file ?? "";
+ return message;
+ },
+};
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 6a8fd720c0..2dcb0643b3 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -295,6 +295,7 @@
- [TaskDatabaseDataExportPayload](#bytebase-store-TaskDatabaseDataExportPayload)
- [TaskDatabaseUpdatePayload](#bytebase-store-TaskDatabaseUpdatePayload)
- [TaskDatabaseUpdatePayload.FlagsEntry](#bytebase-store-TaskDatabaseUpdatePayload-FlagsEntry)
+ - [TaskReleaseSource](#bytebase-store-TaskReleaseSource)
- [store/task_run.proto](#store_task_run-proto)
- [PriorBackupDetail](#bytebase-store-PriorBackupDetail)
@@ -4554,7 +4555,7 @@ TaskDatabaseDataExportPayload is the task payload for database data export.
<a name="bytebase-store-TaskDatabaseUpdatePayload"></a>
### TaskDatabaseUpdatePayload
-TaskDatabaseDataUpdatePayload is the task payload for database data update (DML).
+TaskDatabaseUpdatePayload is the task payload for updating database (DDL &amp; DML).
| Field | Type | Label | Description |
@@ -4566,6 +4567,7 @@ TaskDatabaseDataUpdatePayload is the task payload for database data update (DML)
| sheet_id | [int32](#int32) | | |
| pre_update_backup_detail | [PreUpdateBackupDetail](#bytebase-store-PreUpdateBackupDetail) | | |
| flags | [TaskDatabaseUpdatePayload.FlagsEntry](#bytebase-store-TaskDatabaseUpdatePayload-FlagsEntry) | repeated | flags is used for ghost sync |
+| task_release_source | [TaskReleaseSource](#bytebase-store-TaskReleaseSource) | | |
@@ -4587,6 +4589,21 @@ TaskDatabaseDataUpdatePayload is the task payload for database data update (DML)
+
+<a name="bytebase-store-TaskReleaseSource"></a>
+
+### TaskReleaseSource
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| file | [string](#string) | | Format: projects/{project}/releases/{release}/files/{file} |
+
+
+
+
+
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 8c26481293..defd011a02 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -1376,6 +1376,10 @@
<a href="#bytebase.store.TaskDatabaseUpdatePayload.FlagsEntry"><span class="badge">M</span>TaskDatabaseUpdatePayload.FlagsEntry</a>
</li>
+ <li>
+ <a href="#bytebase.store.TaskReleaseSource"><span class="badge">M</span>TaskReleaseSource</a>
+ </li>
+
@@ -11295,7 +11299,7 @@ Default to this mode.</p></td>
<h3 id="bytebase.store.TaskDatabaseUpdatePayload">TaskDatabaseUpdatePayload</h3>
- <p>TaskDatabaseDataUpdatePayload is the task payload for database data update (DML).</p>
+ <p>TaskDatabaseUpdatePayload is the task payload for updating database (DDL & DML).</p>
<table class="field-table">
@@ -11353,6 +11357,13 @@ Default to this mode.</p></td>
<td><p>flags is used for ghost sync </p></td>
</tr>
+ <tr>
+ <td>task_release_source</td>
+ <td><a href="#bytebase.store.TaskReleaseSource">TaskReleaseSource</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
</tbody>
</table>
@@ -11391,6 +11402,30 @@ Default to this mode.</p></td>
+ <h3 id="bytebase.store.TaskReleaseSource">TaskReleaseSource</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>file</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: projects/{project}/releases/{release}/files/{file} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
diff --git a/proto/generated-go/store/task.pb.go b/proto/generated-go/store/task.pb.go
index 0ee6a5197f..563675c347 100644
--- a/proto/generated-go/store/task.pb.go
+++ b/proto/generated-go/store/task.pb.go
@@ -147,7 +147,7 @@ func (x *TaskDatabaseCreatePayload) GetLabels() string {
return ""
}
-// TaskDatabaseDataUpdatePayload is the task payload for database data update (DML).
+// TaskDatabaseUpdatePayload is the task payload for updating database (DDL & DML).
type TaskDatabaseUpdatePayload struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -161,7 +161,8 @@ type TaskDatabaseUpdatePayload struct {
SheetId int32 `protobuf:"varint,5,opt,name=sheet_id,json=sheetId,proto3" json:"sheet_id,omitempty"`
PreUpdateBackupDetail *PreUpdateBackupDetail `protobuf:"bytes,6,opt,name=pre_update_backup_detail,json=preUpdateBackupDetail,proto3" json:"pre_update_backup_detail,omitempty"`
// flags is used for ghost sync
- Flags map[string]string `protobuf:"bytes,7,rep,name=flags,proto3" json:"flags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Flags map[string]string `protobuf:"bytes,7,rep,name=flags,proto3" json:"flags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ TaskReleaseSource *TaskReleaseSource `protobuf:"bytes,8,opt,name=task_release_source,json=taskReleaseSource,proto3" json:"task_release_source,omitempty"`
}
func (x *TaskDatabaseUpdatePayload) Reset() {
@@ -243,6 +244,13 @@ func (x *TaskDatabaseUpdatePayload) GetFlags() map[string]string {
return nil
}
+func (x *TaskDatabaseUpdatePayload) GetTaskReleaseSource() *TaskReleaseSource {
+ if x != nil {
+ return x.TaskReleaseSource
+ }
+ return nil
+}
+
// TaskDatabaseDataExportPayload is the task payload for database data export.
type TaskDatabaseDataExportPayload struct {
state protoimpl.MessageState
@@ -314,6 +322,52 @@ func (x *TaskDatabaseDataExportPayload) GetFormat() ExportFormat {
return ExportFormat_FORMAT_UNSPECIFIED
}
+type TaskReleaseSource struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Format: projects/{project}/releases/{release}/files/{file}
+ File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
+}
+
+func (x *TaskReleaseSource) Reset() {
+ *x = TaskReleaseSource{}
+ mi := &file_store_task_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *TaskReleaseSource) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TaskReleaseSource) ProtoMessage() {}
+
+func (x *TaskReleaseSource) ProtoReflect() protoreflect.Message {
+ mi := &file_store_task_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TaskReleaseSource.ProtoReflect.Descriptor instead.
+func (*TaskReleaseSource) Descriptor() ([]byte, []int) {
+ return file_store_task_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *TaskReleaseSource) GetFile() string {
+ if x != nil {
+ return x.File
+ }
+ return ""
+}
+
var File_store_task_proto protoreflect.FileDescriptor
var file_store_task_proto_rawDesc = []byte{
@@ -345,7 +399,7 @@ var file_store_task_proto_rawDesc = []byte{
0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74,
0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x9d, 0x03, 0x0a, 0x19, 0x54,
+ 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0xf0, 0x03, 0x0a, 0x19, 0x54,
0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x70,
0x70, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x70, 0x70,
@@ -368,22 +422,30 @@ var file_store_task_proto_rawDesc = []byte{
0x74, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x46,
0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73,
- 0x1a, 0x38, 0x0a, 0x0a, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
- 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
- 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa5, 0x01, 0x0a, 0x1d, 0x54,
- 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x45,
- 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x17, 0x0a, 0x07,
- 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73,
- 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x65, 0x65, 0x74, 0x5f, 0x69,
- 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x68, 0x65, 0x65, 0x74, 0x49, 0x64,
- 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x34, 0x0a, 0x06,
- 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78,
- 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d,
- 0x61, 0x74, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d,
- 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x12, 0x51, 0x0a, 0x13, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
+ 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x54,
+ 0x61, 0x73, 0x6b, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x52, 0x11, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72,
+ 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
+ 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa5, 0x01,
+ 0x0a, 0x1d, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x44, 0x61,
+ 0x74, 0x61, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12,
+ 0x17, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x06, 0x73, 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x65, 0x65,
+ 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x68, 0x65, 0x65,
+ 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12,
+ 0x34, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65,
+ 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66,
+ 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x27, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x6c,
+ 0x65, 0x61, 0x73, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69,
+ 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x14,
+ 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73,
+ 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -398,24 +460,26 @@ func file_store_task_proto_rawDescGZIP() []byte {
return file_store_task_proto_rawDescData
}
-var file_store_task_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_store_task_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_store_task_proto_goTypes = []any{
(*TaskDatabaseCreatePayload)(nil), // 0: bytebase.store.TaskDatabaseCreatePayload
(*TaskDatabaseUpdatePayload)(nil), // 1: bytebase.store.TaskDatabaseUpdatePayload
(*TaskDatabaseDataExportPayload)(nil), // 2: bytebase.store.TaskDatabaseDataExportPayload
- nil, // 3: bytebase.store.TaskDatabaseUpdatePayload.FlagsEntry
- (*PreUpdateBackupDetail)(nil), // 4: bytebase.store.PreUpdateBackupDetail
- (ExportFormat)(0), // 5: bytebase.store.ExportFormat
+ (*TaskReleaseSource)(nil), // 3: bytebase.store.TaskReleaseSource
+ nil, // 4: bytebase.store.TaskDatabaseUpdatePayload.FlagsEntry
+ (*PreUpdateBackupDetail)(nil), // 5: bytebase.store.PreUpdateBackupDetail
+ (ExportFormat)(0), // 6: bytebase.store.ExportFormat
}
var file_store_task_proto_depIdxs = []int32{
- 4, // 0: bytebase.store.TaskDatabaseUpdatePayload.pre_update_backup_detail:type_name -> bytebase.store.PreUpdateBackupDetail
- 3, // 1: bytebase.store.TaskDatabaseUpdatePayload.flags:type_name -> bytebase.store.TaskDatabaseUpdatePayload.FlagsEntry
- 5, // 2: bytebase.store.TaskDatabaseDataExportPayload.format:type_name -> bytebase.store.ExportFormat
- 3, // [3:3] is the sub-list for method output_type
- 3, // [3:3] is the sub-list for method input_type
- 3, // [3:3] is the sub-list for extension type_name
- 3, // [3:3] is the sub-list for extension extendee
- 0, // [0:3] is the sub-list for field type_name
+ 5, // 0: bytebase.store.TaskDatabaseUpdatePayload.pre_update_backup_detail:type_name -> bytebase.store.PreUpdateBackupDetail
+ 4, // 1: bytebase.store.TaskDatabaseUpdatePayload.flags:type_name -> bytebase.store.TaskDatabaseUpdatePayload.FlagsEntry
+ 3, // 2: bytebase.store.TaskDatabaseUpdatePayload.task_release_source:type_name -> bytebase.store.TaskReleaseSource
+ 6, // 3: bytebase.store.TaskDatabaseDataExportPayload.format:type_name -> bytebase.store.ExportFormat
+ 4, // [4:4] is the sub-list for method output_type
+ 4, // [4:4] is the sub-list for method input_type
+ 4, // [4:4] is the sub-list for extension type_name
+ 4, // [4:4] is the sub-list for extension extendee
+ 0, // [0:4] is the sub-list for field type_name
}
func init() { file_store_task_proto_init() }
@@ -431,7 +495,7 @@ func file_store_task_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_store_task_proto_rawDesc,
NumEnums: 0,
- NumMessages: 4,
+ NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/proto/store/task.proto b/proto/store/task.proto
index a47a0b8154..6a86d74838 100644
--- a/proto/store/task.proto
+++ b/proto/store/task.proto
@@ -24,7 +24,7 @@ message TaskDatabaseCreatePayload {
string labels = 11;
}
-// TaskDatabaseDataUpdatePayload is the task payload for database data update (DML).
+// TaskDatabaseUpdatePayload is the task payload for updating database (DDL & DML).
message TaskDatabaseUpdatePayload {
// common fields
bool skipped = 1;
@@ -38,6 +38,8 @@ message TaskDatabaseUpdatePayload {
// flags is used for ghost sync
map<string, string> flags = 7;
+
+ TaskReleaseSource task_release_source = 8;
}
// TaskDatabaseDataExportPayload is the task payload for database data export.
@@ -49,3 +51,8 @@ message TaskDatabaseDataExportPayload {
string password = 3;
ExportFormat format = 4;
}
+
+message TaskReleaseSource {
+ // Format: projects/{project}/releases/{release}/files/{file}
+ string file = 1;
+}