Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: limit page size (#14359)
ecmadaod49e22e49a6b
diff --git a/backend/api/v1/audit_log_service.go b/backend/api/v1/audit_log_service.goindex 1a39179391..a16a219832 100644--- a/backend/api/v1/audit_log_service.go+++ b/backend/api/v1/audit_log_service.go@@ -55,7 +55,7 @@ func (s *AuditLogService) SearchAuditLogs(ctx context.Context, request *v1pb.Seaoffset, err := parseLimitAndOffset(&pageSize{token: request.PageToken,limit: int(request.PageSize),- maximum: 10000,+ maximum: 5000,})if err != nil {return nil, errdiff --git a/frontend/src/types/proto/v1/anomaly_service.ts b/frontend/src/types/proto/v1/anomaly_service.tsindex 18dafb5d68..27c33260d4 100644--- a/frontend/src/types/proto/v1/anomaly_service.ts+++ b/frontend/src/types/proto/v1/anomaly_service.ts@@ -25,7 +25,7 @@ export interface SearchAnomaliesRequest {* Not used.* The maximum number of anomalies to return. The service may return fewer than* this value.- * If unspecified, at most 50 anomalies will be returned.+ * If unspecified, at most 10 anomalies will be returned.* The maximum value is 1000; values above 1000 will be coerced to 1000.*/pageSize: number;diff --git a/frontend/src/types/proto/v1/audit_log_service.ts b/frontend/src/types/proto/v1/audit_log_service.tsindex b5578889b5..19b856afad 100644--- a/frontend/src/types/proto/v1/audit_log_service.ts+++ b/frontend/src/types/proto/v1/audit_log_service.ts@@ -37,8 +37,8 @@ export interface SearchAuditLogsRequest {/*** The maximum number of logs to return.* The service may return fewer than this value.- * If unspecified, at most 100 log entries will be returned.- * The maximum value is 10000; values above 10000 will be coerced to 10000.+ * If unspecified, at most 10 log entries will be returned.+ * The maximum value is 5000; values above 5000 will be coerced to 5000.*/pageSize: number;/**@@ -82,8 +82,8 @@ export interface ExportAuditLogsRequest {/*** The maximum number of logs to return.* The service may return fewer than this value.- * If unspecified, at most 100 log entries will be returned.- * The maximum value is 10000; values above 10000 will be coerced to 10000.+ * If unspecified, at most 10 log entries will be returned.+ * The maximum value is 5000; values above 5000 will be coerced to 5000.*/pageSize: number;/**diff --git a/frontend/src/views/SettingWorkspaceAuditLog.vue b/frontend/src/views/SettingWorkspaceAuditLog.vueindex c1726b27d3..fbad95cf00 100644--- a/frontend/src/views/SettingWorkspaceAuditLog.vue+++ b/frontend/src/views/SettingWorkspaceAuditLog.vue@@ -21,7 +21,7 @@v-if="hasAuditLogFeature":search-audit-logs="searchAuditLogs"session-key="bb.page-audit-log-table.settings-audit-log-v1-table"- :page-size="1000"+ :page-size="10"><template #table="{ list }"><AuditLogDataTable key="audit-log-table" :audit-log-list="list" />diff --git a/frontend/src/views/project/ProjectAuditLogDashboard.vue b/frontend/src/views/project/ProjectAuditLogDashboard.vueindex 1cc4155d39..e92a981d89 100644--- a/frontend/src/views/project/ProjectAuditLogDashboard.vue+++ b/frontend/src/views/project/ProjectAuditLogDashboard.vue@@ -25,7 +25,7 @@v-if="hasAuditLogFeature":search-audit-logs="searchAuditLogs":session-key="`bb.page-audit-log-table.settings-audit-log-v1-table.${projectId}`"- :page-size="1000"+ :page-size="10"><template #table="{ list }"><AuditLogDataTablediff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 7444857d04..a29885e5a2 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -10283,8 +10283,8 @@ components:description: |-The maximum number of logs to return.The service may return fewer than this value.- If unspecified, at most 100 log entries will be returned.- The maximum value is 10000; values above 10000 will be coerced to 10000.+ If unspecified, at most 10 log entries will be returned.+ The maximum value is 5000; values above 5000 will be coerced to 5000.format: int32pageToken:type: string@@ -13547,7 +13547,7 @@ components:Not used.The maximum number of anomalies to return. The service may return fewer thanthis value.- If unspecified, at most 50 anomalies will be returned.+ If unspecified, at most 10 anomalies will be returned.The maximum value is 1000; values above 1000 will be coerced to 1000.format: int32pageToken:@@ -13601,8 +13601,8 @@ components:description: |-The maximum number of logs to return.The service may return fewer than this value.- If unspecified, at most 100 log entries will be returned.- The maximum value is 10000; values above 10000 will be coerced to 10000.+ If unspecified, at most 10 log entries will be returned.+ The maximum value is 5000; values above 5000 will be coerced to 5000.format: int32pageToken:type: stringdiff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex a5efd0eb92..22485b4738 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -5189,7 +5189,7 @@ InstanceConnectionDetail is the detail for instance connection anomaly.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- || filter | [string](#string) | | filter is the filter to apply on the search anomaly request, follow the [ebnf](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax. Only support filter by resource and type for now. For example: Search the anomalies of a specific resource: 'resource="instances/{instance}".' Search the specified types of anomalies: 'type="MIGRATION_SCHEMA".' |-| page_size | [int32](#int32) | | Not used. The maximum number of anomalies to return. The service may return fewer than this value. If unspecified, at most 50 anomalies will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |+| page_size | [int32](#int32) | | Not used. The maximum number of anomalies to return. The service may return fewer than this value. If unspecified, at most 10 anomalies will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. || page_token | [string](#string) | | Not used. A page token, received from a previous `SearchAnomalies` call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to `SearchAnomalies` must match the call that provided the page token. |@@ -5455,7 +5455,7 @@ The type of action performed on a Binding in a policy.| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. For example: - filter = "method == '/bytebase.v1.SQLService/Query'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'" || order_by | [string](#string) | | The order by of the log. Only support order by create_time. For example: - order_by = "create_time asc" - order_by = "create_time desc" || format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |-| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 100 log entries will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000. |+| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. || page_token | [string](#string) | | A page token, received from a previous `ExportAuditLogs` call. Provide this to retrieve the subsequent page. |@@ -5506,7 +5506,7 @@ Metadata about the request.| parent | [string](#string) | | || filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. For example: - filter = "method == '/bytebase.v1.SQLService/Query'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'" - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'" || order_by | [string](#string) | | The order by of the log. Only support order by create_time. For example: - order_by = "create_time asc" - order_by = "create_time desc" |-| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 100 log entries will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000. |+| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. || page_token | [string](#string) | | A page token, received from a previous `SearchLogs` call. Provide this to retrieve the subsequent page. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 3a3a3a40aa..099ea0d60f 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -15008,7 +15008,7 @@ Search the specified types of anomalies: 'type="MIGRATION_SCHEMA".&#<td><p>Not used.The maximum number of anomalies to return. The service may return fewer thanthis value.-If unspecified, at most 50 anomalies will be returned.+If unspecified, at most 10 anomalies will be returned.The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr>@@ -15643,8 +15643,8 @@ For example:<td></td><td><p>The maximum number of logs to return.The service may return fewer than this value.-If unspecified, at most 100 log entries will be returned.-The maximum value is 10000; values above 10000 will be coerced to 10000. </p></td>+If unspecified, at most 10 log entries will be returned.+The maximum value is 5000; values above 5000 will be coerced to 5000. </p></td></tr><tr>@@ -15773,8 +15773,8 @@ For example:<td></td><td><p>The maximum number of logs to return.The service may return fewer than this value.-If unspecified, at most 100 log entries will be returned.-The maximum value is 10000; values above 10000 will be coerced to 10000. </p></td>+If unspecified, at most 10 log entries will be returned.+The maximum value is 5000; values above 5000 will be coerced to 5000. </p></td></tr><tr>diff --git a/proto/generated-go/v1/anomaly_service.pb.go b/proto/generated-go/v1/anomaly_service.pb.goindex b0c1ef3a33..f90a189024 100644--- a/proto/generated-go/v1/anomaly_service.pb.go+++ b/proto/generated-go/v1/anomaly_service.pb.go@@ -160,7 +160,7 @@ type SearchAnomaliesRequest struct {// Not used.// The maximum number of anomalies to return. The service may return fewer than// this value.- // If unspecified, at most 50 anomalies will be returned.+ // If unspecified, at most 10 anomalies will be returned.// The maximum value is 1000; values above 1000 will be coerced to 1000.PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`// Not used.diff --git a/proto/generated-go/v1/audit_log_service.pb.go b/proto/generated-go/v1/audit_log_service.pb.goindex b4a0381cff..ff44fa54ac 100644--- a/proto/generated-go/v1/audit_log_service.pb.go+++ b/proto/generated-go/v1/audit_log_service.pb.go@@ -112,8 +112,8 @@ type SearchAuditLogsRequest struct {OrderBy string `protobuf:"bytes,2,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`// The maximum number of logs to return.// The service may return fewer than this value.- // If unspecified, at most 100 log entries will be returned.- // The maximum value is 10000; values above 10000 will be coerced to 10000.+ // If unspecified, at most 10 log entries will be returned.+ // The maximum value is 5000; values above 5000 will be coerced to 5000.PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`// A page token, received from a previous `SearchLogs` call.// Provide this to retrieve the subsequent page.@@ -264,8 +264,8 @@ type ExportAuditLogsRequest struct {Format ExportFormat `protobuf:"varint,3,opt,name=format,proto3,enum=bytebase.v1.ExportFormat" json:"format,omitempty"`// The maximum number of logs to return.// The service may return fewer than this value.- // If unspecified, at most 100 log entries will be returned.- // The maximum value is 10000; values above 10000 will be coerced to 10000.+ // If unspecified, at most 10 log entries will be returned.+ // The maximum value is 5000; values above 5000 will be coerced to 5000.PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`// A page token, received from a previous `ExportAuditLogs` call.// Provide this to retrieve the subsequent page.diff --git a/proto/v1/anomaly_service.proto b/proto/v1/anomaly_service.protoindex 2a5307a92f..02517f2ab5 100644--- a/proto/v1/anomaly_service.proto+++ b/proto/v1/anomaly_service.proto@@ -31,7 +31,7 @@ message SearchAnomaliesRequest {// Not used.// The maximum number of anomalies to return. The service may return fewer than// this value.- // If unspecified, at most 50 anomalies will be returned.+ // If unspecified, at most 10 anomalies will be returned.// The maximum value is 1000; values above 1000 will be coerced to 1000.int32 page_size = 2;diff --git a/proto/v1/audit_log_service.proto b/proto/v1/audit_log_service.protoindex 459ea9e282..e5ec16aaa2 100644--- a/proto/v1/audit_log_service.proto+++ b/proto/v1/audit_log_service.proto@@ -64,8 +64,8 @@ message SearchAuditLogsRequest {// The maximum number of logs to return.// The service may return fewer than this value.- // If unspecified, at most 100 log entries will be returned.- // The maximum value is 10000; values above 10000 will be coerced to 10000.+ // If unspecified, at most 10 log entries will be returned.+ // The maximum value is 5000; values above 5000 will be coerced to 5000.int32 page_size = 3;// A page token, received from a previous `SearchLogs` call.@@ -108,8 +108,8 @@ message ExportAuditLogsRequest {// The maximum number of logs to return.// The service may return fewer than this value.- // If unspecified, at most 100 log entries will be returned.- // The maximum value is 10000; values above 10000 will be coerced to 10000.+ // If unspecified, at most 10 log entries will be returned.+ // The maximum value is 5000; values above 5000 will be coerced to 5000.int32 page_size = 5;// A page token, received from a previous `ExportAuditLogs` call.