Skip to content

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

feat(proto): task run result (#7106)

p0ny6e3fe35a4de1
diff --git a/frontend/src/types/proto/store/task_run.ts b/frontend/src/types/proto/store/task_run.ts
new file mode 100644
index 0000000000..a84f8206f9
--- /dev/null
+++ b/frontend/src/types/proto/store/task_run.ts
@@ -0,0 +1,106 @@
+/* eslint-disable */
+import * as _m0 from "protobufjs/minimal";
+
+export const protobufPackage = "bytebase.store";
+
+export interface TaskRunResult {
+ detail: string;
+ /** Format: instances/{instance}/databases/{database}/changeHistories/{changeHistory} */
+ changeHistory: string;
+ version: string;
+}
+
+function createBaseTaskRunResult(): TaskRunResult {
+ return { detail: "", changeHistory: "", version: "" };
+}
+
+export const TaskRunResult = {
+ encode(message: TaskRunResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.detail !== "") {
+ writer.uint32(10).string(message.detail);
+ }
+ if (message.changeHistory !== "") {
+ writer.uint32(18).string(message.changeHistory);
+ }
+ if (message.version !== "") {
+ writer.uint32(26).string(message.version);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): TaskRunResult {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseTaskRunResult();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.detail = reader.string();
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.changeHistory = reader.string();
+ continue;
+ case 3:
+ if (tag !== 26) {
+ break;
+ }
+
+ message.version = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): TaskRunResult {
+ return {
+ detail: isSet(object.detail) ? String(object.detail) : "",
+ changeHistory: isSet(object.changeHistory) ? String(object.changeHistory) : "",
+ version: isSet(object.version) ? String(object.version) : "",
+ };
+ },
+
+ toJSON(message: TaskRunResult): unknown {
+ const obj: any = {};
+ message.detail !== undefined && (obj.detail = message.detail);
+ message.changeHistory !== undefined && (obj.changeHistory = message.changeHistory);
+ message.version !== undefined && (obj.version = message.version);
+ return obj;
+ },
+
+ create(base?: DeepPartial<TaskRunResult>): TaskRunResult {
+ return TaskRunResult.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<TaskRunResult>): TaskRunResult {
+ const message = createBaseTaskRunResult();
+ message.detail = object.detail ?? "";
+ message.changeHistory = object.changeHistory ?? "";
+ message.version = object.version ?? "";
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial<T> = T extends Builtin ? T
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
+ : Partial<T>;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 1810a6402c..25b80c54db 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -127,6 +127,9 @@
- [SlowQueryStatistics](#bytebase-store-SlowQueryStatistics)
- [SlowQueryStatisticsItem](#bytebase-store-SlowQueryStatisticsItem)
+- [store/task_run.proto](#store_task_run-proto)
+ - [TaskRunResult](#bytebase-store-TaskRunResult)
+
- [store/user.proto](#store_user-proto)
- [MFAConfig](#bytebase-store-MFAConfig)
@@ -1877,6 +1880,39 @@ SlowQueryStatisticsItem is the item of slow query statistics.
+<a name="store_task_run-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## store/task_run.proto
+
+
+
+<a name="bytebase-store-TaskRunResult"></a>
+
+### TaskRunResult
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| detail | [string](#string) | | |
+| change_history | [string](#string) | | Format: instances/{instance}/databases/{database}/changeHistories/{changeHistory} |
+| version | [string](#string) | | |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<a name="store_user-proto"></a>
<p align="right"><a href="#top">Top</a></p>
diff --git a/proto/generated-go/store/task_run.pb.go b/proto/generated-go/store/task_run.pb.go
new file mode 100644
index 0000000000..ee3d1da6a8
--- /dev/null
+++ b/proto/generated-go/store/task_run.pb.go
@@ -0,0 +1,164 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.31.0
+// protoc (unknown)
+// source: store/task_run.proto
+
+package store
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type TaskRunResult struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Detail string `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail,omitempty"`
+ // Format: instances/{instance}/databases/{database}/changeHistories/{changeHistory}
+ ChangeHistory string `protobuf:"bytes,2,opt,name=change_history,json=changeHistory,proto3" json:"change_history,omitempty"`
+ Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+}
+
+func (x *TaskRunResult) Reset() {
+ *x = TaskRunResult{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_store_task_run_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TaskRunResult) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TaskRunResult) ProtoMessage() {}
+
+func (x *TaskRunResult) ProtoReflect() protoreflect.Message {
+ mi := &file_store_task_run_proto_msgTypes[0]
+ 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 TaskRunResult.ProtoReflect.Descriptor instead.
+func (*TaskRunResult) Descriptor() ([]byte, []int) {
+ return file_store_task_run_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *TaskRunResult) GetDetail() string {
+ if x != nil {
+ return x.Detail
+ }
+ return ""
+}
+
+func (x *TaskRunResult) GetChangeHistory() string {
+ if x != nil {
+ return x.ChangeHistory
+ }
+ return ""
+}
+
+func (x *TaskRunResult) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+var File_store_task_run_proto protoreflect.FileDescriptor
+
+var file_store_task_run_proto_rawDesc = []byte{
+ 0x0a, 0x14, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x75, 0x6e,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x68, 0x0a, 0x0d, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75,
+ 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69,
+ 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12,
+ 0x25, 0x0a, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72,
+ 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48,
+ 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 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 (
+ file_store_task_run_proto_rawDescOnce sync.Once
+ file_store_task_run_proto_rawDescData = file_store_task_run_proto_rawDesc
+)
+
+func file_store_task_run_proto_rawDescGZIP() []byte {
+ file_store_task_run_proto_rawDescOnce.Do(func() {
+ file_store_task_run_proto_rawDescData = protoimpl.X.CompressGZIP(file_store_task_run_proto_rawDescData)
+ })
+ return file_store_task_run_proto_rawDescData
+}
+
+var file_store_task_run_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_store_task_run_proto_goTypes = []interface{}{
+ (*TaskRunResult)(nil), // 0: bytebase.store.TaskRunResult
+}
+var file_store_task_run_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_store_task_run_proto_init() }
+func file_store_task_run_proto_init() {
+ if File_store_task_run_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_store_task_run_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TaskRunResult); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_store_task_run_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_store_task_run_proto_goTypes,
+ DependencyIndexes: file_store_task_run_proto_depIdxs,
+ MessageInfos: file_store_task_run_proto_msgTypes,
+ }.Build()
+ File_store_task_run_proto = out.File
+ file_store_task_run_proto_rawDesc = nil
+ file_store_task_run_proto_goTypes = nil
+ file_store_task_run_proto_depIdxs = nil
+}
diff --git a/proto/store/task_run.proto b/proto/store/task_run.proto
new file mode 100644
index 0000000000..5e11cac25d
--- /dev/null
+++ b/proto/store/task_run.proto
@@ -0,0 +1,12 @@
+syntax = "proto3";
+
+package bytebase.store;
+
+option go_package = "generated-go/store";
+
+message TaskRunResult {
+ string detail = 1;
+ // Format: instances/{instance}/databases/{database}/changeHistories/{changeHistory}
+ string change_history = 2;
+ string version = 3;
+}