Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: query data policy for project (#19242)
ecmadaodb28dd5a5a97
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 56ae05f937..4fe29e895e 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -13970,20 +13970,14 @@ components:bytebase.v1.QueryDataPolicy:type: objectproperties:- timeout:- title: timeout- description: |-- workspace-level policy- The query timeout duration in the SQL editor.- $ref: '#/components/schemas/google.protobuf.Duration'maximumResultRows:type: integertitle: maximum_result_rowsformat: int32description: |-- workspace-level policy+ Support both project-level and workspace-level.The maximum number of rows to return in the SQL editor.- The default value is -1, means no limit.+ The default value <= 0, means no limit.disableExport:type: booleantitle: disable_export@@ -18517,6 +18511,10 @@ components:description: |-The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0.+ queryTimeout:+ title: query_timeout+ description: The query timeout duration for query and export, works for the SQL Editor and Export Center.+ $ref: '#/components/schemas/google.protobuf.Duration'title: WorkspaceProfileSettingadditionalProperties: falsebytebase.v1.WorkspaceProfileSetting.PasswordRestriction:diff --git a/backend/api/v1/org_policy_service.go b/backend/api/v1/org_policy_service.goindex b89f8c6941..44d4ca19f5 100644--- a/backend/api/v1/org_policy_service.go+++ b/backend/api/v1/org_policy_service.go@@ -26,7 +26,7 @@ var (allowedResourceTypes = map[storepb.Policy_Type][]storepb.Policy_Resource{storepb.Policy_ROLLOUT: {storepb.Policy_ENVIRONMENT},storepb.Policy_TAG: {storepb.Policy_ENVIRONMENT, storepb.Policy_PROJECT},- storepb.Policy_QUERY_DATA: {storepb.Policy_WORKSPACE},+ storepb.Policy_QUERY_DATA: {storepb.Policy_WORKSPACE, storepb.Policy_PROJECT},storepb.Policy_MASKING_RULE: {storepb.Policy_WORKSPACE},storepb.Policy_MASKING_EXEMPTION: {storepb.Policy_PROJECT},}@@ -76,6 +76,10 @@ func (s *OrgPolicyService) GetPolicy(ctx context.Context, req *connect.Request[vreturn nil, connect.NewError(connect.CodeNotFound, errors.Errorf("cannot found the policy %v", req.Msg.Name))}+ if err := validatePolicyType(policy.Type, policy.ResourceType); err != nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, err)+ }+var perm permission.Permissionswitch policy.Type {case storepb.Policy_MASKING_EXEMPTION:@@ -125,6 +129,9 @@ func (s *OrgPolicyService) ListPolicies(ctx context.Context, req *connect.Requesresponse := &v1pb.ListPoliciesResponse{}for _, policy := range policies {+ if validatePolicyType(policy.Type, policy.ResourceType) != nil {+ continue+ }p, err := convertToPolicy(policy)if err != nil {return nil, connect.NewError(connect.CodeInternal, err)diff --git a/backend/api/v1/org_policy_service_converter.go b/backend/api/v1/org_policy_service_converter.goindex 267c62e4f0..f13ef49901 100644--- a/backend/api/v1/org_policy_service_converter.go+++ b/backend/api/v1/org_policy_service_converter.go@@ -168,7 +168,6 @@ func convertToV1PBQueryDataPolicy(payloadStr string) (*v1pb.Policy_QueryDataPoli}return &v1pb.Policy_QueryDataPolicy{QueryDataPolicy: &v1pb.QueryDataPolicy{- Timeout: payload.Timeout,DisableExport: payload.DisableExport,MaximumResultRows: payload.MaximumResultRows,DisableCopyData: payload.DisableCopyData,@@ -181,7 +180,6 @@ func convertToV1PBQueryDataPolicy(payloadStr string) (*v1pb.Policy_QueryDataPolifunc convertToQueryDataPolicyPayload(policy *v1pb.QueryDataPolicy) *storepb.QueryDataPolicy {return &storepb.QueryDataPolicy{- Timeout: policy.Timeout,DisableExport: policy.DisableExport,MaximumResultRows: policy.MaximumResultRows,DisableCopyData: policy.DisableCopyData,diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.goindex 6e4e459311..000059ff20 100644--- a/backend/api/v1/setting_service.go+++ b/backend/api/v1/setting_service.go@@ -343,6 +343,8 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *connect.ReqoldSetting.PasswordRestriction = payload.PasswordRestrictioncase "value.workspace_profile.sql_result_size":oldSetting.SqlResultSize = payload.SqlResultSize+ case "value.workspace_profile.query_timeout":+ oldSetting.QueryTimeout = payload.QueryTimeoutdefault:return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("invalid update mask path %v", path))}diff --git a/backend/api/v1/setting_service_converter.go b/backend/api/v1/setting_service_converter.goindex a42b49c075..60dc1801df 100644--- a/backend/api/v1/setting_service_converter.go+++ b/backend/api/v1/setting_service_converter.go@@ -255,6 +255,7 @@ func convertWorkspaceProfileSetting(v1Setting *v1pb.WorkspaceProfileSetting) *stPasswordRestriction: convertPasswordRestrictionSetting(v1Setting.PasswordRestriction),EnableDebug: v1Setting.EnableDebug,SqlResultSize: v1Setting.SqlResultSize,+ QueryTimeout: v1Setting.QueryTimeout,}// Convert announcement if present@@ -328,6 +329,7 @@ func convertToWorkspaceProfileSetting(storeSetting *storepb.WorkspaceProfileSettAnnouncement: convertToV1Announcement(storeSetting.Announcement),EnableDebug: storeSetting.EnableDebug,SqlResultSize: storeSetting.SqlResultSize,+ QueryTimeout: storeSetting.QueryTimeout,}}diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.goindex cd9936a2e3..e1fbc0f59e 100644--- a/backend/api/v1/sql_service.go+++ b/backend/api/v1/sql_service.go@@ -122,6 +122,7 @@ func (s *SQLService) AdminExecute(ctx context.Context, stream *connect.BidiStreas.store,s.licenseService,request.Limit,+ database.ProjectID,)queryContext := db.QueryContext{OperatorEmail: user.Email,@@ -214,6 +215,7 @@ func (s *SQLService) Query(ctx context.Context, req *connect.Request[v1pb.QueryRs.store,s.licenseService,request.Limit,+ database.ProjectID,)queryContext := db.QueryContext{Explain: request.Explain,@@ -305,13 +307,14 @@ func getEffectiveQueryDataPolicy(stores *store.Store,licenseService *enterprise.LicenseService,limit int32,+ projectID string,) *store.EffectiveQueryDataPolicy {value := &store.EffectiveQueryDataPolicy{MaximumResultSize: common.DefaultMaximumSQLResultSize,MaximumResultRows: math.MaxInt32,}if err := licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_QUERY_POLICY); err == nil {- policy, err := stores.GetEffectiveQueryDataPolicy(ctx)+ policy, err := stores.GetEffectiveQueryDataPolicy(ctx, common.FormatProject(projectID))if err != nil {slog.Error("failed to get the query data policy", log.BBError(err))return value@@ -1025,6 +1028,7 @@ func doExport(stores,licenseService,request.Limit,+ database.ProjectID,)queryContext := db.QueryContext{Limit: int(queryRestriction.MaximumResultRows),@@ -1768,7 +1772,7 @@ func checkAndGetDataSourceQueriable(return dataSource, nil}- queryDataPolicy, err := storeInstance.GetEffectiveQueryDataPolicy(ctx)+ queryDataPolicy, err := storeInstance.GetEffectiveQueryDataPolicy(ctx, common.FormatProject(database.ProjectID))if err != nil {return nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to get query data policy with error: %v", err.Error()))}diff --git a/backend/generated-go/store/policy.pb.go b/backend/generated-go/store/policy.pb.goindex 4b2afd3741..bad98cd42f 100644--- a/backend/generated-go/store/policy.pb.go+++ b/backend/generated-go/store/policy.pb.go@@ -10,7 +10,6 @@ import (expr "google.golang.org/genproto/googleapis/type/expr"protoreflect "google.golang.org/protobuf/reflect/protoreflect"protoimpl "google.golang.org/protobuf/runtime/protoimpl"- durationpb "google.golang.org/protobuf/types/known/durationpb"reflect "reflect"sync "sync"unsafe "unsafe"@@ -477,14 +476,11 @@ func (x *IamPolicy) GetBindings() []*Binding {type QueryDataPolicy struct {state protoimpl.MessageState `protogen:"open.v1"`// workspace-level policy- // The query timeout duration.- Timeout *durationpb.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"`- // workspace-level policy// Disable exporting data in the SQL editor.DisableExport bool `protobuf:"varint,2,opt,name=disable_export,json=disableExport,proto3" json:"disable_export,omitempty"`- // workspace-level policy- // The return rows limit.- // The default value is -1, means no limit.+ // Support both project-level and workspace-level.+ // The maximum number of rows to return in the SQL editor.+ // The default value <= 0, means no limit.MaximumResultRows int32 `protobuf:"varint,4,opt,name=maximum_result_rows,json=maximumResultRows,proto3" json:"maximum_result_rows,omitempty"`// workspace-level policy// Disable copying data.@@ -532,13 +528,6 @@ func (*QueryDataPolicy) Descriptor() ([]byte, []int) {return file_store_policy_proto_rawDescGZIP(), []int{7}}-func (x *QueryDataPolicy) GetTimeout() *durationpb.Duration {- if x != nil {- return x.Timeout- }- return nil-}-func (x *QueryDataPolicy) GetDisableExport() bool {if x != nil {return x.DisableExport@@ -717,7 +706,7 @@ var File_store_policy_proto protoreflect.FileDescriptorconst file_store_policy_proto_rawDesc = "" +"\n" +- "\x12store/policy.proto\x12\x0ebytebase.store\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\"\xd1\x01\n" ++ "\x12store/policy.proto\x12\x0ebytebase.store\x1a\x16google/type/expr.proto\"\xd1\x01\n" +"\x06Policy\"t\n" +"\x04Type\x12\x14\n" +"\x10TYPE_UNSPECIFIED\x10\x00\x12\v\n" +@@ -759,15 +748,14 @@ const file_store_policy_proto_rawDesc = "" +"\amembers\x18\x02 \x03(\tR\amembers\x12/\n" +"\tcondition\x18\x03 \x01(\v2\x11.google.type.ExprR\tcondition\"@\n" +"\tIamPolicy\x123\n" +- "\bbindings\x18\x01 \x03(\v2\x17.bytebase.store.BindingR\bbindings\"\xcc\x02\n" +- "\x0fQueryDataPolicy\x123\n" +- "\atimeout\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\atimeout\x12%\n" ++ "\bbindings\x18\x01 \x03(\v2\x17.bytebase.store.BindingR\bbindings\"\x9d\x02\n" ++ "\x0fQueryDataPolicy\x12%\n" +"\x0edisable_export\x18\x02 \x01(\bR\rdisableExport\x12.\n" +"\x13maximum_result_rows\x18\x04 \x01(\x05R\x11maximumResultRows\x12*\n" +"\x11disable_copy_data\x18\x05 \x01(\bR\x0fdisableCopyData\x125\n" +"\x17allow_admin_data_source\x18\t \x01(\bR\x14allowAdminDataSource\x12!\n" +"\fdisallow_ddl\x18\a \x01(\bR\vdisallowDdl\x12!\n" +- "\fdisallow_dml\x18\b \x01(\bR\vdisallowDmlJ\x04\b\x03\x10\x04B\x8e\x01\n" ++ "\fdisallow_dml\x18\b \x01(\bR\vdisallowDmlJ\x04\b\x01\x10\x02J\x04\b\x03\x10\x04B\x8e\x01\n" +"\x12com.bytebase.storeB\vPolicyProtoP\x01Z\x12generated-go/store\xa2\x02\x03BSX\xaa\x02\x0eBytebase.Store\xca\x02\x0eBytebase\\Store\xe2\x02\x1aBytebase\\Store\\GPBMetadata\xea\x02\x0fBytebase::Storeb\x06proto3"var (@@ -799,7 +787,6 @@ var file_store_policy_proto_goTypes = []any{(*MaskingRulePolicy_MaskingRule)(nil), // 11: bytebase.store.MaskingRulePolicy.MaskingRulenil, // 12: bytebase.store.TagPolicy.TagsEntry(*expr.Expr)(nil), // 13: google.type.Expr- (*durationpb.Duration)(nil), // 14: google.protobuf.Duration}var file_store_policy_proto_depIdxs = []int32{10, // 0: bytebase.store.MaskingExemptionPolicy.exemptions:type_name -> bytebase.store.MaskingExemptionPolicy.Exemption@@ -807,14 +794,13 @@ var file_store_policy_proto_depIdxs = []int32{12, // 2: bytebase.store.TagPolicy.tags:type_name -> bytebase.store.TagPolicy.TagsEntry13, // 3: bytebase.store.Binding.condition:type_name -> google.type.Expr7, // 4: bytebase.store.IamPolicy.bindings:type_name -> bytebase.store.Binding- 14, // 5: bytebase.store.QueryDataPolicy.timeout:type_name -> google.protobuf.Duration- 13, // 6: bytebase.store.MaskingExemptionPolicy.Exemption.condition:type_name -> google.type.Expr- 13, // 7: bytebase.store.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr- 8, // [8:8] is the sub-list for method output_type- 8, // [8:8] is the sub-list for method input_type- 8, // [8:8] is the sub-list for extension type_name- 8, // [8:8] is the sub-list for extension extendee- 0, // [0:8] is the sub-list for field type_name+ 13, // 5: bytebase.store.MaskingExemptionPolicy.Exemption.condition:type_name -> google.type.Expr+ 13, // 6: bytebase.store.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr+ 7, // [7:7] is the sub-list for method output_type+ 7, // [7:7] is the sub-list for method input_type+ 7, // [7:7] is the sub-list for extension type_name+ 7, // [7:7] is the sub-list for extension extendee+ 0, // [0:7] is the sub-list for field type_name}func init() { file_store_policy_proto_init() }diff --git a/backend/generated-go/store/policy_equal.pb.go b/backend/generated-go/store/policy_equal.pb.goindex 3ab2680341..0fa5d6bea8 100644--- a/backend/generated-go/store/policy_equal.pb.go+++ b/backend/generated-go/store/policy_equal.pb.go@@ -192,9 +192,6 @@ func (x *QueryDataPolicy) Equal(y *QueryDataPolicy) bool {if x == nil || y == nil {return x == nil && y == nil}- if p, q := x.Timeout, y.Timeout; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {- return false- }if x.DisableExport != y.DisableExport {return false}diff --git a/backend/generated-go/store/setting.pb.go b/backend/generated-go/store/setting.pb.goindex bbab75b4fa..105ad853c3 100644--- a/backend/generated-go/store/setting.pb.go+++ b/backend/generated-go/store/setting.pb.go@@ -463,6 +463,8 @@ type WorkspaceProfileSetting struct {// The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.// The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0.SqlResultSize int64 `protobuf:"varint,20,opt,name=sql_result_size,json=sqlResultSize,proto3" json:"sql_result_size,omitempty"`+ // The query timeout duration for query and export, works for the SQL Editor and Export Center.+ QueryTimeout *durationpb.Duration `protobuf:"bytes,21,opt,name=query_timeout,json=queryTimeout,proto3" json:"query_timeout,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -637,6 +639,13 @@ func (x *WorkspaceProfileSetting) GetSqlResultSize() int64 {return 0}+func (x *WorkspaceProfileSetting) GetQueryTimeout() *durationpb.Duration {+ if x != nil {+ return x.QueryTimeout+ }+ return nil+}+type WorkspaceApprovalSetting struct {state protoimpl.MessageState `protogen:"open.v1"`Rules []*WorkspaceApprovalSetting_Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`@@ -2405,7 +2414,7 @@ const file_store_setting_proto_rawDesc = "" +"\vauth_secret\x18\x01 \x01(\tR\n" +"authSecret\x12!\n" +"\fworkspace_id\x18\x02 \x01(\tR\vworkspaceId\x12\x18\n" +- "\alicense\x18\x03 \x01(\tR\alicense\"\x8f\x0f\n" ++ "\alicense\x18\x03 \x01(\tR\alicense\"\xcf\x0f\n" +"\x17WorkspaceProfileSetting\x12!\n" +"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +@@ -2428,7 +2437,8 @@ const file_store_setting_proto_rawDesc = "" +"\x14password_restriction\x18\x11 \x01(\v2;.bytebase.store.WorkspaceProfileSetting.PasswordRestrictionR\x13passwordRestriction\x12M\n" +"\x15access_token_duration\x18\x12 \x01(\v2\x19.google.protobuf.DurationR\x13accessTokenDuration\x12!\n" +"\fenable_debug\x18\x13 \x01(\bR\venableDebug\x12&\n" +- "\x0fsql_result_size\x18\x14 \x01(\x03R\rsqlResultSize\x1a\xdd\x01\n" ++ "\x0fsql_result_size\x18\x14 \x01(\x03R\rsqlResultSize\x12>\n" ++ "\rquery_timeout\x18\x15 \x01(\v2\x19.google.protobuf.DurationR\fqueryTimeout\x1a\xdd\x01\n" +"\fAnnouncement\x12U\n" +"\x05level\x18\x01 \x01(\x0e2?.bytebase.store.WorkspaceProfileSetting.Announcement.AlertLevelR\x05level\x12\x12\n" +"\x04text\x18\x02 \x01(\tR\x04text\x12\x12\n" +@@ -2660,40 +2670,41 @@ var file_store_setting_proto_depIdxs = []int32{37, // 4: bytebase.store.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration16, // 5: bytebase.store.WorkspaceProfileSetting.password_restriction:type_name -> bytebase.store.WorkspaceProfileSetting.PasswordRestriction37, // 6: bytebase.store.WorkspaceProfileSetting.access_token_duration:type_name -> google.protobuf.Duration- 17, // 7: bytebase.store.WorkspaceApprovalSetting.rules:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule- 18, // 8: bytebase.store.DataClassificationSetting.configs:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig- 22, // 9: bytebase.store.Algorithm.full_mask:type_name -> bytebase.store.Algorithm.FullMask- 23, // 10: bytebase.store.Algorithm.range_mask:type_name -> bytebase.store.Algorithm.RangeMask- 24, // 11: bytebase.store.Algorithm.md5_mask:type_name -> bytebase.store.Algorithm.MD5Mask- 25, // 12: bytebase.store.Algorithm.inner_outer_mask:type_name -> bytebase.store.Algorithm.InnerOuterMask- 27, // 13: bytebase.store.SemanticTypeSetting.types:type_name -> bytebase.store.SemanticTypeSetting.SemanticType- 34, // 14: bytebase.store.AppIMSetting.settings:type_name -> bytebase.store.AppIMSetting.IMSetting- 5, // 15: bytebase.store.AISetting.provider:type_name -> bytebase.store.AISetting.Provider- 35, // 16: bytebase.store.EnvironmentSetting.environments:type_name -> bytebase.store.EnvironmentSetting.Environment- 2, // 17: bytebase.store.WorkspaceProfileSetting.Announcement.level:type_name -> bytebase.store.WorkspaceProfileSetting.Announcement.AlertLevel- 37, // 18: bytebase.store.WorkspaceProfileSetting.PasswordRestriction.password_rotation:type_name -> google.protobuf.Duration- 38, // 19: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate- 39, // 20: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr- 3, // 21: bytebase.store.WorkspaceApprovalSetting.Rule.source:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule.Source- 19, // 22: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level- 21, // 23: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- 20, // 24: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification- 26, // 25: bytebase.store.Algorithm.RangeMask.slices:type_name -> bytebase.store.Algorithm.RangeMask.Slice- 4, // 26: bytebase.store.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.Algorithm.InnerOuterMask.MaskType- 10, // 27: bytebase.store.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.store.Algorithm- 40, // 28: bytebase.store.AppIMSetting.IMSetting.type:type_name -> bytebase.store.WebhookType- 28, // 29: bytebase.store.AppIMSetting.IMSetting.slack:type_name -> bytebase.store.AppIMSetting.Slack- 29, // 30: bytebase.store.AppIMSetting.IMSetting.feishu:type_name -> bytebase.store.AppIMSetting.Feishu- 30, // 31: bytebase.store.AppIMSetting.IMSetting.wecom:type_name -> bytebase.store.AppIMSetting.Wecom- 31, // 32: bytebase.store.AppIMSetting.IMSetting.lark:type_name -> bytebase.store.AppIMSetting.Lark- 32, // 33: bytebase.store.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.store.AppIMSetting.DingTalk- 33, // 34: bytebase.store.AppIMSetting.IMSetting.teams:type_name -> bytebase.store.AppIMSetting.Teams- 36, // 35: bytebase.store.EnvironmentSetting.Environment.tags:type_name -> bytebase.store.EnvironmentSetting.Environment.TagsEntry- 36, // [36:36] is the sub-list for method output_type- 36, // [36:36] is the sub-list for method input_type- 36, // [36:36] is the sub-list for extension type_name- 36, // [36:36] is the sub-list for extension extendee- 0, // [0:36] is the sub-list for field type_name+ 37, // 7: bytebase.store.WorkspaceProfileSetting.query_timeout:type_name -> google.protobuf.Duration+ 17, // 8: bytebase.store.WorkspaceApprovalSetting.rules:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule+ 18, // 9: bytebase.store.DataClassificationSetting.configs:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig+ 22, // 10: bytebase.store.Algorithm.full_mask:type_name -> bytebase.store.Algorithm.FullMask+ 23, // 11: bytebase.store.Algorithm.range_mask:type_name -> bytebase.store.Algorithm.RangeMask+ 24, // 12: bytebase.store.Algorithm.md5_mask:type_name -> bytebase.store.Algorithm.MD5Mask+ 25, // 13: bytebase.store.Algorithm.inner_outer_mask:type_name -> bytebase.store.Algorithm.InnerOuterMask+ 27, // 14: bytebase.store.SemanticTypeSetting.types:type_name -> bytebase.store.SemanticTypeSetting.SemanticType+ 34, // 15: bytebase.store.AppIMSetting.settings:type_name -> bytebase.store.AppIMSetting.IMSetting+ 5, // 16: bytebase.store.AISetting.provider:type_name -> bytebase.store.AISetting.Provider+ 35, // 17: bytebase.store.EnvironmentSetting.environments:type_name -> bytebase.store.EnvironmentSetting.Environment+ 2, // 18: bytebase.store.WorkspaceProfileSetting.Announcement.level:type_name -> bytebase.store.WorkspaceProfileSetting.Announcement.AlertLevel+ 37, // 19: bytebase.store.WorkspaceProfileSetting.PasswordRestriction.password_rotation:type_name -> google.protobuf.Duration+ 38, // 20: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate+ 39, // 21: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr+ 3, // 22: bytebase.store.WorkspaceApprovalSetting.Rule.source:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule.Source+ 19, // 23: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level+ 21, // 24: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ 20, // 25: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification+ 26, // 26: bytebase.store.Algorithm.RangeMask.slices:type_name -> bytebase.store.Algorithm.RangeMask.Slice+ 4, // 27: bytebase.store.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.Algorithm.InnerOuterMask.MaskType+ 10, // 28: bytebase.store.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.store.Algorithm+ 40, // 29: bytebase.store.AppIMSetting.IMSetting.type:type_name -> bytebase.store.WebhookType+ 28, // 30: bytebase.store.AppIMSetting.IMSetting.slack:type_name -> bytebase.store.AppIMSetting.Slack+ 29, // 31: bytebase.store.AppIMSetting.IMSetting.feishu:type_name -> bytebase.store.AppIMSetting.Feishu+ 30, // 32: bytebase.store.AppIMSetting.IMSetting.wecom:type_name -> bytebase.store.AppIMSetting.Wecom+ 31, // 33: bytebase.store.AppIMSetting.IMSetting.lark:type_name -> bytebase.store.AppIMSetting.Lark+ 32, // 34: bytebase.store.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.store.AppIMSetting.DingTalk+ 33, // 35: bytebase.store.AppIMSetting.IMSetting.teams:type_name -> bytebase.store.AppIMSetting.Teams+ 36, // 36: bytebase.store.EnvironmentSetting.Environment.tags:type_name -> bytebase.store.EnvironmentSetting.Environment.TagsEntry+ 37, // [37:37] is the sub-list for method output_type+ 37, // [37:37] is the sub-list for method input_type+ 37, // [37:37] is the sub-list for extension type_name+ 37, // [37:37] is the sub-list for extension extendee+ 0, // [0:37] is the sub-list for field type_name}func init() { file_store_setting_proto_init() }diff --git a/backend/generated-go/store/setting_equal.pb.go b/backend/generated-go/store/setting_equal.pb.goindex caad8481ae..3c6fc8ec8a 100644--- a/backend/generated-go/store/setting_equal.pb.go+++ b/backend/generated-go/store/setting_equal.pb.go@@ -149,6 +149,9 @@ func (x *WorkspaceProfileSetting) Equal(y *WorkspaceProfileSetting) bool {if x.SqlResultSize != y.SqlResultSize {return false}+ if p, q := x.QueryTimeout, y.QueryTimeout; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {+ return false+ }return true}diff --git a/backend/generated-go/v1/actuator_service_grpc.pb.go b/backend/generated-go/v1/actuator_service_grpc.pb.goindex d6b7b3724b..65f801ded1 100644--- a/backend/generated-go/v1/actuator_service_grpc.pb.go+++ b/backend/generated-go/v1/actuator_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/actuator_service.protodiff --git a/backend/generated-go/v1/audit_log_service_grpc.pb.go b/backend/generated-go/v1/audit_log_service_grpc.pb.goindex fa9fcdf420..d066305f1f 100644--- a/backend/generated-go/v1/audit_log_service_grpc.pb.go+++ b/backend/generated-go/v1/audit_log_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/audit_log_service.protodiff --git a/backend/generated-go/v1/auth_service_grpc.pb.go b/backend/generated-go/v1/auth_service_grpc.pb.goindex 2785f2e79f..5c9fa53130 100644--- a/backend/generated-go/v1/auth_service_grpc.pb.go+++ b/backend/generated-go/v1/auth_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/auth_service.protodiff --git a/backend/generated-go/v1/cel_service_grpc.pb.go b/backend/generated-go/v1/cel_service_grpc.pb.goindex 4cbc6937bd..06caeea246 100644--- a/backend/generated-go/v1/cel_service_grpc.pb.go+++ b/backend/generated-go/v1/cel_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/cel_service.protodiff --git a/backend/generated-go/v1/database_catalog_service_grpc.pb.go b/backend/generated-go/v1/database_catalog_service_grpc.pb.goindex 64c64e1f08..16867a3215 100644--- a/backend/generated-go/v1/database_catalog_service_grpc.pb.go+++ b/backend/generated-go/v1/database_catalog_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/database_catalog_service.protodiff --git a/backend/generated-go/v1/database_group_service_grpc.pb.go b/backend/generated-go/v1/database_group_service_grpc.pb.goindex 8cafe9f5bf..70e86cd665 100644--- a/backend/generated-go/v1/database_group_service_grpc.pb.go+++ b/backend/generated-go/v1/database_group_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/database_group_service.protodiff --git a/backend/generated-go/v1/database_service_grpc.pb.go b/backend/generated-go/v1/database_service_grpc.pb.goindex 35e9ff3c6c..cfbec1f2f0 100644--- a/backend/generated-go/v1/database_service_grpc.pb.go+++ b/backend/generated-go/v1/database_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/database_service.protodiff --git a/backend/generated-go/v1/group_service_grpc.pb.go b/backend/generated-go/v1/group_service_grpc.pb.goindex e77ad20167..8eb1061247 100644--- a/backend/generated-go/v1/group_service_grpc.pb.go+++ b/backend/generated-go/v1/group_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/group_service.protodiff --git a/backend/generated-go/v1/idp_service_grpc.pb.go b/backend/generated-go/v1/idp_service_grpc.pb.goindex eb317dcf64..2e05dd0dda 100644--- a/backend/generated-go/v1/idp_service_grpc.pb.go+++ b/backend/generated-go/v1/idp_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/idp_service.protodiff --git a/backend/generated-go/v1/instance_role_service_grpc.pb.go b/backend/generated-go/v1/instance_role_service_grpc.pb.goindex b8954a22d4..4e78ef68e3 100644--- a/backend/generated-go/v1/instance_role_service_grpc.pb.go+++ b/backend/generated-go/v1/instance_role_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/instance_role_service.protodiff --git a/backend/generated-go/v1/instance_service_grpc.pb.go b/backend/generated-go/v1/instance_service_grpc.pb.goindex 0927be6da7..d409172929 100644--- a/backend/generated-go/v1/instance_service_grpc.pb.go+++ b/backend/generated-go/v1/instance_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/instance_service.protodiff --git a/backend/generated-go/v1/issue_service_grpc.pb.go b/backend/generated-go/v1/issue_service_grpc.pb.goindex e62bba9812..8df8c9e734 100644--- a/backend/generated-go/v1/issue_service_grpc.pb.go+++ b/backend/generated-go/v1/issue_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/issue_service.protodiff --git a/backend/generated-go/v1/org_policy_service.pb.go b/backend/generated-go/v1/org_policy_service.pb.goindex 665ee8dc4c..131c747ec7 100644--- a/backend/generated-go/v1/org_policy_service.pb.go+++ b/backend/generated-go/v1/org_policy_service.pb.go@@ -11,7 +11,6 @@ import (expr "google.golang.org/genproto/googleapis/type/expr"protoreflect "google.golang.org/protobuf/reflect/protoreflect"protoimpl "google.golang.org/protobuf/runtime/protoimpl"- durationpb "google.golang.org/protobuf/types/known/durationpb"emptypb "google.golang.org/protobuf/types/known/emptypb"fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"reflect "reflect"@@ -731,26 +730,23 @@ func (x *RolloutPolicy) GetRoles() []string {// QueryDataPolicy is the policy configuration for querying data in the SQL Editor.type QueryDataPolicy struct {state protoimpl.MessageState `protogen:"open.v1"`- // workspace-level policy- // The query timeout duration in the SQL editor.- Timeout *durationpb.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"`- // workspace-level policy+ // Support both project-level and workspace-level.// The maximum number of rows to return in the SQL editor.- // The default value is -1, means no limit.- MaximumResultRows int32 `protobuf:"varint,2,opt,name=maximum_result_rows,json=maximumResultRows,proto3" json:"maximum_result_rows,omitempty"`+ // The default value <= 0, means no limit.+ MaximumResultRows int32 `protobuf:"varint,1,opt,name=maximum_result_rows,json=maximumResultRows,proto3" json:"maximum_result_rows,omitempty"`// workspace-level policy// Disable data export in the SQL editor.- DisableExport bool `protobuf:"varint,3,opt,name=disable_export,json=disableExport,proto3" json:"disable_export,omitempty"`+ DisableExport bool `protobuf:"varint,2,opt,name=disable_export,json=disableExport,proto3" json:"disable_export,omitempty"`// workspace-level policy// Disable copying query results in the SQL editor.- DisableCopyData bool `protobuf:"varint,4,opt,name=disable_copy_data,json=disableCopyData,proto3" json:"disable_copy_data,omitempty"`+ DisableCopyData bool `protobuf:"varint,3,opt,name=disable_copy_data,json=disableCopyData,proto3" json:"disable_copy_data,omitempty"`// workspace-level policy// Allow using the admin data source to query in the SQL editor.// If true, users can select the admin data source or read-only data source// If false,// 1. when read-only data source is configured, users're force to use the read-only data source// 2. otherwise fallback to use the admin data source.- AllowAdminDataSource bool `protobuf:"varint,5,opt,name=allow_admin_data_source,json=allowAdminDataSource,proto3" json:"allow_admin_data_source,omitempty"`+ AllowAdminDataSource bool `protobuf:"varint,4,opt,name=allow_admin_data_source,json=allowAdminDataSource,proto3" json:"allow_admin_data_source,omitempty"`// ================// Deprecate following fields.// Disallow running DDL statements in the SQL editor.@@ -791,13 +787,6 @@ func (*QueryDataPolicy) Descriptor() ([]byte, []int) {return file_v1_org_policy_service_proto_rawDescGZIP(), []int{8}}-func (x *QueryDataPolicy) GetTimeout() *durationpb.Duration {- if x != nil {- return x.Timeout- }- return nil-}-func (x *QueryDataPolicy) GetMaximumResultRows() int32 {if x != nil {return x.MaximumResultRows@@ -1141,7 +1130,7 @@ var File_v1_org_policy_service_proto protoreflect.FileDescriptorconst file_v1_org_policy_service_proto_rawDesc = "" +"\n" +- "\x1bv1/org_policy_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\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x16google/type/expr.proto\x1a\x13v1/annotation.proto\"\xa9\x01\n" ++ "\x1bv1/org_policy_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\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x16google/type/expr.proto\x1a\x13v1/annotation.proto\"\xa9\x01\n" +"\x13CreatePolicyRequest\x123\n" +"\x06parent\x18\x01 \x01(\tB\x1b\xe0A\x02\xfaA\x15\x12\x13bytebase.com/PolicyR\x06parent\x120\n" +"\x06policy\x18\x02 \x01(\v2\x13.bytebase.v1.PolicyB\x03\xe0A\x02R\x06policy\x12+\n" +@@ -1182,13 +1171,12 @@ const file_v1_org_policy_service_proto_rawDesc = "" +"\x06policy\"C\n" +"\rRolloutPolicy\x12\x1c\n" +"\tautomatic\x18\x01 \x01(\bR\tautomatic\x12\x14\n" +- "\x05roles\x18\x02 \x03(\tR\x05roles\"\xc6\x02\n" +- "\x0fQueryDataPolicy\x123\n" +- "\atimeout\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\atimeout\x12.\n" +- "\x13maximum_result_rows\x18\x02 \x01(\x05R\x11maximumResultRows\x12%\n" +- "\x0edisable_export\x18\x03 \x01(\bR\rdisableExport\x12*\n" +- "\x11disable_copy_data\x18\x04 \x01(\bR\x0fdisableCopyData\x125\n" +- "\x17allow_admin_data_source\x18\x05 \x01(\bR\x14allowAdminDataSource\x12!\n" ++ "\x05roles\x18\x02 \x03(\tR\x05roles\"\x91\x02\n" ++ "\x0fQueryDataPolicy\x12.\n" ++ "\x13maximum_result_rows\x18\x01 \x01(\x05R\x11maximumResultRows\x12%\n" ++ "\x0edisable_export\x18\x02 \x01(\bR\rdisableExport\x12*\n" ++ "\x11disable_copy_data\x18\x03 \x01(\bR\x0fdisableCopyData\x125\n" ++ "\x17allow_admin_data_source\x18\x04 \x01(\bR\x14allowAdminDataSource\x12!\n" +"\fdisallow_ddl\x18\a \x01(\bR\vdisallowDdl\x12!\n" +"\fdisallow_dml\x18\b \x01(\bR\vdisallowDml\"\xbf\x01\n" +"\x16MaskingExemptionPolicy\x12M\n" +@@ -1264,9 +1252,8 @@ var file_v1_org_policy_service_proto_goTypes = []any{(*MaskingRulePolicy_MaskingRule)(nil), // 15: bytebase.v1.MaskingRulePolicy.MaskingRulenil, // 16: bytebase.v1.TagPolicy.TagsEntry(*fieldmaskpb.FieldMask)(nil), // 17: google.protobuf.FieldMask- (*durationpb.Duration)(nil), // 18: google.protobuf.Duration- (*expr.Expr)(nil), // 19: google.type.Expr- (*emptypb.Empty)(nil), // 20: google.protobuf.Empty+ (*expr.Expr)(nil), // 18: google.type.Expr+ (*emptypb.Empty)(nil), // 19: google.protobuf.Empty}var file_v1_org_policy_service_proto_depIdxs = []int32{8, // 0: bytebase.v1.CreatePolicyRequest.policy:type_name -> bytebase.v1.Policy@@ -1282,27 +1269,26 @@ var file_v1_org_policy_service_proto_depIdxs = []int32{13, // 10: bytebase.v1.Policy.tag_policy:type_name -> bytebase.v1.TagPolicy10, // 11: bytebase.v1.Policy.query_data_policy:type_name -> bytebase.v1.QueryDataPolicy1, // 12: bytebase.v1.Policy.resource_type:type_name -> bytebase.v1.PolicyResourceType- 18, // 13: bytebase.v1.QueryDataPolicy.timeout:type_name -> google.protobuf.Duration- 14, // 14: bytebase.v1.MaskingExemptionPolicy.exemptions:type_name -> bytebase.v1.MaskingExemptionPolicy.Exemption- 15, // 15: bytebase.v1.MaskingRulePolicy.rules:type_name -> bytebase.v1.MaskingRulePolicy.MaskingRule- 16, // 16: bytebase.v1.TagPolicy.tags:type_name -> bytebase.v1.TagPolicy.TagsEntry- 19, // 17: bytebase.v1.MaskingExemptionPolicy.Exemption.condition:type_name -> google.type.Expr- 19, // 18: bytebase.v1.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr- 5, // 19: bytebase.v1.OrgPolicyService.GetPolicy:input_type -> bytebase.v1.GetPolicyRequest- 6, // 20: bytebase.v1.OrgPolicyService.ListPolicies:input_type -> bytebase.v1.ListPoliciesRequest- 2, // 21: bytebase.v1.OrgPolicyService.CreatePolicy:input_type -> bytebase.v1.CreatePolicyRequest- 3, // 22: bytebase.v1.OrgPolicyService.UpdatePolicy:input_type -> bytebase.v1.UpdatePolicyRequest- 4, // 23: bytebase.v1.OrgPolicyService.DeletePolicy:input_type -> bytebase.v1.DeletePolicyRequest- 8, // 24: bytebase.v1.OrgPolicyService.GetPolicy:output_type -> bytebase.v1.Policy- 7, // 25: bytebase.v1.OrgPolicyService.ListPolicies:output_type -> bytebase.v1.ListPoliciesResponse- 8, // 26: bytebase.v1.OrgPolicyService.CreatePolicy:output_type -> bytebase.v1.Policy- 8, // 27: bytebase.v1.OrgPolicyService.UpdatePolicy:output_type -> bytebase.v1.Policy- 20, // 28: bytebase.v1.OrgPolicyService.DeletePolicy:output_type -> google.protobuf.Empty- 24, // [24:29] is the sub-list for method output_type- 19, // [19:24] is the sub-list for method input_type- 19, // [19:19] is the sub-list for extension type_name- 19, // [19:19] is the sub-list for extension extendee- 0, // [0:19] is the sub-list for field type_name+ 14, // 13: bytebase.v1.MaskingExemptionPolicy.exemptions:type_name -> bytebase.v1.MaskingExemptionPolicy.Exemption+ 15, // 14: bytebase.v1.MaskingRulePolicy.rules:type_name -> bytebase.v1.MaskingRulePolicy.MaskingRule+ 16, // 15: bytebase.v1.TagPolicy.tags:type_name -> bytebase.v1.TagPolicy.TagsEntry+ 18, // 16: bytebase.v1.MaskingExemptionPolicy.Exemption.condition:type_name -> google.type.Expr+ 18, // 17: bytebase.v1.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr+ 5, // 18: bytebase.v1.OrgPolicyService.GetPolicy:input_type -> bytebase.v1.GetPolicyRequest+ 6, // 19: bytebase.v1.OrgPolicyService.ListPolicies:input_type -> bytebase.v1.ListPoliciesRequest+ 2, // 20: bytebase.v1.OrgPolicyService.CreatePolicy:input_type -> bytebase.v1.CreatePolicyRequest+ 3, // 21: bytebase.v1.OrgPolicyService.UpdatePolicy:input_type -> bytebase.v1.UpdatePolicyRequest+ 4, // 22: bytebase.v1.OrgPolicyService.DeletePolicy:input_type -> bytebase.v1.DeletePolicyRequest+ 8, // 23: bytebase.v1.OrgPolicyService.GetPolicy:output_type -> bytebase.v1.Policy+ 7, // 24: bytebase.v1.OrgPolicyService.ListPolicies:output_type -> bytebase.v1.ListPoliciesResponse+ 8, // 25: bytebase.v1.OrgPolicyService.CreatePolicy:output_type -> bytebase.v1.Policy+ 8, // 26: bytebase.v1.OrgPolicyService.UpdatePolicy:output_type -> bytebase.v1.Policy+ 19, // 27: bytebase.v1.OrgPolicyService.DeletePolicy:output_type -> google.protobuf.Empty+ 23, // [23:28] is the sub-list for method output_type+ 18, // [18:23] is the sub-list for method input_type+ 18, // [18:18] is the sub-list for extension type_name+ 18, // [18:18] is the sub-list for extension extendee+ 0, // [0:18] is the sub-list for field type_name}func init() { file_v1_org_policy_service_proto_init() }diff --git a/backend/generated-go/v1/org_policy_service_equal.pb.go b/backend/generated-go/v1/org_policy_service_equal.pb.goindex a58b99857a..ba99910054 100644--- a/backend/generated-go/v1/org_policy_service_equal.pb.go+++ b/backend/generated-go/v1/org_policy_service_equal.pb.go@@ -182,9 +182,6 @@ func (x *QueryDataPolicy) Equal(y *QueryDataPolicy) bool {if x == nil || y == nil {return x == nil && y == nil}- if p, q := x.Timeout, y.Timeout; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {- return false- }if x.MaximumResultRows != y.MaximumResultRows {return false}diff --git a/backend/generated-go/v1/org_policy_service_grpc.pb.go b/backend/generated-go/v1/org_policy_service_grpc.pb.goindex 809b9980f6..98c1d79432 100644--- a/backend/generated-go/v1/org_policy_service_grpc.pb.go+++ b/backend/generated-go/v1/org_policy_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/org_policy_service.protodiff --git a/backend/generated-go/v1/plan_service_grpc.pb.go b/backend/generated-go/v1/plan_service_grpc.pb.goindex 7fda93d1e7..13b338b86f 100644--- a/backend/generated-go/v1/plan_service_grpc.pb.go+++ b/backend/generated-go/v1/plan_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/plan_service.protodiff --git a/backend/generated-go/v1/project_service_grpc.pb.go b/backend/generated-go/v1/project_service_grpc.pb.goindex 7c02082e1e..26b1ba4622 100644--- a/backend/generated-go/v1/project_service_grpc.pb.go+++ b/backend/generated-go/v1/project_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/project_service.protodiff --git a/backend/generated-go/v1/release_service_grpc.pb.go b/backend/generated-go/v1/release_service_grpc.pb.goindex 2c81e7eda9..a652a6ee3b 100644--- a/backend/generated-go/v1/release_service_grpc.pb.go+++ b/backend/generated-go/v1/release_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/release_service.protodiff --git a/backend/generated-go/v1/review_config_service_grpc.pb.go b/backend/generated-go/v1/review_config_service_grpc.pb.goindex d8d651bb95..1a3755f34e 100644--- a/backend/generated-go/v1/review_config_service_grpc.pb.go+++ b/backend/generated-go/v1/review_config_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/review_config_service.protodiff --git a/backend/generated-go/v1/revision_service_grpc.pb.go b/backend/generated-go/v1/revision_service_grpc.pb.goindex eaec8ff215..505c053960 100644--- a/backend/generated-go/v1/revision_service_grpc.pb.go+++ b/backend/generated-go/v1/revision_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/revision_service.protodiff --git a/backend/generated-go/v1/role_service_grpc.pb.go b/backend/generated-go/v1/role_service_grpc.pb.goindex c089dd3c9c..bf72fea606 100644--- a/backend/generated-go/v1/role_service_grpc.pb.go+++ b/backend/generated-go/v1/role_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/role_service.protodiff --git a/backend/generated-go/v1/rollout_service_grpc.pb.go b/backend/generated-go/v1/rollout_service_grpc.pb.goindex 98cdc3e040..f887bcd0bb 100644--- a/backend/generated-go/v1/rollout_service_grpc.pb.go+++ b/backend/generated-go/v1/rollout_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/rollout_service.protodiff --git a/backend/generated-go/v1/service_account_service_grpc.pb.go b/backend/generated-go/v1/service_account_service_grpc.pb.goindex d3baa52d1c..b5b4cf0c29 100644--- a/backend/generated-go/v1/service_account_service_grpc.pb.go+++ b/backend/generated-go/v1/service_account_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/service_account_service.protodiff --git a/backend/generated-go/v1/setting_service.pb.go b/backend/generated-go/v1/setting_service.pb.goindex 5c7c0d30fd..860ee405d3 100644--- a/backend/generated-go/v1/setting_service.pb.go+++ b/backend/generated-go/v1/setting_service.pb.go@@ -906,6 +906,8 @@ type WorkspaceProfileSetting struct {// The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.// The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0.SqlResultSize int64 `protobuf:"varint,20,opt,name=sql_result_size,json=sqlResultSize,proto3" json:"sql_result_size,omitempty"`+ // The query timeout duration for query and export, works for the SQL Editor and Export Center.+ QueryTimeout *durationpb.Duration `protobuf:"bytes,21,opt,name=query_timeout,json=queryTimeout,proto3" json:"query_timeout,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -1080,6 +1082,13 @@ func (x *WorkspaceProfileSetting) GetSqlResultSize() int64 {return 0}+func (x *WorkspaceProfileSetting) GetQueryTimeout() *durationpb.Duration {+ if x != nil {+ return x.QueryTimeout+ }+ return nil+}+type Announcement struct {state protoimpl.MessageState `protogen:"open.v1"`// The alert level of announcement@@ -2899,7 +2908,7 @@ const file_v1_setting_service_proto_rawDesc = "" +"\x04lark\x18\x05 \x01(\v2\x1e.bytebase.v1.AppIMSetting.LarkH\x00R\x04lark\x12@\n" +"\bdingtalk\x18\x06 \x01(\v2\".bytebase.v1.AppIMSetting.DingTalkH\x00R\bdingtalk\x127\n" +"\x05teams\x18\a \x01(\v2\x1f.bytebase.v1.AppIMSetting.TeamsH\x00R\x05teamsB\t\n" +- "\apayload\"\xa0\f\n" ++ "\apayload\"\xe0\f\n" +"\x17WorkspaceProfileSetting\x12!\n" +"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +@@ -2922,7 +2931,8 @@ const file_v1_setting_service_proto_rawDesc = "" +"\x14password_restriction\x18\x11 \x01(\v28.bytebase.v1.WorkspaceProfileSetting.PasswordRestrictionR\x13passwordRestriction\x12M\n" +"\x15access_token_duration\x18\x12 \x01(\v2\x19.google.protobuf.DurationR\x13accessTokenDuration\x12!\n" +"\fenable_debug\x18\x13 \x01(\bR\venableDebug\x12&\n" +- "\x0fsql_result_size\x18\x14 \x01(\x03R\rsqlResultSize\x1a\x93\x03\n" ++ "\x0fsql_result_size\x18\x14 \x01(\x03R\rsqlResultSize\x12>\n" ++ "\rquery_timeout\x18\x15 \x01(\v2\x19.google.protobuf.DurationR\fqueryTimeout\x1a\x93\x03\n" +"\x13PasswordRestriction\x12\x1d\n" +"\n" +"min_length\x18\x01 \x01(\x05R\tminLength\x12%\n" +@@ -3133,45 +3143,46 @@ var file_v1_setting_service_proto_depIdxs = []int32{44, // 17: bytebase.v1.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration29, // 18: bytebase.v1.WorkspaceProfileSetting.password_restriction:type_name -> bytebase.v1.WorkspaceProfileSetting.PasswordRestriction44, // 19: bytebase.v1.WorkspaceProfileSetting.access_token_duration:type_name -> google.protobuf.Duration- 2, // 20: bytebase.v1.Announcement.level:type_name -> bytebase.v1.Announcement.AlertLevel- 30, // 21: bytebase.v1.WorkspaceApprovalSetting.rules:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule- 31, // 22: bytebase.v1.DataClassificationSetting.configs:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig- 35, // 23: bytebase.v1.SemanticTypeSetting.types:type_name -> bytebase.v1.SemanticTypeSetting.SemanticType- 36, // 24: bytebase.v1.Algorithm.full_mask:type_name -> bytebase.v1.Algorithm.FullMask- 37, // 25: bytebase.v1.Algorithm.range_mask:type_name -> bytebase.v1.Algorithm.RangeMask- 38, // 26: bytebase.v1.Algorithm.md5_mask:type_name -> bytebase.v1.Algorithm.MD5Mask- 39, // 27: bytebase.v1.Algorithm.inner_outer_mask:type_name -> bytebase.v1.Algorithm.InnerOuterMask- 5, // 28: bytebase.v1.AISetting.provider:type_name -> bytebase.v1.AISetting.Provider- 41, // 29: bytebase.v1.EnvironmentSetting.environments:type_name -> bytebase.v1.EnvironmentSetting.Environment- 45, // 30: bytebase.v1.AppIMSetting.IMSetting.type:type_name -> bytebase.v1.WebhookType- 22, // 31: bytebase.v1.AppIMSetting.IMSetting.slack:type_name -> bytebase.v1.AppIMSetting.Slack- 23, // 32: bytebase.v1.AppIMSetting.IMSetting.feishu:type_name -> bytebase.v1.AppIMSetting.Feishu- 24, // 33: bytebase.v1.AppIMSetting.IMSetting.wecom:type_name -> bytebase.v1.AppIMSetting.Wecom- 25, // 34: bytebase.v1.AppIMSetting.IMSetting.lark:type_name -> bytebase.v1.AppIMSetting.Lark- 26, // 35: bytebase.v1.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.v1.AppIMSetting.DingTalk- 27, // 36: bytebase.v1.AppIMSetting.IMSetting.teams:type_name -> bytebase.v1.AppIMSetting.Teams- 44, // 37: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction.password_rotation:type_name -> google.protobuf.Duration- 46, // 38: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate- 47, // 39: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr- 3, // 40: bytebase.v1.WorkspaceApprovalSetting.Rule.source:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule.Source- 32, // 41: bytebase.v1.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level- 34, // 42: bytebase.v1.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- 33, // 43: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification- 19, // 44: bytebase.v1.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.v1.Algorithm- 40, // 45: bytebase.v1.Algorithm.RangeMask.slices:type_name -> bytebase.v1.Algorithm.RangeMask.Slice- 4, // 46: bytebase.v1.Algorithm.InnerOuterMask.type:type_name -> bytebase.v1.Algorithm.InnerOuterMask.MaskType- 42, // 47: bytebase.v1.EnvironmentSetting.Environment.tags:type_name -> bytebase.v1.EnvironmentSetting.Environment.TagsEntry- 6, // 48: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest- 8, // 49: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest- 10, // 50: bytebase.v1.SettingService.UpdateSetting:input_type -> bytebase.v1.UpdateSettingRequest- 7, // 51: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse- 11, // 52: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting- 11, // 53: bytebase.v1.SettingService.UpdateSetting:output_type -> bytebase.v1.Setting- 51, // [51:54] is the sub-list for method output_type- 48, // [48:51] is the sub-list for method input_type- 48, // [48:48] is the sub-list for extension type_name- 48, // [48:48] is the sub-list for extension extendee- 0, // [0:48] is the sub-list for field type_name+ 44, // 20: bytebase.v1.WorkspaceProfileSetting.query_timeout:type_name -> google.protobuf.Duration+ 2, // 21: bytebase.v1.Announcement.level:type_name -> bytebase.v1.Announcement.AlertLevel+ 30, // 22: bytebase.v1.WorkspaceApprovalSetting.rules:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule+ 31, // 23: bytebase.v1.DataClassificationSetting.configs:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig+ 35, // 24: bytebase.v1.SemanticTypeSetting.types:type_name -> bytebase.v1.SemanticTypeSetting.SemanticType+ 36, // 25: bytebase.v1.Algorithm.full_mask:type_name -> bytebase.v1.Algorithm.FullMask+ 37, // 26: bytebase.v1.Algorithm.range_mask:type_name -> bytebase.v1.Algorithm.RangeMask+ 38, // 27: bytebase.v1.Algorithm.md5_mask:type_name -> bytebase.v1.Algorithm.MD5Mask+ 39, // 28: bytebase.v1.Algorithm.inner_outer_mask:type_name -> bytebase.v1.Algorithm.InnerOuterMask+ 5, // 29: bytebase.v1.AISetting.provider:type_name -> bytebase.v1.AISetting.Provider+ 41, // 30: bytebase.v1.EnvironmentSetting.environments:type_name -> bytebase.v1.EnvironmentSetting.Environment+ 45, // 31: bytebase.v1.AppIMSetting.IMSetting.type:type_name -> bytebase.v1.WebhookType+ 22, // 32: bytebase.v1.AppIMSetting.IMSetting.slack:type_name -> bytebase.v1.AppIMSetting.Slack+ 23, // 33: bytebase.v1.AppIMSetting.IMSetting.feishu:type_name -> bytebase.v1.AppIMSetting.Feishu+ 24, // 34: bytebase.v1.AppIMSetting.IMSetting.wecom:type_name -> bytebase.v1.AppIMSetting.Wecom+ 25, // 35: bytebase.v1.AppIMSetting.IMSetting.lark:type_name -> bytebase.v1.AppIMSetting.Lark+ 26, // 36: bytebase.v1.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.v1.AppIMSetting.DingTalk+ 27, // 37: bytebase.v1.AppIMSetting.IMSetting.teams:type_name -> bytebase.v1.AppIMSetting.Teams+ 44, // 38: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction.password_rotation:type_name -> google.protobuf.Duration+ 46, // 39: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate+ 47, // 40: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr+ 3, // 41: bytebase.v1.WorkspaceApprovalSetting.Rule.source:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule.Source+ 32, // 42: bytebase.v1.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level+ 34, // 43: bytebase.v1.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ 33, // 44: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification+ 19, // 45: bytebase.v1.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.v1.Algorithm+ 40, // 46: bytebase.v1.Algorithm.RangeMask.slices:type_name -> bytebase.v1.Algorithm.RangeMask.Slice+ 4, // 47: bytebase.v1.Algorithm.InnerOuterMask.type:type_name -> bytebase.v1.Algorithm.InnerOuterMask.MaskType+ 42, // 48: bytebase.v1.EnvironmentSetting.Environment.tags:type_name -> bytebase.v1.EnvironmentSetting.Environment.TagsEntry+ 6, // 49: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest+ 8, // 50: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest+ 10, // 51: bytebase.v1.SettingService.UpdateSetting:input_type -> bytebase.v1.UpdateSettingRequest+ 7, // 52: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse+ 11, // 53: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting+ 11, // 54: bytebase.v1.SettingService.UpdateSetting:output_type -> bytebase.v1.Setting+ 52, // [52:55] is the sub-list for method output_type+ 49, // [49:52] is the sub-list for method input_type+ 49, // [49:49] is the sub-list for extension type_name+ 49, // [49:49] is the sub-list for extension extendee+ 0, // [0:49] is the sub-list for field type_name}func init() { file_v1_setting_service_proto_init() }diff --git a/backend/generated-go/v1/setting_service_equal.pb.go b/backend/generated-go/v1/setting_service_equal.pb.goindex 6c78ae95ce..fc4353a0a3 100644--- a/backend/generated-go/v1/setting_service_equal.pb.go+++ b/backend/generated-go/v1/setting_service_equal.pb.go@@ -390,6 +390,9 @@ func (x *WorkspaceProfileSetting) Equal(y *WorkspaceProfileSetting) bool {if x.SqlResultSize != y.SqlResultSize {return false}+ if p, q := x.QueryTimeout, y.QueryTimeout; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {+ return false+ }return true}diff --git a/backend/generated-go/v1/setting_service_grpc.pb.go b/backend/generated-go/v1/setting_service_grpc.pb.goindex d80885f8d0..93f85754f6 100644--- a/backend/generated-go/v1/setting_service_grpc.pb.go+++ b/backend/generated-go/v1/setting_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/setting_service.protodiff --git a/backend/generated-go/v1/sheet_service_grpc.pb.go b/backend/generated-go/v1/sheet_service_grpc.pb.goindex 6bcf9ec55f..4309ab1081 100644--- a/backend/generated-go/v1/sheet_service_grpc.pb.go+++ b/backend/generated-go/v1/sheet_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/sheet_service.protodiff --git a/backend/generated-go/v1/sql_service_grpc.pb.go b/backend/generated-go/v1/sql_service_grpc.pb.goindex 5638ddae50..c441de3f9b 100644--- a/backend/generated-go/v1/sql_service_grpc.pb.go+++ b/backend/generated-go/v1/sql_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/sql_service.protodiff --git a/backend/generated-go/v1/subscription_service_grpc.pb.go b/backend/generated-go/v1/subscription_service_grpc.pb.goindex 6dee1bc5b2..6375c57fd0 100644--- a/backend/generated-go/v1/subscription_service_grpc.pb.go+++ b/backend/generated-go/v1/subscription_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/subscription_service.protodiff --git a/backend/generated-go/v1/user_service_grpc.pb.go b/backend/generated-go/v1/user_service_grpc.pb.goindex 2ae3dc82df..abf857d00b 100644--- a/backend/generated-go/v1/user_service_grpc.pb.go+++ b/backend/generated-go/v1/user_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/user_service.protodiff --git a/backend/generated-go/v1/workload_identity_service_grpc.pb.go b/backend/generated-go/v1/workload_identity_service_grpc.pb.goindex 7163fd5897..0e99131a06 100644--- a/backend/generated-go/v1/workload_identity_service_grpc.pb.go+++ b/backend/generated-go/v1/workload_identity_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/workload_identity_service.protodiff --git a/backend/generated-go/v1/worksheet_service_grpc.pb.go b/backend/generated-go/v1/worksheet_service_grpc.pb.goindex 8e869a17c4..f08c96b437 100644--- a/backend/generated-go/v1/worksheet_service_grpc.pb.go+++ b/backend/generated-go/v1/worksheet_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/worksheet_service.protodiff --git a/backend/generated-go/v1/workspace_service_grpc.pb.go b/backend/generated-go/v1/workspace_service_grpc.pb.goindex 377ff52ea8..4cd154da44 100644--- a/backend/generated-go/v1/workspace_service_grpc.pb.go+++ b/backend/generated-go/v1/workspace_service_grpc.pb.go@@ -1,6 +1,6 @@// Code generated by protoc-gen-go-grpc. DO NOT EDIT.// versions:-// - protoc-gen-go-grpc v1.6.0+// - protoc-gen-go-grpc v1.6.1// - protoc (unknown)// source: v1/workspace_service.protodiff --git a/backend/migrator/migration/3.15/0008##move_timeout_to_workspace_profile.sql b/backend/migrator/migration/3.15/0008##move_timeout_to_workspace_profile.sqlnew file mode 100644index 0000000000..cb51d4c961--- /dev/null+++ b/backend/migrator/migration/3.15/0008##move_timeout_to_workspace_profile.sql@@ -0,0 +1,33 @@+-- Move timeout from QUERY_DATA policy to WORKSPACE_PROFILE setting+-- This migration moves the query timeout duration from the workspace-level+-- QUERY_DATA policy to the WORKSPACE_PROFILE setting (as queryTimeout)++-- Step 1: Update or insert WORKSPACE_PROFILE setting with the timeout from QUERY_DATA policy+WITH query_timeout AS (+ SELECT payload->>'timeout' AS timeout+ FROM policy+ WHERE resource_type = 'WORKSPACE'+ AND type = 'QUERY_DATA'+ AND payload ? 'timeout'+ AND payload->>'timeout' IS NOT NULL+ LIMIT 1+)+INSERT INTO setting (name, value)+SELECT+ 'WORKSPACE_PROFILE',+ jsonb_build_object('queryTimeout', query_timeout.timeout)+FROM query_timeout+ON CONFLICT (name)+DO UPDATE SET+ value = CASE+ WHEN setting.value IS NULL OR setting.value = '{}'::jsonb THEN+ jsonb_build_object('queryTimeout', (SELECT timeout FROM query_timeout))+ ELSE+ setting.value || jsonb_build_object('queryTimeout', (SELECT timeout FROM query_timeout))+ END;++-- Step 2: Remove timeout field from all QUERY_DATA policies+UPDATE policy+SET payload = payload - 'timeout'+WHERE type = 'QUERY_DATA'+ AND payload ? 'timeout';diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.goindex a2c69161f8..7cfb70c6c9 100644--- a/backend/migrator/migrator_test.go+++ b/backend/migrator/migrator_test.go@@ -12,8 +12,8 @@ import (func TestLatestVersion(t *testing.T) {files, err := getSortedVersionedFiles()require.NoError(t, err)- require.Equal(t, semver.MustParse("3.15.7"), *files[len(files)-1].version)- require.Equal(t, "migration/3.15/0007##drop_sheet_table.sql", files[len(files)-1].path)+ require.Equal(t, semver.MustParse("3.15.8"), *files[len(files)-1].version)+ require.Equal(t, "migration/3.15/0008##move_timeout_to_workspace_profile.sql", files[len(files)-1].path)}func TestVersionUnique(t *testing.T) {diff --git a/backend/runner/taskrun/data_export_executor.go b/backend/runner/taskrun/data_export_executor.goindex 32fe523ef3..2ecc9b5d66 100644--- a/backend/runner/taskrun/data_export_executor.go+++ b/backend/runner/taskrun/data_export_executor.go@@ -7,11 +7,13 @@ import ("fmt""io""log/slog"+ "math""strings""time""github.com/alexmullins/zip""github.com/pkg/errors"+ "google.golang.org/protobuf/types/known/durationpb"apiv1 "github.com/bytebase/bytebase/backend/api/v1""github.com/bytebase/bytebase/backend/common"@@ -167,11 +169,13 @@ func (exec *DataExportExecutor) executeExport(// 2. Get query restrictions from workspace policymaximumSQLResultSize := exec.getSQLResultSizeLimit(ctx)+ timoutInSeconds := exec.getQueryTimeoutInSeconds(ctx)// 3. Build query context with limitsqueryContext := db.QueryContext{OperatorEmail: user.Email,MaximumSQLResultSize: maximumSQLResultSize,+ Timeout: &durationpb.Duration{Seconds: timoutInSeconds},}// 4. Execute query with timeout@@ -208,12 +212,24 @@ func (exec *DataExportExecutor) getSQLResultSizeLimit() int64 {maximumResultSize, err := exec.store.GetSQLResultSize(ctx)if err != nil {- slog.Error("failed to get the query data policy", log.BBError(err))+ slog.Error("failed to get the sql result size limit", log.BBError(err))return common.DefaultMaximumSQLResultSize}return maximumResultSize}+// getQueryTimeoutInSeconds gets the query timeout limit.+func (exec *DataExportExecutor) getQueryTimeoutInSeconds(+ ctx context.Context,+) int64 {+ timeout, err := exec.store.GetQueryTimeoutInSeconds(ctx)+ if err != nil {+ slog.Error("failed to get the sql timeout limit", log.BBError(err))+ return math.MaxInt64+ }+ return timeout+}+// formatAndZipResults formats query results and packages them into a ZIP archive.func (exec *DataExportExecutor) formatAndZipResults(ctx context.Context,diff --git a/backend/store/policy.go b/backend/store/policy.goindex cfb87ee91b..a99d31e8f1 100644--- a/backend/store/policy.go+++ b/backend/store/policy.go@@ -11,7 +11,6 @@ import ("github.com/pkg/errors""google.golang.org/protobuf/encoding/protojson"- "google.golang.org/protobuf/types/known/durationpb""github.com/bytebase/bytebase/backend/common""github.com/bytebase/bytebase/backend/common/log"@@ -216,39 +215,44 @@ func formatEffectiveQueryDataPolicy(policy *storepb.QueryDataPolicy) *EffectiveQif maximumResultRows <= 0 {maximumResultRows = math.MaxInt32}- timeoutInSeconds := policy.GetTimeout().GetSeconds()- if timeoutInSeconds <= 0 {- timeoutInSeconds = math.MaxInt64- }return &EffectiveQueryDataPolicy{- MaximumResultRows: maximumResultRows,- MaxQueryTimeoutInSeconds: timeoutInSeconds,- DisableCopyData: policy.GetDisableCopyData(),- DisableExport: policy.GetDisableExport(),- AllowAdminDataSource: policy.GetAllowAdminDataSource(),+ MaximumResultRows: maximumResultRows,+ DisableCopyData: policy.GetDisableCopyData(),+ DisableExport: policy.GetDisableExport(),+ AllowAdminDataSource: policy.GetAllowAdminDataSource(),}}-func (s *Store) GetEffectiveQueryDataPolicy(ctx context.Context) (*EffectiveQueryDataPolicy, error) {+func (s *Store) GetEffectiveQueryDataPolicy(ctx context.Context, projectFullName string) (*EffectiveQueryDataPolicy, error) {workspacePolicy, err := s.getQueryDataPolicy(ctx, "")if err != nil {return nil, err}+ projectPolicy, err := s.getQueryDataPolicy(ctx, projectFullName)+ if err != nil {+ return nil, err+ }formatWorkspacePolicy := formatEffectiveQueryDataPolicy(workspacePolicy)+ formatProjectPolicy := formatEffectiveQueryDataPolicy(projectPolicy)maximumResultSize, err := s.GetSQLResultSize(ctx)if err != nil {return nil, err}+ queryTimeout, err := s.GetQueryTimeoutInSeconds(ctx)+ if err != nil {+ return nil, err+ }+return &EffectiveQueryDataPolicy{DisableCopyData: formatWorkspacePolicy.DisableCopyData,DisableExport: formatWorkspacePolicy.DisableExport,- MaximumResultRows: formatWorkspacePolicy.MaximumResultRows,+ MaximumResultRows: min(formatWorkspacePolicy.MaximumResultRows, formatProjectPolicy.MaximumResultRows),MaximumResultSize: maximumResultSize,- MaxQueryTimeoutInSeconds: formatWorkspacePolicy.MaxQueryTimeoutInSeconds,+ MaxQueryTimeoutInSeconds: queryTimeout,AllowAdminDataSource: formatWorkspacePolicy.AllowAdminDataSource,}, nil}@@ -268,9 +272,7 @@ func (s *Store) getQueryDataPolicy(ctx context.Context, resource string) (*storereturn nil, errors.Wrapf(err, "failed to get policy")}if policy == nil {- return &storepb.QueryDataPolicy{- Timeout: &durationpb.Duration{},- }, nil+ return &storepb.QueryDataPolicy{}, nil}p := &storepb.QueryDataPolicy{}diff --git a/backend/store/setting.go b/backend/store/setting.goindex 79e38c4998..88acf374f6 100644--- a/backend/store/setting.go+++ b/backend/store/setting.go@@ -3,6 +3,7 @@ package storeimport ("context""database/sql"+ "math""github.com/pkg/errors""google.golang.org/protobuf/encoding/protojson"@@ -55,6 +56,19 @@ func (s *Store) GetSQLResultSize(ctx context.Context) (int64, error) {return maximumResultSize, nil}+// GetQueryTimeoutInSeconds gets the valid query_timeout from the workspace profile setting.+func (s *Store) GetQueryTimeoutInSeconds(ctx context.Context) (int64, error) {+ workspaceProfile, err := s.GetWorkspaceProfileSetting(ctx)+ if err != nil {+ return 0, err+ }+ timeout := workspaceProfile.GetQueryTimeout()+ if timeout.GetSeconds() <= 0 {+ return math.MaxInt64, nil+ }+ return timeout.GetSeconds(), nil+}+// GetWorkspaceProfileSetting gets the workspace profile setting payload.func (s *Store) GetWorkspaceProfileSetting(ctx context.Context) (*storepb.WorkspaceProfileSetting, error) {setting, err := s.GetSetting(ctx, storepb.SettingName_WORKSPACE_PROFILE)diff --git a/frontend/src/components/DataExportButton.vue b/frontend/src/components/DataExportButton.vueindex 485c362207..53e4e66e9b 100644--- a/frontend/src/components/DataExportButton.vue+++ b/frontend/src/components/DataExportButton.vue@@ -44,7 +44,7 @@<NFormItem path="limit" :label="$t('export-data.export-rows')"><MaxRowCountSelectref="maxRowCountSelectRef"- :maximum-export-count="maximumExportCount"+ :maximum="maximumExportCount"v-model:value="formData.limit"/></NFormItem>diff --git a/frontend/src/components/GeneralSetting/MaximumSQLResultSizeSetting.vue b/frontend/src/components/GeneralSetting/MaximumSQLResultSizeSetting.vueindex ab2311c051..b65dbe62f7 100644--- a/frontend/src/components/GeneralSetting/MaximumSQLResultSizeSetting.vue+++ b/frontend/src/components/GeneralSetting/MaximumSQLResultSizeSetting.vue@@ -1,6 +1,6 @@<template><div class="flex flex-col gap-y-6">- <div>+ <div v-if="isWorkspace && canGetWorkspaceProfile"><p class="font-medium flex flex-row justify-start items-center"><span class="mr-2">{{ $t("settings.general.workspace.maximum-sql-result.size.self") }}@@ -62,6 +62,7 @@<div class="mt-3 w-full flex flex-row justify-start items-center gap-4"><PermissionGuardWrapperv-slot="slotProps"+ :project="project":permissions="['bb.policies.update']"@@ -70,7 +71,7 @@:value="queryRestriction.maximumResultRows":disabled="!hasQueryPolicyFeature || slotProps.disabled"class="w-60"- :min="-1"+ :min="0":precision="0"@update:value="handleInput(@@ -100,6 +101,7 @@ import {DEFAULT_MAX_RESULT_SIZE_IN_MB,featureToRef,usePolicyV1Store,+ useProjectV1Store,useSettingV1Store,} from "@/store";import {@@ -109,6 +111,7 @@ import {QueryDataPolicySchema,} from "@/types/proto-es/v1/org_policy_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";+import { hasWorkspacePermissionV2 } from "@/utils";import { FeatureBadge } from "../FeatureGuard";const props = defineProps<{@@ -118,15 +121,29 @@ const props = defineProps<{const policyV1Store = usePolicyV1Store();const settingV1Store = useSettingV1Store();+const projectStore = useProjectV1Store();++const isWorkspace = computed(() => props.resource === "");+const project = computed(() =>+ isWorkspace.value ? undefined : projectStore.getProjectByName(props.resource)+);++const canGetWorkspaceProfile = computed(() =>+ hasWorkspacePermissionV2("bb.settings.getWorkspaceProfile")+);const initialState = () => {let size = settingV1Store.workspaceProfile.sqlResultSize;if (size <= 0) {size = BigInt(DEFAULT_MAX_RESULT_SIZE_IN_MB * 1024 * 1024);}+ let rows = Number(props.policy.maximumResultRows);+ if (rows < 0) {+ rows = 0;+ }return {maximumResultSize: Math.round(Number(size) / 1024 / 1024),- maximumResultRows: Number(props.policy.maximumResultRows),+ maximumResultRows: rows,};};diff --git a/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue b/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vueindex 631d9d0152..040fe24351 100644--- a/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue+++ b/frontend/src/components/GeneralSetting/QueryDataPolicySetting.vue@@ -84,11 +84,11 @@<PermissionGuardWrapperv-slot="slotProps":permissions="[- 'bb.policies.update'+ 'bb.settings.setWorkspaceProfile']"><NInputNumber- :value="state.maxQueryTimeInseconds"+ :value="maxQueryTimeInseconds":disabled="!hasQueryPolicyFeature || slotProps.disabled"class="w-60":min="0"@@ -107,7 +107,7 @@<script lang="ts" setup>import { create } from "@bufbuild/protobuf";-import { DurationSchema } from "@bufbuild/protobuf/wkt";+import { DurationSchema, FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { isEqual } from "lodash-es";import { NInputNumber } from "naive-ui";import { computed, reactive, ref, watch } from "vue";@@ -118,6 +118,7 @@ import {featureToRef,usePolicyByParentAndType,usePolicyV1Store,+ useSettingV1Store,} from "@/store";import {PolicyResourceType,@@ -129,7 +130,6 @@ import { FeatureBadge } from "../FeatureGuard";import MaximumSQLResultSizeSetting from "./MaximumSQLResultSizeSetting.vue";interface LocalState {- maxQueryTimeInseconds: number;disableExport: boolean;disableCopyData: boolean;allowAdminDataSource: boolean;@@ -140,6 +140,7 @@ const props = defineProps<{}>();const policyV1Store = usePolicyV1Store();+const settingV1Store = useSettingV1Store();const hasQueryPolicyFeature = featureToRef(PlanFeature.FEATURE_QUERY_POLICY);const hasRestrictCopyingDataFeature = featureToRef(@@ -159,20 +160,25 @@ const policyPayload = computed(() => {const getInitialState = (): LocalState => {return {- maxQueryTimeInseconds: Number(policyPayload.value.timeout?.seconds ?? 0),disableExport: policyPayload.value.disableExport,disableCopyData: policyPayload.value.disableCopyData,allowAdminDataSource: policyPayload.value.allowAdminDataSource,};};+const getInitTimeInseconds = () => {+ return Number(settingV1Store.workspaceProfile.queryTimeout?.seconds ?? 0);+};+const state = reactive<LocalState>(getInitialState());+const maxQueryTimeInseconds = ref<number>(getInitTimeInseconds());const maximumSQLResultSizeSettingRef =ref<InstanceType<typeof MaximumSQLResultSizeSetting>>();const revert = () => {Object.assign(state, getInitialState());+ maxQueryTimeInseconds.value = getInitTimeInseconds();maximumSQLResultSizeSettingRef.value?.revert();};@@ -188,6 +194,7 @@ watch(const isDirty = computed(() => {return (!isEqual(state, getInitialState()) ||+ getInitTimeInseconds() !== maxQueryTimeInseconds.value ||maximumSQLResultSizeSettingRef.value?.isDirty);});@@ -196,6 +203,19 @@ const updateChange = async () => {if (maximumSQLResultSizeSettingRef.value?.isDirty) {await maximumSQLResultSizeSettingRef.value.update();}++ if (getInitTimeInseconds() !== maxQueryTimeInseconds.value) {+ await settingV1Store.updateWorkspaceProfile({+ payload: {+ queryTimeout: create(DurationSchema, {+ seconds: BigInt(maxQueryTimeInseconds.value),+ }),+ },+ updateMask: create(FieldMaskSchema, {+ paths: ["value.workspace_profile.query_timeout"],+ }),+ });+ }await policyV1Store.upsertPolicy({parentPath: props.resource,policy: {@@ -208,9 +228,6 @@ const updateChange = async () => {disableExport: state.disableExport,disableCopyData: state.disableCopyData,allowAdminDataSource: state.allowAdminDataSource,- timeout: create(DurationSchema, {- seconds: BigInt(state.maxQueryTimeInseconds),- }),}),},},@@ -220,7 +237,7 @@ const updateChange = async () => {const handleInput = (value: number | null) => {if (value === null) return;if (value === undefined) return;- state.maxQueryTimeInseconds = value;+ maxQueryTimeInseconds.value = value;};defineExpose({diff --git a/frontend/src/components/GrantRequestPanel/MaxRowCountSelect.vue b/frontend/src/components/GrantRequestPanel/MaxRowCountSelect.vueindex bd6143d945..286112a680 100644--- a/frontend/src/components/GrantRequestPanel/MaxRowCountSelect.vue+++ b/frontend/src/components/GrantRequestPanel/MaxRowCountSelect.vue@@ -46,7 +46,7 @@ import { minmax } from "@/utils";const props = defineProps<{value: number;quaternary?: boolean;- maximumExportCount: number;+ maximum: number;}>();const emit = defineEmits<{@@ -57,13 +57,10 @@ const { t } = useI18n();const rowCountOptions = computed(() => {const list = [1, 100, 500, 1000, 5000, 10000, 100000].filter(- (num) => num <= props.maximumExportCount+ (num) => num <= props.maximum);- if (- props.maximumExportCount !== Number.MAX_VALUE &&- !list.includes(props.maximumExportCount)- ) {- list.push(props.maximumExportCount);+ if (props.maximum !== Number.MAX_VALUE && !list.includes(props.maximum)) {+ list.push(props.maximum);}return list;});diff --git a/frontend/src/components/Project/Settings/ProjectSecuritySettingPanel.vue b/frontend/src/components/Project/Settings/ProjectSecuritySettingPanel.vueindex 2dcddf124c..550e8644d5 100644--- a/frontend/src/components/Project/Settings/ProjectSecuritySettingPanel.vue+++ b/frontend/src/components/Project/Settings/ProjectSecuritySettingPanel.vue@@ -4,31 +4,71 @@ref="sqlReviewForResourceRef":resource="project.name"/>++ <MaximumSQLResultSizeSetting+ ref="maximumSQLResultSizeSettingRef"+ :resource="project.name"+ :policy="policyPayload"+ /></div></template><script setup lang="ts">-import { computed, ref } from "vue";+import { computed, ref, watch } from "vue";+import MaximumSQLResultSizeSetting from "@/components/GeneralSetting/MaximumSQLResultSizeSetting.vue";import { SQLReviewForResource } from "@/components/SQLReview";+import { usePolicyByParentAndType, usePolicyV1Store } from "@/store";+import { PolicyType } from "@/types/proto-es/v1/org_policy_service_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";-defineProps<{+const props = defineProps<{project: Project;}>();const sqlReviewForResourceRef =ref<InstanceType<typeof SQLReviewForResource>>();+const maximumSQLResultSizeSettingRef =+ ref<InstanceType<typeof MaximumSQLResultSizeSetting>>();-const isDirty = computed(() => sqlReviewForResourceRef.value?.isDirty);+const { ready } = usePolicyByParentAndType(+ computed(() => ({+ parentPath: props.project.name,+ policyType: PolicyType.DATA_QUERY,+ }))+);++watch(+ () => ready.value,+ (ready) => {+ if (ready) {+ maximumSQLResultSizeSettingRef.value?.revert();+ }+ }+);++const policyV1Store = usePolicyV1Store();+const policyPayload = computed(() => {+ return policyV1Store.getQueryDataPolicyByParent(props.project.name);+});++const isDirty = computed(+ () =>+ sqlReviewForResourceRef.value?.isDirty ||+ maximumSQLResultSizeSettingRef.value?.isDirty+);const onUpdate = async () => {if (sqlReviewForResourceRef.value?.isDirty) {await sqlReviewForResourceRef.value.update();}+ if (maximumSQLResultSizeSettingRef.value?.isDirty) {+ await maximumSQLResultSizeSettingRef.value.update();+ }};const resetState = () => {sqlReviewForResourceRef.value?.revert();+ maximumSQLResultSizeSettingRef.value?.revert();};defineExpose({diff --git a/frontend/src/store/modules/v1/policy.ts b/frontend/src/store/modules/v1/policy.tsindex 762d1fb6e5..8719f550ac 100644--- a/frontend/src/store/modules/v1/policy.ts+++ b/frontend/src/store/modules/v1/policy.ts@@ -1,5 +1,4 @@import { create } from "@bufbuild/protobuf";-import { DurationSchema } from "@bufbuild/protobuf/wkt";import { Code, ConnectError, createContextValues } from "@connectrpc/connect";import { defineStore } from "pinia";import { computed, reactive, ref, unref, watchEffect } from "vue";@@ -56,9 +55,6 @@ export const usePolicyV1Store = defineStore("policy_v1", () => {? policy.policy.value: create(QueryDataPolicySchema, {maximumResultRows: -1,- timeout: create(DurationSchema, {- seconds: BigInt(0),- }),});};@@ -168,21 +164,15 @@ export const usePolicyV1Store = defineStore("policy_v1", () => {const formatQueryDataPolicy = (policy: QueryDataPolicy) => {let maximumResultRows = policy.maximumResultRows;- let queryTimeoutInSeconds = Number(policy.timeout?.seconds ?? 0);-if (maximumResultRows <= 0) {maximumResultRows = Number.MAX_VALUE;}- if (queryTimeoutInSeconds <= 0) {- queryTimeoutInSeconds = Number.MAX_VALUE;- }return {disableCopyData: policy.disableCopyData,disableExport: policy.disableExport,allowAdminDataSource: policy.allowAdminDataSource,maximumResultRows,- queryTimeoutInSeconds,};};@@ -239,23 +229,41 @@ export const usePolicyByParentAndType = (};};-export const useQueryDataPolicy = () => {+export const useQueryDataPolicy = (project: MaybeRef<string>) => {const store = usePolicyV1Store();const ready = ref(false);watchEffect(() => {- // Fetch workspace-level DATA_QUERY policies- store- .getOrFetchPolicyByParentAndType({+ Promise.all([+ // Fetch workspace-level DATA_QUERY policies+ store.getOrFetchPolicyByParentAndType({parentPath: "",policyType: PolicyType.DATA_QUERY,- })- .finally(() => (ready.value = true));+ }),+ // Fetch project-level DATA_QUERY policies+ store.getOrFetchPolicyByParentAndType({+ parentPath: unref(project),+ policyType: PolicyType.DATA_QUERY,+ }),+ ]).finally(() => (ready.value = true));});- const policy = computed(() =>- formatQueryDataPolicy(store.getQueryDataPolicyByParent(""))- );+ const policy = computed(() => {+ const workspacePolicy = formatQueryDataPolicy(+ store.getQueryDataPolicyByParent("")+ );+ const projectPolicy = formatQueryDataPolicy(+ store.getQueryDataPolicyByParent(unref(project))+ );++ return {+ ...workspacePolicy,+ maximumResultRows: Math.min(+ workspacePolicy.maximumResultRows,+ projectPolicy.maximumResultRows+ ),+ };+ });return {policy,diff --git a/frontend/src/types/proto-es/v1/org_policy_service_pb.d.ts b/frontend/src/types/proto-es/v1/org_policy_service_pb.d.tsindex 387adb8de6..d2ea60a20d 100644--- a/frontend/src/types/proto-es/v1/org_policy_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/org_policy_service_pb.d.ts@@ -4,7 +4,7 @@import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";import type { Message } from "@bufbuild/protobuf";-import type { Duration, EmptySchema, FieldMask } from "@bufbuild/protobuf/wkt";+import type { EmptySchema, FieldMask } from "@bufbuild/protobuf/wkt";import type { Expr } from "../google/type/expr_pb";/**@@ -303,19 +303,11 @@ export declare const RolloutPolicySchema: GenMessage<RolloutPolicy>;*/export declare type QueryDataPolicy = Message<"bytebase.v1.QueryDataPolicy"> & {/**- * workspace-level policy- * The query timeout duration in the SQL editor.- *- * @generated from field: google.protobuf.Duration timeout = 1;- */- timeout?: Duration;-- /**- * workspace-level policy+ * Support both project-level and workspace-level.* The maximum number of rows to return in the SQL editor.- * The default value is -1, means no limit.+ * The default value <= 0, means no limit.*- * @generated from field: int32 maximum_result_rows = 2;+ * @generated from field: int32 maximum_result_rows = 1;*/maximumResultRows: number;@@ -323,7 +315,7 @@ export declare type QueryDataPolicy = Message<"bytebase.v1.QueryDataPolicy"> & {* workspace-level policy* Disable data export in the SQL editor.*- * @generated from field: bool disable_export = 3;+ * @generated from field: bool disable_export = 2;*/disableExport: boolean;@@ -331,7 +323,7 @@ export declare type QueryDataPolicy = Message<"bytebase.v1.QueryDataPolicy"> & {* workspace-level policy* Disable copying query results in the SQL editor.*- * @generated from field: bool disable_copy_data = 4;+ * @generated from field: bool disable_copy_data = 3;*/disableCopyData: boolean;@@ -343,7 +335,7 @@ export declare type QueryDataPolicy = Message<"bytebase.v1.QueryDataPolicy"> & {* 1. when read-only data source is configured, users're force to use the read-only data source* 2. otherwise fallback to use the admin data source.*- * @generated from field: bool allow_admin_data_source = 5;+ * @generated from field: bool allow_admin_data_source = 4;*/allowAdminDataSource: boolean;diff --git a/frontend/src/types/proto-es/v1/org_policy_service_pb.js b/frontend/src/types/proto-es/v1/org_policy_service_pb.jsindex 7bfffdad25..49e4cadd22 100644--- a/frontend/src/types/proto-es/v1/org_policy_service_pb.js+++ b/frontend/src/types/proto-es/v1/org_policy_service_pb.js@@ -7,7 +7,7 @@ import { file_google_api_annotations } from "../google/api/annotations_pb";import { file_google_api_client } from "../google/api/client_pb";import { file_google_api_field_behavior } from "../google/api/field_behavior_pb";import { file_google_api_resource } from "../google/api/resource_pb";-import { file_google_protobuf_duration, file_google_protobuf_empty, file_google_protobuf_field_mask } from "@bufbuild/protobuf/wkt";+import { file_google_protobuf_empty, file_google_protobuf_field_mask } from "@bufbuild/protobuf/wkt";import { file_google_type_expr } from "../google/type/expr_pb";import { file_v1_annotation } from "./annotation_pb";@@ -15,7 +15,7 @@ import { file_v1_annotation } from "./annotation_pb";* Describes the file v1/org_policy_service.proto.*/export const file_v1_org_policy_service = /*@__PURE__*/- fileDesc("Cht2MS9vcmdfcG9saWN5X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIpMBChNDcmVhdGVQb2xpY3lSZXF1ZXN0EisKBnBhcmVudBgBIAEoCUIb4EEC+kEVEhNieXRlYmFzZS5jb20vUG9saWN5EigKBnBvbGljeRgCIAEoCzITLmJ5dGViYXNlLnYxLlBvbGljeUID4EECEiUKBHR5cGUYAyABKA4yFy5ieXRlYmFzZS52MS5Qb2xpY3lUeXBlIocBChNVcGRhdGVQb2xpY3lSZXF1ZXN0EigKBnBvbGljeRgBIAEoCzITLmJ5dGViYXNlLnYxLlBvbGljeUID4EECEi8KC3VwZGF0ZV9tYXNrGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzaxIVCg1hbGxvd19taXNzaW5nGAMgASgIIkAKE0RlbGV0ZVBvbGljeVJlcXVlc3QSKQoEbmFtZRgBIAEoCUIb4EEC+kEVChNieXRlYmFzZS5jb20vUG9saWN5Ij0KEEdldFBvbGljeVJlcXVlc3QSKQoEb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C5ieXRlYmFzZS52MS5EZWxldGVQb2xpY3lSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IuUB2kEEbmFtZYrqMBJiYi5wb2xpY2llcy5kZWxldGWQ6jACmOowAYLT5JMCuQFaIiogL3YxL3tuYW1lPXByb2plY3RzLyovcG9saWNpZXMvKn1aJiokL3YxL3tuYW1lPWVudmlyb25tZW50cy8qL3BvbGljaWVzLyp9WiMqIS92MS97bmFtZT1pbnN0YW5jZXMvKi9wb2xpY2llcy8qfVovKi0vdjEve25hbWU9aW5zdGFuY2VzLyovZGF0YWJhc2VzLyovcG9saWNpZXMvKn0qFS92MS97bmFtZT1wb2xpY2llcy8qfUKrAQoPY29tLmJ5dGViYXNlLnYxQhVPcmdQb2xpY3lTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation]);+ fileDesc("Cht2MS9vcmdfcG9saWN5X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIpMBChNDcmVhdGVQb2xpY3lSZXF1ZXN0EisKBnBhcmVudBgBIAEoCUIb4EEC+kEVEhNieXRlYmFzZS5jb20vUG9saWN5EigKBnBvbGljeRgCIAEoCzITLmJ5dGViYXNlLnYxLlBvbGljeUID4EECEiUKBHR5cGUYAyABKA4yFy5ieXRlYmFzZS52MS5Qb2xpY3lUeXBlIocBChNVcGRhdGVQb2xpY3lSZXF1ZXN0EigKBnBvbGljeRgBIAEoCzITLmJ5dGViYXNlLnYxLlBvbGljeUID4EEC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c3RhbmNlcy8qL3BvbGljaWVzLyp9Wj46BnBvbGljeTI0L3YxL3twb2xpY3kubmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKi9wb2xpY2llcy8qfTIcL3YxL3twb2xpY3kubmFtZT1wb2xpY2llcy8qfRKwAgoMRGVsZXRlUG9saWN5EiAuYnl0ZWJhc2UudjEuRGVsZXRlUG9saWN5UmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSLlAdpBBG5hbWWK6jASYmIucG9saWNpZXMuZGVsZXRlkOowApjqMAGC0+STArkBWiIqIC92MS97bmFtZT1wcm9qZWN0cy8qL3BvbGljaWVzLyp9WiYqJC92MS97bmFtZT1lbnZpcm9ubWVudHMvKi9wb2xpY2llcy8qfVojKiEvdjEve25hbWU9aW5zdGFuY2VzLyovcG9saWNpZXMvKn1aLyotL3YxL3tuYW1lPWluc3RhbmNlcy8qL2RhdGFiYXNlcy8qL3BvbGljaWVzLyp9KhUvdjEve25hbWU9cG9saWNpZXMvKn1CqwEKD2NvbS5ieXRlYmFzZS52MUIVT3JnUG9saWN5U2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation]);/*** Describes the message bytebase.v1.CreatePolicyRequest.diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.d.ts b/frontend/src/types/proto-es/v1/setting_service_pb.d.tsindex d0db206f5f..671b97290a 100644--- a/frontend/src/types/proto-es/v1/setting_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/setting_service_pb.d.ts@@ -620,6 +620,13 @@ export declare type WorkspaceProfileSetting = Message<"bytebase.v1.WorkspaceProf* @generated from field: int64 sql_result_size = 20;*/sqlResultSize: bigint;++ /**+ * The query timeout duration for query and export, works for the SQL Editor and Export Center.+ *+ * @generated from field: google.protobuf.Duration query_timeout = 21;+ */+ queryTimeout?: Duration;};/**diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.js b/frontend/src/types/proto-es/v1/setting_service_pb.jsindex 10e98c2f2c..cc3497e22f 100644--- a/frontend/src/types/proto-es/v1/setting_service_pb.js+++ b/frontend/src/types/proto-es/v1/setting_service_pb.js@@ -17,7 +17,7 @@ import { file_v1_issue_service } from "./issue_service_pb";* Describes the file v1/setting_service.proto.*/export const file_v1_setting_service = /*@__PURE__*/- fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0U2V0dGluZ1Jlc3BvbnNlEiUKB3NldHRpbmcYASABKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIqEBChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIqCgdzZXR0aW5nGAEgASgLMhQuYnl0ZWJhc2UudjEuU2V0dGluZ0ID4EECEhUKDXZhbGlkYXRlX29ubHkYAiABKAgSFQoNYWxsb3dfbWlzc2luZxgDIAEoCBIvCgt1cGRhdGVfbWFzaxgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2siqQIKB1NldHRpbmcSEQoEbmFtZRgBIAEoCUID4EEIEi0KBXZhbHVlGAIgASgLMhkuYnl0ZWJhc2UudjEuU2V0dGluZ1Z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YxL3tzZXR0aW5nLm5hbWU9c2V0dGluZ3MvKn1CqQEKD2NvbS5ieXRlYmFzZS52MUITU2V0dGluZ1NlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_issue_service]);+ fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0U2V0dGluZ1Jlc3BvbnNlEiUKB3NldHRpbmcYASABKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIqEBChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIqCgdzZXR0aW5nGAEgASgLMhQuYnl0ZWJhc2UudjEuU2V0dGluZ0ID4EECEhUKDXZhbGlkYXRlX29ubHkYAiABKAgSFQoNYWxsb3dfbWlzc2luZxgDIAEoCBIvCgt1cGRhdGVfbWFzaxgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2siqQIKB1NldHRpbmcSEQoEbmFtZRgBIAEoCUID4EEIEi0KBXZhbHVlGAIgASgLMhkuYnl0ZWJhc2UudjEuU2V0dGluZ1ZhbHVlQgPgQQIirAEKC1NldHRp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ABgtPkkwIoOgdzZXR0aW5nMh0vdjEve3NldHRpbmcubmFtZT1zZXR0aW5ncy8qfUKpAQoPY29tLmJ5dGViYXNlLnYxQhNTZXR0aW5nU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_issue_service]);/*** Describes the message bytebase.v1.ListSettingsRequest.diff --git a/frontend/src/utils/sqlEditor.ts b/frontend/src/utils/sqlEditor.tsindex 5af2ffe170..1558e0951d 100644--- a/frontend/src/utils/sqlEditor.ts+++ b/frontend/src/utils/sqlEditor.ts@@ -143,7 +143,7 @@ export const getValidDataSourceByPolicy = async ((ds) => ds.type === DataSourceType.READ_ONLY);- const { ready, policy } = useQueryDataPolicy();+ const { ready, policy } = useQueryDataPolicy(database.project);await wrapRefAsPromise(ready, /* expected */ true);if (policy.value.allowAdminDataSource) {diff --git a/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue b/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vueindex cfe73b5d47..46772be268 100644--- a/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue+++ b/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue@@ -88,7 +88,7 @@<MaxRowCountSelectv-model:value="resultRowsLimit":quaternary="true"- :maximum-export-count="policy.maximumResultRows"+ :maximum="policy.maximumResultRows"/></div></div>@@ -132,11 +132,11 @@ const { t } = useI18n();const tabStore = useSQLEditorTabStore();const { connection, database } = useConnectionOfCurrentSQLEditorTab();-const { redisCommandOption, resultRowsLimit } = storeToRefs(+const { redisCommandOption, resultRowsLimit, project } = storeToRefs(useSQLEditorStore());-const { policy } = useQueryDataPolicy();+const { policy } = useQueryDataPolicy(project);const show = computed(() => {return tabStore.currentTab?.mode !== "ADMIN";diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vueindex 96f2ea8c96..fec8315e4b 100644--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue@@ -239,7 +239,9 @@ const { t } = useI18n();const policyStore = usePolicyV1Store();const tabStore = useSQLEditorTabStore();-const { policy: effectiveQueryDataPolicy } = useQueryDataPolicy();+const { policy: effectiveQueryDataPolicy } = useQueryDataPolicy(+ computed(() => props.database.project)+);const detail: SQLResultViewContext["detail"] = ref(undefined);diff --git a/frontend/src/views/sql-editor/EditorPanel/ResultPanel/BatchQuerySelect.vue b/frontend/src/views/sql-editor/EditorPanel/ResultPanel/BatchQuerySelect.vueindex 55f703323d..303aca079e 100644--- a/frontend/src/views/sql-editor/EditorPanel/ResultPanel/BatchQuerySelect.vue+++ b/frontend/src/views/sql-editor/EditorPanel/ResultPanel/BatchQuerySelect.vue@@ -126,6 +126,7 @@ import { t } from "@/plugins/i18n";import {pushNotification,useDatabaseV1Store,+ useSQLEditorStore,useSQLEditorTabStore,useSQLStore,} from "@/store";@@ -164,8 +165,9 @@ const sqlStore = useSQLStore();const showEmpty = ref<boolean>(true);const contextMenu = provideResultTabListContext();const contextMenuRef = ref<InstanceType<typeof ContextMenu>>();+const { project } = storeToRefs(useSQLEditorStore());-const { policy: effectiveQueryDataPolicy } = useQueryDataPolicy();+const { policy: effectiveQueryDataPolicy } = useQueryDataPolicy(project);const selectedDatabaseNameList = ref<string[]>([]);diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex c57c5452f0..d76b76d123 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -8100,6 +8100,7 @@ paths:- name: updateMaskin: querydescription: The list of fields to update.+ required: trueschema:type: stringdescription: |-@@ -8501,6 +8502,7 @@ paths:- name: updateMaskin: querydescription: The list of fields to update.+ required: trueschema:type: stringdescription: |-@@ -9106,6 +9108,7 @@ paths:- name: updateMaskin: querydescription: The list of fields to update.+ required: trueschema:type: stringdescription: |-@@ -23190,20 +23193,14 @@ components:bytebase.v1.QueryDataPolicy:type: objectproperties:- timeout:- title: timeout- description: |-- workspace-level policy- The query timeout duration in the SQL editor.- $ref: '#/components/schemas/google.protobuf.Duration'maximumResultRows:type: integertitle: maximum_result_rowsformat: int32description: |-- workspace-level policy+ Support both project-level and workspace-level.The maximum number of rows to return in the SQL editor.- The default value is -1, means no limit.+ The default value <= 0, means no limit.disableExport:type: booleantitle: disable_export@@ -27907,6 +27904,10 @@ components:description: |-The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0.+ queryTimeout:+ title: query_timeout+ description: The query timeout duration for query and export, works for the SQL Editor and Export Center.+ $ref: '#/components/schemas/google.protobuf.Duration'title: WorkspaceProfileSettingadditionalProperties: falsebytebase.v1.WorkspaceProfileSetting.PasswordRestriction:diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 5be1fccce3..5f5c33c6a0 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -3204,9 +3204,8 @@ QueryDataPolicy is the policy configuration for querying data in the SQL Editor.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | workspace-level policy The query timeout duration. || disable_export | [bool](#bool) | | workspace-level policy Disable exporting data in the SQL editor. |-| maximum_result_rows | [int32](#int32) | | workspace-level policy The return rows limit. The default value is -1, means no limit. |+| maximum_result_rows | [int32](#int32) | | Support both project-level and workspace-level. The maximum number of rows to return in the SQL editor. The default value <= 0, means no limit. || disable_copy_data | [bool](#bool) | | workspace-level policy Disable copying data. || allow_admin_data_source | [bool](#bool) | | workspace-level policy Allow using the admin data source to query in the SQL editor. || disallow_ddl | [bool](#bool) | | ================ Deprecate following fields. Disallow running DDL statements in the SQL editor. |@@ -4406,6 +4405,7 @@ The severity level for SQL review rules.| access_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for access token. Default is 1 hour. || enable_debug | [bool](#bool) | | Whether debug mode is enabled. || sql_result_size | [int64](#int64) | | The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center. The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0. |+| query_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The query timeout duration for query and export, works for the SQL Editor and Export Center. |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex ceedd61e44..2532136a90 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -9154,14 +9154,6 @@ resource.instance_id == "local" && resource.database_name == </thead><tbody>- <tr>- <td>timeout</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>- <td></td>- <td><p>workspace-level policy-The query timeout duration. </p></td>- </tr>-<tr><td>disable_export</td><td><a href="#bool">bool</a></td>@@ -9174,9 +9166,9 @@ Disable exporting data in the SQL editor. </p></td><td>maximum_result_rows</td><td><a href="#int32">int32</a></td><td></td>- <td><p>workspace-level policy-The return rows limit.-The default value is -1, means no limit. </p></td>+ <td><p>Support both project-level and workspace-level.+The maximum number of rows to return in the SQL editor.+The default value <= 0, means no limit. </p></td></tr><tr>@@ -12197,6 +12189,13 @@ Requires ENTERPRISE license. </p></td>The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0. </p></td></tr>+ <tr>+ <td>query_timeout</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The query timeout duration for query and export, works for the SQL Editor and Export Center. </p></td>+ </tr>+</tbody></table>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 973f9ecfb4..f6d88d1f2a 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -2153,6 +2153,7 @@ For examples: resource.environment_id == "prod" && statement.aff| access_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for access token. Default is 1 hour. || enable_debug | [bool](#bool) | | Whether debug mode is enabled. || sql_result_size | [int64](#int64) | | The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center. The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0. |+| query_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The query timeout duration for query and export, works for the SQL Editor and Export Center. |@@ -6638,8 +6639,7 @@ QueryDataPolicy is the policy configuration for querying data in the SQL Editor.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | workspace-level policy The query timeout duration in the SQL editor. |-| maximum_result_rows | [int32](#int32) | | workspace-level policy The maximum number of rows to return in the SQL editor. The default value is -1, means no limit. |+| maximum_result_rows | [int32](#int32) | | Support both project-level and workspace-level. The maximum number of rows to return in the SQL editor. The default value <= 0, means no limit. || disable_export | [bool](#bool) | | workspace-level policy Disable data export in the SQL editor. || disable_copy_data | [bool](#bool) | | workspace-level policy Disable copying query results in the SQL editor. || allow_admin_data_source | [bool](#bool) | | workspace-level policy Allow using the admin data source to query in the SQL editor. If true, users can select the admin data source or read-only data source If false, 1. when read-only data source is configured, users're force to use the read-only data source 2. otherwise fallback to use the admin data source. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex b828a4a9b9..1376c50c61 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -6626,6 +6626,13 @@ Requires ENTERPRISE license. </p></td>The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0. </p></td></tr>+ <tr>+ <td>query_timeout</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The query timeout duration for query and export, works for the SQL Editor and Export Center. </p></td>+ </tr>+</tbody></table>@@ -18807,21 +18814,13 @@ Database resource name: instances/instance-id/databases/database-name. </p></td></thead><tbody>- <tr>- <td>timeout</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>- <td></td>- <td><p>workspace-level policy-The query timeout duration in the SQL editor. </p></td>- </tr>-<tr><td>maximum_result_rows</td><td><a href="#int32">int32</a></td><td></td>- <td><p>workspace-level policy+ <td><p>Support both project-level and workspace-level.The maximum number of rows to return in the SQL editor.-The default value is -1, means no limit. </p></td>+The default value <= 0, means no limit. </p></td></tr><tr>diff --git a/proto/store/store/policy.proto b/proto/store/store/policy.protoindex 9714e6aee6..0cf22cac48 100644--- a/proto/store/store/policy.proto+++ b/proto/store/store/policy.proto@@ -2,7 +2,6 @@ syntax = "proto3";package bytebase.store;-import "google/protobuf/duration.proto";import "google/type/expr.proto";option go_package = "generated-go/store";@@ -103,19 +102,15 @@ message IamPolicy {// QueryDataPolicy is the policy configuration for querying data in the SQL Editor.message QueryDataPolicy {- reserved 3;-- // workspace-level policy- // The query timeout duration.- google.protobuf.Duration timeout = 1;+ reserved 1, 3;// workspace-level policy// Disable exporting data in the SQL editor.bool disable_export = 2;- // workspace-level policy- // The return rows limit.- // The default value is -1, means no limit.+ // Support both project-level and workspace-level.+ // The maximum number of rows to return in the SQL editor.+ // The default value <= 0, means no limit.int32 maximum_result_rows = 4;// workspace-level policydiff --git a/proto/store/store/setting.proto b/proto/store/store/setting.protoindex d732642669..eac1c29e6d 100644--- a/proto/store/store/setting.proto+++ b/proto/store/store/setting.proto@@ -139,6 +139,9 @@ message WorkspaceProfileSetting {// The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.// The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0.int64 sql_result_size = 20;++ // The query timeout duration for query and export, works for the SQL Editor and Export Center.+ google.protobuf.Duration query_timeout = 21;}message WorkspaceApprovalSetting {diff --git a/proto/v1/v1/org_policy_service.proto b/proto/v1/v1/org_policy_service.protoindex a2b3724d16..2ee5ab7f0b 100644--- a/proto/v1/v1/org_policy_service.proto+++ b/proto/v1/v1/org_policy_service.proto@@ -6,7 +6,6 @@ import "google/api/annotations.proto";import "google/api/client.proto";import "google/api/field_behavior.proto";import "google/api/resource.proto";-import "google/protobuf/duration.proto";import "google/protobuf/empty.proto";import "google/protobuf/field_mask.proto";import "google/type/expr.proto";@@ -283,22 +282,18 @@ message RolloutPolicy {// QueryDataPolicy is the policy configuration for querying data in the SQL Editor.message QueryDataPolicy {- // workspace-level policy- // The query timeout duration in the SQL editor.- google.protobuf.Duration timeout = 1;-- // workspace-level policy+ // Support both project-level and workspace-level.// The maximum number of rows to return in the SQL editor.- // The default value is -1, means no limit.- int32 maximum_result_rows = 2;+ // The default value <= 0, means no limit.+ int32 maximum_result_rows = 1;// workspace-level policy// Disable data export in the SQL editor.- bool disable_export = 3;+ bool disable_export = 2;// workspace-level policy// Disable copying query results in the SQL editor.- bool disable_copy_data = 4;+ bool disable_copy_data = 3;// workspace-level policy// Allow using the admin data source to query in the SQL editor.@@ -306,7 +301,7 @@ message QueryDataPolicy {// If false,// 1. when read-only data source is configured, users're force to use the read-only data source// 2. otherwise fallback to use the admin data source.- bool allow_admin_data_source = 5;+ bool allow_admin_data_source = 4;// ================// Deprecate following fields.diff --git a/proto/v1/v1/setting_service.proto b/proto/v1/v1/setting_service.protoindex 76b17e8f75..ac168686ae 100644--- a/proto/v1/v1/setting_service.proto+++ b/proto/v1/v1/setting_service.proto@@ -249,6 +249,9 @@ message WorkspaceProfileSetting {// The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.// The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0.int64 sql_result_size = 20;++ // The query timeout duration for query and export, works for the SQL Editor and Export Center.+ google.protobuf.Duration query_timeout = 21;}message Announcement {