Skip to content

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

feat(proto): taskrun run time (#16180)

p0nyf141385712f7
diff --git a/frontend/src/types/proto/v1/rollout_service.ts b/frontend/src/types/proto/v1/rollout_service.ts
index d78e870faa..172f2c3a35 100644
--- a/frontend/src/types/proto/v1/rollout_service.ts
+++ b/frontend/src/types/proto/v1/rollout_service.ts
@@ -25,6 +25,8 @@ export interface BatchRunTasksRequest {
*/
tasks: string[];
reason: string;
+ /** The task run should run after run_time. */
+ runTime?: Timestamp | undefined;
}
export interface BatchRunTasksResponse {
@@ -534,6 +536,11 @@ export interface TaskRun {
| undefined;
/** Format: projects/{project}/sheets/{sheet} */
sheet: string;
+ /**
+ * The task run should run after run_time.
+ * This can only be set when creating the task run calling BatchRunTasks.
+ */
+ runTime?: Timestamp | undefined;
}
export enum TaskRun_Status {
@@ -1049,7 +1056,7 @@ export interface PreviewTaskRunRollbackResponse {
}
function createBaseBatchRunTasksRequest(): BatchRunTasksRequest {
- return { parent: "", tasks: [], reason: "" };
+ return { parent: "", tasks: [], reason: "", runTime: undefined };
}
export const BatchRunTasksRequest: MessageFns<BatchRunTasksRequest> = {
@@ -1063,6 +1070,9 @@ export const BatchRunTasksRequest: MessageFns<BatchRunTasksRequest> = {
if (message.reason !== "") {
writer.uint32(26).string(message.reason);
}
+ if (message.runTime !== undefined) {
+ Timestamp.encode(message.runTime, writer.uint32(34).fork()).join();
+ }
return writer;
},
@@ -1097,6 +1107,14 @@ export const BatchRunTasksRequest: MessageFns<BatchRunTasksRequest> = {
message.reason = reader.string();
continue;
}
+ case 4: {
+ if (tag !== 34) {
+ break;
+ }
+
+ message.runTime = Timestamp.decode(reader, reader.uint32());
+ continue;
+ }
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -1111,6 +1129,7 @@ export const BatchRunTasksRequest: MessageFns<BatchRunTasksRequest> = {
parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
tasks: globalThis.Array.isArray(object?.tasks) ? object.tasks.map((e: any) => globalThis.String(e)) : [],
reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
+ runTime: isSet(object.runTime) ? fromJsonTimestamp(object.runTime) : undefined,
};
},
@@ -1125,6 +1144,9 @@ export const BatchRunTasksRequest: MessageFns<BatchRunTasksRequest> = {
if (message.reason !== "") {
obj.reason = message.reason;
}
+ if (message.runTime !== undefined) {
+ obj.runTime = fromTimestamp(message.runTime).toISOString();
+ }
return obj;
},
@@ -1136,6 +1158,9 @@ export const BatchRunTasksRequest: MessageFns<BatchRunTasksRequest> = {
message.parent = object.parent ?? "";
message.tasks = object.tasks?.map((e) => e) || [];
message.reason = object.reason ?? "";
+ message.runTime = (object.runTime !== undefined && object.runTime !== null)
+ ? Timestamp.fromPartial(object.runTime)
+ : undefined;
return message;
},
};
@@ -3155,6 +3180,7 @@ function createBaseTaskRun(): TaskRun {
priorBackupDetail: undefined,
schedulerInfo: undefined,
sheet: "",
+ runTime: undefined,
};
}
@@ -3199,6 +3225,9 @@ export const TaskRun: MessageFns<TaskRun> = {
if (message.sheet !== "") {
writer.uint32(154).string(message.sheet);
}
+ if (message.runTime !== undefined) {
+ Timestamp.encode(message.runTime, writer.uint32(170).fork()).join();
+ }
return writer;
},
@@ -3313,6 +3342,14 @@ export const TaskRun: MessageFns<TaskRun> = {
message.sheet = reader.string();
continue;
}
+ case 21: {
+ if (tag !== 170) {
+ break;
+ }
+
+ message.runTime = Timestamp.decode(reader, reader.uint32());
+ continue;
+ }
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -3341,6 +3378,7 @@ export const TaskRun: MessageFns<TaskRun> = {
: undefined,
schedulerInfo: isSet(object.schedulerInfo) ? TaskRun_SchedulerInfo.fromJSON(object.schedulerInfo) : undefined,
sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",
+ runTime: isSet(object.runTime) ? fromJsonTimestamp(object.runTime) : undefined,
};
},
@@ -3385,6 +3423,9 @@ export const TaskRun: MessageFns<TaskRun> = {
if (message.sheet !== "") {
obj.sheet = message.sheet;
}
+ if (message.runTime !== undefined) {
+ obj.runTime = fromTimestamp(message.runTime).toISOString();
+ }
return obj;
},
@@ -3417,6 +3458,9 @@ export const TaskRun: MessageFns<TaskRun> = {
? TaskRun_SchedulerInfo.fromPartial(object.schedulerInfo)
: undefined;
message.sheet = object.sheet ?? "";
+ message.runTime = (object.runTime !== undefined && object.runTime !== null)
+ ? Timestamp.fromPartial(object.runTime)
+ : undefined;
return message;
},
};
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 6beedad1c8..bb72caa02b 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -8334,6 +8334,10 @@ components:
Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}
reason:
type: string
+ runTime:
+ type: string
+ description: The task run should run after run_time.
+ format: date-time
BatchRunTasksResponse:
type: object
properties: {}
@@ -13519,6 +13523,13 @@ components:
readOnly: true
type: string
description: 'Format: projects/{project}/sheets/{sheet}'
+ runTime:
+ readOnly: true
+ type: string
+ description: |-
+ The task run should run after run_time.
+ This can only be set when creating the task run calling BatchRunTasks.
+ format: date-time
TaskRunLog:
type: object
properties:
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index f2ccf0317c..2bfd73cec9 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -9902,6 +9902,7 @@ When paginating, all other parameters provided to `ListRoles` must match the cal
| parent | [string](#string) | | The name of the parent of the tasks. Format: projects/{project}/rollouts/{rollout}/stages/{stage} |
| tasks | [string](#string) | repeated | The tasks to run. Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task} |
| reason | [string](#string) | | |
+| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. |
@@ -10310,6 +10311,7 @@ When paginating, all other parameters provided to `ListTaskRuns` must match the
| prior_backup_detail | [TaskRun.PriorBackupDetail](#bytebase-v1-TaskRun-PriorBackupDetail) | | The prior backup detail that will be used to rollback the task run. |
| scheduler_info | [TaskRun.SchedulerInfo](#bytebase-v1-TaskRun-SchedulerInfo) | | |
| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |
+| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. This can only be set when creating the task run calling BatchRunTasks. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 09f7963ef3..79cdf4ca8c 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -27376,6 +27376,13 @@ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task} </p></
<td><p> </p></td>
</tr>
+ <tr>
+ <td>run_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>optional</td>
+ <td><p>The task run should run after run_time. </p></td>
+ </tr>
+
</tbody>
</table>
@@ -28340,6 +28347,14 @@ Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></t
<td><p>Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
+ <tr>
+ <td>run_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>optional</td>
+ <td><p>The task run should run after run_time.
+This can only be set when creating the task run calling BatchRunTasks. </p></td>
+ </tr>
+
</tbody>
</table>
diff --git a/proto/generated-go/v1/rollout_service.pb.go b/proto/generated-go/v1/rollout_service.pb.go
index 7138ac9abb..2a52521ebb 100644
--- a/proto/generated-go/v1/rollout_service.pb.go
+++ b/proto/generated-go/v1/rollout_service.pb.go
@@ -442,8 +442,10 @@ type BatchRunTasksRequest struct {
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// The tasks to run.
// Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}
- Tasks []string `protobuf:"bytes,2,rep,name=tasks,proto3" json:"tasks,omitempty"`
- Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
+ Tasks []string `protobuf:"bytes,2,rep,name=tasks,proto3" json:"tasks,omitempty"`
+ Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
+ // The task run should run after run_time.
+ RunTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=run_time,json=runTime,proto3,oneof" json:"run_time,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -499,6 +501,13 @@ func (x *BatchRunTasksRequest) GetReason() string {
return ""
}
+func (x *BatchRunTasksRequest) GetRunTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.RunTime
+ }
+ return nil
+}
+
type BatchRunTasksResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
@@ -1638,7 +1647,10 @@ type TaskRun struct {
PriorBackupDetail *TaskRun_PriorBackupDetail `protobuf:"bytes,17,opt,name=prior_backup_detail,json=priorBackupDetail,proto3" json:"prior_backup_detail,omitempty"`
SchedulerInfo *TaskRun_SchedulerInfo `protobuf:"bytes,18,opt,name=scheduler_info,json=schedulerInfo,proto3" json:"scheduler_info,omitempty"`
// Format: projects/{project}/sheets/{sheet}
- Sheet string `protobuf:"bytes,19,opt,name=sheet,proto3" json:"sheet,omitempty"`
+ Sheet string `protobuf:"bytes,19,opt,name=sheet,proto3" json:"sheet,omitempty"`
+ // The task run should run after run_time.
+ // This can only be set when creating the task run calling BatchRunTasks.
+ RunTime *timestamppb.Timestamp `protobuf:"bytes,21,opt,name=run_time,json=runTime,proto3,oneof" json:"run_time,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1764,6 +1776,13 @@ func (x *TaskRun) GetSheet() string {
return ""
}
+func (x *TaskRun) GetRunTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.RunTime
+ }
+ return nil
+}
+
type TaskRunLog struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log
@@ -3537,11 +3556,13 @@ var File_v1_rollout_service_proto protoreflect.FileDescriptor
const file_v1_rollout_service_proto_rawDesc = "" +
"\n" +
- "\x18v1/rollout_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x15v1/plan_service.proto\"\\\n" +
+ "\x18v1/rollout_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x15v1/plan_service.proto\"\xa5\x01\n" +
"\x14BatchRunTasksRequest\x12\x16\n" +
"\x06parent\x18\x01 \x01(\tR\x06parent\x12\x14\n" +
"\x05tasks\x18\x02 \x03(\tR\x05tasks\x12\x16\n" +
- "\x06reason\x18\x03 \x01(\tR\x06reason\"\x17\n" +
+ "\x06reason\x18\x03 \x01(\tR\x06reason\x12:\n" +
+ "\brun_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\arunTime\x88\x01\x01B\v\n" +
+ "\t_run_time\"\x17\n" +
"\x15BatchRunTasksResponse\"]\n" +
"\x15BatchSkipTasksRequest\x12\x16\n" +
"\x06parent\x18\x01 \x01(\tR\x06parent\x12\x14\n" +
@@ -3663,7 +3684,7 @@ const file_v1_rollout_service_proto_rawDesc = "" +
"\x14DATABASE_DATA_UPDATE\x10\b\x12\x18\n" +
"\x14DATABASE_DATA_EXPORT\x10\f:Y\xeaAV\n" +
"\x11bytebase.com/Task\x12Aprojects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}B\t\n" +
- "\apayloadJ\x04\b\x02\x10\x03\"\xea\x0e\n" +
+ "\apayloadJ\x04\b\x02\x10\x03\"\xb9\x0f\n" +
"\aTaskRun\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
"\acreator\x18\x03 \x01(\tR\acreator\x12A\n" +
@@ -3680,7 +3701,8 @@ const file_v1_rollout_service_proto_rawDesc = "" +
"\x15export_archive_status\x18\x10 \x01(\x0e2(.bytebase.v1.TaskRun.ExportArchiveStatusR\x13exportArchiveStatus\x12V\n" +
"\x13prior_backup_detail\x18\x11 \x01(\v2&.bytebase.v1.TaskRun.PriorBackupDetailR\x11priorBackupDetail\x12O\n" +
"\x0escheduler_info\x18\x12 \x01(\v2\".bytebase.v1.TaskRun.SchedulerInfoB\x04\xe2A\x01\x03R\rschedulerInfo\x12\x1a\n" +
- "\x05sheet\x18\x13 \x01(\tB\x04\xe2A\x01\x03R\x05sheet\x1a\xd6\x03\n" +
+ "\x05sheet\x18\x13 \x01(\tB\x04\xe2A\x01\x03R\x05sheet\x12@\n" +
+ "\brun_time\x18\x15 \x01(\v2\x1a.google.protobuf.TimestampB\x04\xe2A\x01\x03H\x00R\arunTime\x88\x01\x01\x1a\xd6\x03\n" +
"\x11PriorBackupDetail\x12A\n" +
"\x05items\x18\x01 \x03(\v2+.bytebase.v1.TaskRun.PriorBackupDetail.ItemR\x05items\x1a\xfd\x02\n" +
"\x04Item\x12T\n" +
@@ -3716,7 +3738,8 @@ const file_v1_rollout_service_proto_rawDesc = "" +
"!EXPORT_ARCHIVE_STATUS_UNSPECIFIED\x10\x00\x12\t\n" +
"\x05READY\x10\x01\x12\f\n" +
"\bEXPORTED\x10\x02:o\xeaAl\n" +
- "\x14bytebase.com/TaskRun\x12Tprojects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}J\x04\b\x02\x10\x03J\x04\b\f\x10\rJ\x04\b\x0f\x10\x10\"\xd0\x01\n" +
+ "\x14bytebase.com/TaskRun\x12Tprojects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}B\v\n" +
+ "\t_run_timeJ\x04\b\x02\x10\x03J\x04\b\f\x10\rJ\x04\b\x0f\x10\x10\"\xd0\x01\n" +
"\n" +
"TaskRunLog\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x126\n" +
@@ -3924,100 +3947,102 @@ var file_v1_rollout_service_proto_goTypes = []any{
(*TaskRunLogEntry_CommandExecute_CommandResponse)(nil), // 50: bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse
(*TaskRunSession_Postgres)(nil), // 51: bytebase.v1.TaskRunSession.Postgres
(*TaskRunSession_Postgres_Session)(nil), // 52: bytebase.v1.TaskRunSession.Postgres.Session
- (*Plan)(nil), // 53: bytebase.v1.Plan
- (*timestamppb.Timestamp)(nil), // 54: google.protobuf.Timestamp
+ (*timestamppb.Timestamp)(nil), // 53: google.protobuf.Timestamp
+ (*Plan)(nil), // 54: bytebase.v1.Plan
(ExportFormat)(0), // 55: bytebase.v1.ExportFormat
(*Position)(nil), // 56: bytebase.v1.Position
}
var file_v1_rollout_service_proto_depIdxs = []int32{
- 22, // 0: bytebase.v1.ListRolloutsResponse.rollouts:type_name -> bytebase.v1.Rollout
- 22, // 1: bytebase.v1.CreateRolloutRequest.rollout:type_name -> bytebase.v1.Rollout
- 53, // 2: bytebase.v1.PreviewRolloutRequest.plan:type_name -> bytebase.v1.Plan
- 25, // 3: bytebase.v1.ListTaskRunsResponse.task_runs:type_name -> bytebase.v1.TaskRun
- 23, // 4: bytebase.v1.Rollout.stages:type_name -> bytebase.v1.Stage
- 54, // 5: bytebase.v1.Rollout.create_time:type_name -> google.protobuf.Timestamp
- 24, // 6: bytebase.v1.Stage.tasks:type_name -> bytebase.v1.Task
- 0, // 7: bytebase.v1.Task.status:type_name -> bytebase.v1.Task.Status
- 1, // 8: bytebase.v1.Task.type:type_name -> bytebase.v1.Task.Type
- 32, // 9: bytebase.v1.Task.database_create:type_name -> bytebase.v1.Task.DatabaseCreate
- 33, // 10: bytebase.v1.Task.database_schema_baseline:type_name -> bytebase.v1.Task.DatabaseSchemaBaseline
- 34, // 11: bytebase.v1.Task.database_schema_update:type_name -> bytebase.v1.Task.DatabaseSchemaUpdate
- 35, // 12: bytebase.v1.Task.database_data_update:type_name -> bytebase.v1.Task.DatabaseDataUpdate
- 36, // 13: bytebase.v1.Task.database_data_export:type_name -> bytebase.v1.Task.DatabaseDataExport
- 54, // 14: bytebase.v1.TaskRun.create_time:type_name -> google.protobuf.Timestamp
- 54, // 15: bytebase.v1.TaskRun.update_time:type_name -> google.protobuf.Timestamp
- 2, // 16: bytebase.v1.TaskRun.status:type_name -> bytebase.v1.TaskRun.Status
- 54, // 17: bytebase.v1.TaskRun.start_time:type_name -> google.protobuf.Timestamp
- 3, // 18: bytebase.v1.TaskRun.export_archive_status:type_name -> bytebase.v1.TaskRun.ExportArchiveStatus
- 37, // 19: bytebase.v1.TaskRun.prior_backup_detail:type_name -> bytebase.v1.TaskRun.PriorBackupDetail
- 38, // 20: bytebase.v1.TaskRun.scheduler_info:type_name -> bytebase.v1.TaskRun.SchedulerInfo
- 27, // 21: bytebase.v1.TaskRunLog.entries:type_name -> bytebase.v1.TaskRunLogEntry
- 4, // 22: bytebase.v1.TaskRunLogEntry.type:type_name -> bytebase.v1.TaskRunLogEntry.Type
- 54, // 23: bytebase.v1.TaskRunLogEntry.log_time:type_name -> google.protobuf.Timestamp
- 43, // 24: bytebase.v1.TaskRunLogEntry.schema_dump:type_name -> bytebase.v1.TaskRunLogEntry.SchemaDump
- 44, // 25: bytebase.v1.TaskRunLogEntry.command_execute:type_name -> bytebase.v1.TaskRunLogEntry.CommandExecute
- 45, // 26: bytebase.v1.TaskRunLogEntry.database_sync:type_name -> bytebase.v1.TaskRunLogEntry.DatabaseSync
- 46, // 27: bytebase.v1.TaskRunLogEntry.task_run_status_update:type_name -> bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate
- 47, // 28: bytebase.v1.TaskRunLogEntry.transaction_control:type_name -> bytebase.v1.TaskRunLogEntry.TransactionControl
- 48, // 29: bytebase.v1.TaskRunLogEntry.prior_backup:type_name -> bytebase.v1.TaskRunLogEntry.PriorBackup
- 49, // 30: bytebase.v1.TaskRunLogEntry.retry_info:type_name -> bytebase.v1.TaskRunLogEntry.RetryInfo
- 51, // 31: bytebase.v1.TaskRunSession.postgres:type_name -> bytebase.v1.TaskRunSession.Postgres
- 55, // 32: bytebase.v1.Task.DatabaseDataExport.format:type_name -> bytebase.v1.ExportFormat
- 39, // 33: bytebase.v1.TaskRun.PriorBackupDetail.items:type_name -> bytebase.v1.TaskRun.PriorBackupDetail.Item
- 54, // 34: bytebase.v1.TaskRun.SchedulerInfo.report_time:type_name -> google.protobuf.Timestamp
- 41, // 35: bytebase.v1.TaskRun.SchedulerInfo.waiting_cause:type_name -> bytebase.v1.TaskRun.SchedulerInfo.WaitingCause
- 40, // 36: bytebase.v1.TaskRun.PriorBackupDetail.Item.source_table:type_name -> bytebase.v1.TaskRun.PriorBackupDetail.Item.Table
- 40, // 37: bytebase.v1.TaskRun.PriorBackupDetail.Item.target_table:type_name -> bytebase.v1.TaskRun.PriorBackupDetail.Item.Table
- 56, // 38: bytebase.v1.TaskRun.PriorBackupDetail.Item.start_position:type_name -> bytebase.v1.Position
- 56, // 39: bytebase.v1.TaskRun.PriorBackupDetail.Item.end_position:type_name -> bytebase.v1.Position
- 42, // 40: bytebase.v1.TaskRun.SchedulerInfo.WaitingCause.task:type_name -> bytebase.v1.TaskRun.SchedulerInfo.WaitingCause.Task
- 54, // 41: bytebase.v1.TaskRunLogEntry.SchemaDump.start_time:type_name -> google.protobuf.Timestamp
- 54, // 42: bytebase.v1.TaskRunLogEntry.SchemaDump.end_time:type_name -> google.protobuf.Timestamp
- 54, // 43: bytebase.v1.TaskRunLogEntry.CommandExecute.log_time:type_name -> google.protobuf.Timestamp
- 50, // 44: bytebase.v1.TaskRunLogEntry.CommandExecute.response:type_name -> bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse
- 54, // 45: bytebase.v1.TaskRunLogEntry.DatabaseSync.start_time:type_name -> google.protobuf.Timestamp
- 54, // 46: bytebase.v1.TaskRunLogEntry.DatabaseSync.end_time:type_name -> google.protobuf.Timestamp
- 5, // 47: bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate.status:type_name -> bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate.Status
- 6, // 48: bytebase.v1.TaskRunLogEntry.TransactionControl.type:type_name -> bytebase.v1.TaskRunLogEntry.TransactionControl.Type
- 54, // 49: bytebase.v1.TaskRunLogEntry.PriorBackup.start_time:type_name -> google.protobuf.Timestamp
- 54, // 50: bytebase.v1.TaskRunLogEntry.PriorBackup.end_time:type_name -> google.protobuf.Timestamp
- 37, // 51: bytebase.v1.TaskRunLogEntry.PriorBackup.prior_backup_detail:type_name -> bytebase.v1.TaskRun.PriorBackupDetail
- 54, // 52: bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse.log_time:type_name -> google.protobuf.Timestamp
- 52, // 53: bytebase.v1.TaskRunSession.Postgres.session:type_name -> bytebase.v1.TaskRunSession.Postgres.Session
- 52, // 54: bytebase.v1.TaskRunSession.Postgres.blocking_sessions:type_name -> bytebase.v1.TaskRunSession.Postgres.Session
- 52, // 55: bytebase.v1.TaskRunSession.Postgres.blocked_sessions:type_name -> bytebase.v1.TaskRunSession.Postgres.Session
- 54, // 56: bytebase.v1.TaskRunSession.Postgres.Session.backend_start:type_name -> google.protobuf.Timestamp
- 54, // 57: bytebase.v1.TaskRunSession.Postgres.Session.xact_start:type_name -> google.protobuf.Timestamp
- 54, // 58: bytebase.v1.TaskRunSession.Postgres.Session.query_start:type_name -> google.protobuf.Timestamp
- 13, // 59: bytebase.v1.RolloutService.GetRollout:input_type -> bytebase.v1.GetRolloutRequest
- 14, // 60: bytebase.v1.RolloutService.ListRollouts:input_type -> bytebase.v1.ListRolloutsRequest
- 16, // 61: bytebase.v1.RolloutService.CreateRollout:input_type -> bytebase.v1.CreateRolloutRequest
- 17, // 62: bytebase.v1.RolloutService.PreviewRollout:input_type -> bytebase.v1.PreviewRolloutRequest
- 18, // 63: bytebase.v1.RolloutService.ListTaskRuns:input_type -> bytebase.v1.ListTaskRunsRequest
- 20, // 64: bytebase.v1.RolloutService.GetTaskRun:input_type -> bytebase.v1.GetTaskRunRequest
- 21, // 65: bytebase.v1.RolloutService.GetTaskRunLog:input_type -> bytebase.v1.GetTaskRunLogRequest
- 28, // 66: bytebase.v1.RolloutService.GetTaskRunSession:input_type -> bytebase.v1.GetTaskRunSessionRequest
- 7, // 67: bytebase.v1.RolloutService.BatchRunTasks:input_type -> bytebase.v1.BatchRunTasksRequest
- 9, // 68: bytebase.v1.RolloutService.BatchSkipTasks:input_type -> bytebase.v1.BatchSkipTasksRequest
- 11, // 69: bytebase.v1.RolloutService.BatchCancelTaskRuns:input_type -> bytebase.v1.BatchCancelTaskRunsRequest
- 30, // 70: bytebase.v1.RolloutService.PreviewTaskRunRollback:input_type -> bytebase.v1.PreviewTaskRunRollbackRequest
- 22, // 71: bytebase.v1.RolloutService.GetRollout:output_type -> bytebase.v1.Rollout
- 15, // 72: bytebase.v1.RolloutService.ListRollouts:output_type -> bytebase.v1.ListRolloutsResponse
- 22, // 73: bytebase.v1.RolloutService.CreateRollout:output_type -> bytebase.v1.Rollout
- 22, // 74: bytebase.v1.RolloutService.PreviewRollout:output_type -> bytebase.v1.Rollout
- 19, // 75: bytebase.v1.RolloutService.ListTaskRuns:output_type -> bytebase.v1.ListTaskRunsResponse
- 25, // 76: bytebase.v1.RolloutService.GetTaskRun:output_type -> bytebase.v1.TaskRun
- 26, // 77: bytebase.v1.RolloutService.GetTaskRunLog:output_type -> bytebase.v1.TaskRunLog
- 29, // 78: bytebase.v1.RolloutService.GetTaskRunSession:output_type -> bytebase.v1.TaskRunSession
- 8, // 79: bytebase.v1.RolloutService.BatchRunTasks:output_type -> bytebase.v1.BatchRunTasksResponse
- 10, // 80: bytebase.v1.RolloutService.BatchSkipTasks:output_type -> bytebase.v1.BatchSkipTasksResponse
- 12, // 81: bytebase.v1.RolloutService.BatchCancelTaskRuns:output_type -> bytebase.v1.BatchCancelTaskRunsResponse
- 31, // 82: bytebase.v1.RolloutService.PreviewTaskRunRollback:output_type -> bytebase.v1.PreviewTaskRunRollbackResponse
- 71, // [71:83] is the sub-list for method output_type
- 59, // [59:71] is the sub-list for method input_type
- 59, // [59:59] is the sub-list for extension type_name
- 59, // [59:59] is the sub-list for extension extendee
- 0, // [0:59] is the sub-list for field type_name
+ 53, // 0: bytebase.v1.BatchRunTasksRequest.run_time:type_name -> google.protobuf.Timestamp
+ 22, // 1: bytebase.v1.ListRolloutsResponse.rollouts:type_name -> bytebase.v1.Rollout
+ 22, // 2: bytebase.v1.CreateRolloutRequest.rollout:type_name -> bytebase.v1.Rollout
+ 54, // 3: bytebase.v1.PreviewRolloutRequest.plan:type_name -> bytebase.v1.Plan
+ 25, // 4: bytebase.v1.ListTaskRunsResponse.task_runs:type_name -> bytebase.v1.TaskRun
+ 23, // 5: bytebase.v1.Rollout.stages:type_name -> bytebase.v1.Stage
+ 53, // 6: bytebase.v1.Rollout.create_time:type_name -> google.protobuf.Timestamp
+ 24, // 7: bytebase.v1.Stage.tasks:type_name -> bytebase.v1.Task
+ 0, // 8: bytebase.v1.Task.status:type_name -> bytebase.v1.Task.Status
+ 1, // 9: bytebase.v1.Task.type:type_name -> bytebase.v1.Task.Type
+ 32, // 10: bytebase.v1.Task.database_create:type_name -> bytebase.v1.Task.DatabaseCreate
+ 33, // 11: bytebase.v1.Task.database_schema_baseline:type_name -> bytebase.v1.Task.DatabaseSchemaBaseline
+ 34, // 12: bytebase.v1.Task.database_schema_update:type_name -> bytebase.v1.Task.DatabaseSchemaUpdate
+ 35, // 13: bytebase.v1.Task.database_data_update:type_name -> bytebase.v1.Task.DatabaseDataUpdate
+ 36, // 14: bytebase.v1.Task.database_data_export:type_name -> bytebase.v1.Task.DatabaseDataExport
+ 53, // 15: bytebase.v1.TaskRun.create_time:type_name -> google.protobuf.Timestamp
+ 53, // 16: bytebase.v1.TaskRun.update_time:type_name -> google.protobuf.Timestamp
+ 2, // 17: bytebase.v1.TaskRun.status:type_name -> bytebase.v1.TaskRun.Status
+ 53, // 18: bytebase.v1.TaskRun.start_time:type_name -> google.protobuf.Timestamp
+ 3, // 19: bytebase.v1.TaskRun.export_archive_status:type_name -> bytebase.v1.TaskRun.ExportArchiveStatus
+ 37, // 20: bytebase.v1.TaskRun.prior_backup_detail:type_name -> bytebase.v1.TaskRun.PriorBackupDetail
+ 38, // 21: bytebase.v1.TaskRun.scheduler_info:type_name -> bytebase.v1.TaskRun.SchedulerInfo
+ 53, // 22: bytebase.v1.TaskRun.run_time:type_name -> google.protobuf.Timestamp
+ 27, // 23: bytebase.v1.TaskRunLog.entries:type_name -> bytebase.v1.TaskRunLogEntry
+ 4, // 24: bytebase.v1.TaskRunLogEntry.type:type_name -> bytebase.v1.TaskRunLogEntry.Type
+ 53, // 25: bytebase.v1.TaskRunLogEntry.log_time:type_name -> google.protobuf.Timestamp
+ 43, // 26: bytebase.v1.TaskRunLogEntry.schema_dump:type_name -> bytebase.v1.TaskRunLogEntry.SchemaDump
+ 44, // 27: bytebase.v1.TaskRunLogEntry.command_execute:type_name -> bytebase.v1.TaskRunLogEntry.CommandExecute
+ 45, // 28: bytebase.v1.TaskRunLogEntry.database_sync:type_name -> bytebase.v1.TaskRunLogEntry.DatabaseSync
+ 46, // 29: bytebase.v1.TaskRunLogEntry.task_run_status_update:type_name -> bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate
+ 47, // 30: bytebase.v1.TaskRunLogEntry.transaction_control:type_name -> bytebase.v1.TaskRunLogEntry.TransactionControl
+ 48, // 31: bytebase.v1.TaskRunLogEntry.prior_backup:type_name -> bytebase.v1.TaskRunLogEntry.PriorBackup
+ 49, // 32: bytebase.v1.TaskRunLogEntry.retry_info:type_name -> bytebase.v1.TaskRunLogEntry.RetryInfo
+ 51, // 33: bytebase.v1.TaskRunSession.postgres:type_name -> bytebase.v1.TaskRunSession.Postgres
+ 55, // 34: bytebase.v1.Task.DatabaseDataExport.format:type_name -> bytebase.v1.ExportFormat
+ 39, // 35: bytebase.v1.TaskRun.PriorBackupDetail.items:type_name -> bytebase.v1.TaskRun.PriorBackupDetail.Item
+ 53, // 36: bytebase.v1.TaskRun.SchedulerInfo.report_time:type_name -> google.protobuf.Timestamp
+ 41, // 37: bytebase.v1.TaskRun.SchedulerInfo.waiting_cause:type_name -> bytebase.v1.TaskRun.SchedulerInfo.WaitingCause
+ 40, // 38: bytebase.v1.TaskRun.PriorBackupDetail.Item.source_table:type_name -> bytebase.v1.TaskRun.PriorBackupDetail.Item.Table
+ 40, // 39: bytebase.v1.TaskRun.PriorBackupDetail.Item.target_table:type_name -> bytebase.v1.TaskRun.PriorBackupDetail.Item.Table
+ 56, // 40: bytebase.v1.TaskRun.PriorBackupDetail.Item.start_position:type_name -> bytebase.v1.Position
+ 56, // 41: bytebase.v1.TaskRun.PriorBackupDetail.Item.end_position:type_name -> bytebase.v1.Position
+ 42, // 42: bytebase.v1.TaskRun.SchedulerInfo.WaitingCause.task:type_name -> bytebase.v1.TaskRun.SchedulerInfo.WaitingCause.Task
+ 53, // 43: bytebase.v1.TaskRunLogEntry.SchemaDump.start_time:type_name -> google.protobuf.Timestamp
+ 53, // 44: bytebase.v1.TaskRunLogEntry.SchemaDump.end_time:type_name -> google.protobuf.Timestamp
+ 53, // 45: bytebase.v1.TaskRunLogEntry.CommandExecute.log_time:type_name -> google.protobuf.Timestamp
+ 50, // 46: bytebase.v1.TaskRunLogEntry.CommandExecute.response:type_name -> bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse
+ 53, // 47: bytebase.v1.TaskRunLogEntry.DatabaseSync.start_time:type_name -> google.protobuf.Timestamp
+ 53, // 48: bytebase.v1.TaskRunLogEntry.DatabaseSync.end_time:type_name -> google.protobuf.Timestamp
+ 5, // 49: bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate.status:type_name -> bytebase.v1.TaskRunLogEntry.TaskRunStatusUpdate.Status
+ 6, // 50: bytebase.v1.TaskRunLogEntry.TransactionControl.type:type_name -> bytebase.v1.TaskRunLogEntry.TransactionControl.Type
+ 53, // 51: bytebase.v1.TaskRunLogEntry.PriorBackup.start_time:type_name -> google.protobuf.Timestamp
+ 53, // 52: bytebase.v1.TaskRunLogEntry.PriorBackup.end_time:type_name -> google.protobuf.Timestamp
+ 37, // 53: bytebase.v1.TaskRunLogEntry.PriorBackup.prior_backup_detail:type_name -> bytebase.v1.TaskRun.PriorBackupDetail
+ 53, // 54: bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse.log_time:type_name -> google.protobuf.Timestamp
+ 52, // 55: bytebase.v1.TaskRunSession.Postgres.session:type_name -> bytebase.v1.TaskRunSession.Postgres.Session
+ 52, // 56: bytebase.v1.TaskRunSession.Postgres.blocking_sessions:type_name -> bytebase.v1.TaskRunSession.Postgres.Session
+ 52, // 57: bytebase.v1.TaskRunSession.Postgres.blocked_sessions:type_name -> bytebase.v1.TaskRunSession.Postgres.Session
+ 53, // 58: bytebase.v1.TaskRunSession.Postgres.Session.backend_start:type_name -> google.protobuf.Timestamp
+ 53, // 59: bytebase.v1.TaskRunSession.Postgres.Session.xact_start:type_name -> google.protobuf.Timestamp
+ 53, // 60: bytebase.v1.TaskRunSession.Postgres.Session.query_start:type_name -> google.protobuf.Timestamp
+ 13, // 61: bytebase.v1.RolloutService.GetRollout:input_type -> bytebase.v1.GetRolloutRequest
+ 14, // 62: bytebase.v1.RolloutService.ListRollouts:input_type -> bytebase.v1.ListRolloutsRequest
+ 16, // 63: bytebase.v1.RolloutService.CreateRollout:input_type -> bytebase.v1.CreateRolloutRequest
+ 17, // 64: bytebase.v1.RolloutService.PreviewRollout:input_type -> bytebase.v1.PreviewRolloutRequest
+ 18, // 65: bytebase.v1.RolloutService.ListTaskRuns:input_type -> bytebase.v1.ListTaskRunsRequest
+ 20, // 66: bytebase.v1.RolloutService.GetTaskRun:input_type -> bytebase.v1.GetTaskRunRequest
+ 21, // 67: bytebase.v1.RolloutService.GetTaskRunLog:input_type -> bytebase.v1.GetTaskRunLogRequest
+ 28, // 68: bytebase.v1.RolloutService.GetTaskRunSession:input_type -> bytebase.v1.GetTaskRunSessionRequest
+ 7, // 69: bytebase.v1.RolloutService.BatchRunTasks:input_type -> bytebase.v1.BatchRunTasksRequest
+ 9, // 70: bytebase.v1.RolloutService.BatchSkipTasks:input_type -> bytebase.v1.BatchSkipTasksRequest
+ 11, // 71: bytebase.v1.RolloutService.BatchCancelTaskRuns:input_type -> bytebase.v1.BatchCancelTaskRunsRequest
+ 30, // 72: bytebase.v1.RolloutService.PreviewTaskRunRollback:input_type -> bytebase.v1.PreviewTaskRunRollbackRequest
+ 22, // 73: bytebase.v1.RolloutService.GetRollout:output_type -> bytebase.v1.Rollout
+ 15, // 74: bytebase.v1.RolloutService.ListRollouts:output_type -> bytebase.v1.ListRolloutsResponse
+ 22, // 75: bytebase.v1.RolloutService.CreateRollout:output_type -> bytebase.v1.Rollout
+ 22, // 76: bytebase.v1.RolloutService.PreviewRollout:output_type -> bytebase.v1.Rollout
+ 19, // 77: bytebase.v1.RolloutService.ListTaskRuns:output_type -> bytebase.v1.ListTaskRunsResponse
+ 25, // 78: bytebase.v1.RolloutService.GetTaskRun:output_type -> bytebase.v1.TaskRun
+ 26, // 79: bytebase.v1.RolloutService.GetTaskRunLog:output_type -> bytebase.v1.TaskRunLog
+ 29, // 80: bytebase.v1.RolloutService.GetTaskRunSession:output_type -> bytebase.v1.TaskRunSession
+ 8, // 81: bytebase.v1.RolloutService.BatchRunTasks:output_type -> bytebase.v1.BatchRunTasksResponse
+ 10, // 82: bytebase.v1.RolloutService.BatchSkipTasks:output_type -> bytebase.v1.BatchSkipTasksResponse
+ 12, // 83: bytebase.v1.RolloutService.BatchCancelTaskRuns:output_type -> bytebase.v1.BatchCancelTaskRunsResponse
+ 31, // 84: bytebase.v1.RolloutService.PreviewTaskRunRollback:output_type -> bytebase.v1.PreviewTaskRunRollbackResponse
+ 73, // [73:85] is the sub-list for method output_type
+ 61, // [61:73] is the sub-list for method input_type
+ 61, // [61:61] is the sub-list for extension type_name
+ 61, // [61:61] is the sub-list for extension extendee
+ 0, // [0:61] is the sub-list for field type_name
}
func init() { file_v1_rollout_service_proto_init() }
@@ -4028,6 +4053,7 @@ func file_v1_rollout_service_proto_init() {
file_v1_annotation_proto_init()
file_v1_common_proto_init()
file_v1_plan_service_proto_init()
+ file_v1_rollout_service_proto_msgTypes[0].OneofWrappers = []any{}
file_v1_rollout_service_proto_msgTypes[9].OneofWrappers = []any{}
file_v1_rollout_service_proto_msgTypes[17].OneofWrappers = []any{
(*Task_DatabaseCreate_)(nil),
@@ -4036,6 +4062,7 @@ func file_v1_rollout_service_proto_init() {
(*Task_DatabaseDataUpdate_)(nil),
(*Task_DatabaseDataExport_)(nil),
}
+ file_v1_rollout_service_proto_msgTypes[18].OneofWrappers = []any{}
file_v1_rollout_service_proto_msgTypes[22].OneofWrappers = []any{
(*TaskRunSession_Postgres_)(nil),
}
diff --git a/proto/v1/v1/rollout_service.proto b/proto/v1/v1/rollout_service.proto
index 30f61c0701..299aa6a672 100644
--- a/proto/v1/v1/rollout_service.proto
+++ b/proto/v1/v1/rollout_service.proto
@@ -133,6 +133,9 @@ message BatchRunTasksRequest {
repeated string tasks = 2;
string reason = 3;
+
+ // The task run should run after run_time.
+ optional google.protobuf.Timestamp run_time = 4;
}
message BatchRunTasksResponse {}
@@ -536,6 +539,10 @@ message TaskRun {
// Format: projects/{project}/sheets/{sheet}
string sheet = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The task run should run after run_time.
+ // This can only be set when creating the task run calling BatchRunTasks.
+ optional google.protobuf.Timestamp run_time = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
}
message TaskRunLog {