Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: parallel_tasks_per_rollout setting (#15999)
Danny Xu6d15362298b3
diff --git a/backend/api/v1/project_service.go b/backend/api/v1/project_service.goindex 98cb43bee3..0a4de1add1 100644--- a/backend/api/v1/project_service.go+++ b/backend/api/v1/project_service.go@@ -420,6 +420,10 @@ func (s *ProjectService) UpdateProject(ctx context.Context, request *v1pb.UpdateprojectSettings := project.SettingprojectSettings.CiSamplingSize = request.Project.CiSamplingSizepatch.Setting = projectSettings+ case "parallel_tasks_per_rollout":+ projectSettings := project.Setting+ projectSettings.ParallelTasksPerRollout = request.Project.ParallelTasksPerRollout+ patch.Setting = projectSettingsdefault:return nil, status.Errorf(codes.InvalidArgument, `unsupport update_mask "%s"`, path)}@@ -1335,6 +1339,7 @@ func convertToProject(projectMessage *store.ProjectMessage) *v1pb.Project {AllowSelfApproval: projectMessage.Setting.AllowSelfApproval,ExecutionRetryPolicy: convertToV1ExecutionRetryPolicy(projectMessage.Setting.ExecutionRetryPolicy),CiSamplingSize: projectMessage.Setting.CiSamplingSize,+ ParallelTasksPerRollout: projectMessage.Setting.ParallelTasksPerRollout,}}@@ -1370,6 +1375,7 @@ func convertToProjectMessage(resourceID string, project *v1pb.Project) (*store.PPostgresDatabaseTenantMode: project.PostgresDatabaseTenantMode,AllowSelfApproval: project.AllowSelfApproval,CiSamplingSize: project.CiSamplingSize,+ ParallelTasksPerRollout: project.ParallelTasksPerRollout,}return &store.ProjectMessage{ResourceID: resourceID,diff --git a/frontend/src/components/Project/Settings/ProjectIssueRelatedSettingPanel.vue b/frontend/src/components/Project/Settings/ProjectIssueRelatedSettingPanel.vueindex 14110af5b4..f4c69710dc 100644--- a/frontend/src/components/Project/Settings/ProjectIssueRelatedSettingPanel.vue+++ b/frontend/src/components/Project/Settings/ProjectIssueRelatedSettingPanel.vue@@ -206,6 +206,27 @@</NInputNumber></div></div>+ <div>+ <p class="">+ <span class="textlabel">+ {{ $t("project.settings.issue-related.parallel_tasks_per_rollout.self") }}+ </span>+ </p>+ <p class="mt-1 mb-3 text-sm text-gray-400">+ {{ $t("project.settings.issue-related.parallel_tasks_per_rollout.description") }}+ </p>+ <div class="mt-3 w-full flex flex-row justify-start items-center gap-4">+ <NInputNumber+ :value="state.parallelTasksPerRollout"+ :disabled="!allowUpdateIssueProjectSetting || loading"+ class="w-60"+ :min="0"+ :precision="0"+ @update:value="handleParallelTasksPerRolloutInput"+ >+ </NInputNumber>+ </div>+ </div></div></div></template>@@ -239,6 +260,7 @@ interface LocalState {postgresDatabaseTenantMode: boolean;executionRetryPolicy: Project_ExecutionRetryPolicy | undefined;ciSamplingSize: number;+ parallelTasksPerRollout: number;}const getInitialLocalState = (): LocalState => {@@ -254,7 +276,8 @@ const getInitialLocalState = (): LocalState => {skipBackupErrors: project.skipBackupErrors,postgresDatabaseTenantMode: project.postgresDatabaseTenantMode,executionRetryPolicy: project.executionRetryPolicy,- ciSamplingSize: project.ciSamplingSize || 0,+ ciSamplingSize: project.ciSamplingSize,+ parallelTasksPerRollout: project.parallelTasksPerRollout,};};@@ -391,6 +414,9 @@ const updateMask = computed(() => {if (!isEqual(state.ciSamplingSize, props.project.ciSamplingSize || 0)) {mask.push("ci_sampling_size");}+ if (!isEqual(state.parallelTasksPerRollout, props.project.parallelTasksPerRollout || 0)) {+ mask.push("parallel_tasks_per_rollout");+ }return mask;});@@ -407,6 +433,11 @@ const handleCiSamplingSizeInput = (value: number | null) => {state.ciSamplingSize = value;};+const handleParallelTasksPerRolloutInput = (value: number | null) => {+ if (value === null || value === undefined) return;+ state.parallelTasksPerRollout = value;+};+defineExpose({isDirty: valueChanged,update: doUpdate,diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex e09b7693c7..ea546ed276 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -1646,6 +1646,10 @@"ci-sampling-size": {"self": "CI Data Sampling Size","description": "The maximum number of databases to sample during CI data validation. When disabled (zero), full validation will be performed."+ },+ "parallel_tasks_per_rollout": {+ "self": "Parallel tasks per rollout",+ "description": "Control the number of parallel tasks per rollout. Setting this to zero disables any throttling."}}},diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 3f416b4843..e7ab9f53f1 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -1646,6 +1646,10 @@"ci-sampling-size": {"self": "Tamaño de muestreo de datos de CI","description": "El número máximo de bases de datos para probar durante la validación de datos de CI. \nCuando está deshabilitado (cero), se realizará la validación completa."+ },+ "parallel_tasks_per_rollout": {+ "self": "Tareas paralelas por despliegue",+ "description": "Controle el número de tareas paralelas por despliegue. \nEstablecer esto en cero deshabilita cualquier estrangulamiento."}}},diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex af8a674936..d3ecfbb7b3 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -1646,6 +1646,10 @@"ci-sampling-size": {"self": "CIデータサンプリングサイズ","description": "CIデータ検証中にサンプリングするデータベースの最大数。\n無効(ゼロ)の場合、完全な検証が実行されます。"+ },+ "parallel_tasks_per_rollout": {+ "self": "ロールアウトごとの並列タスク",+ "description": "ロールアウトあたりの並列タスクの数を制御します。\nこれをゼロに設定すると、スロットリングが無効になります。"}}},diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 3279e3229b..1898f99e5e 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -1646,6 +1646,10 @@"ci-sampling-size": {"self": "Kích thước lấy mẫu dữ liệu CI","description": "Số lượng cơ sở dữ liệu tối đa để lấy mẫu trong quá trình xác thực dữ liệu CI. \nKhi bị vô hiệu hóa (không), xác thực đầy đủ sẽ được thực hiện."+ },+ "parallel_tasks_per_rollout": {+ "self": "Nhiệm vụ song song cho mỗi lần triển khai",+ "description": "Kiểm soát số lượng các tác vụ song song cho mỗi lần triển khai. \nĐặt điều này thành 0 vô hiệu hóa bất kỳ điều chỉnh."}}},diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex efc7d92df1..87da1d41a0 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1646,6 +1646,10 @@"ci-sampling-size": {"self": "CI 数据采样大小","description": "在CI数据验证期间,要采样的数据库数量的最大数量。\n禁用(零)时,将执行完整验证。"+ },+ "parallel_tasks_per_rollout": {+ "self": "每个发布的并行任务数",+ "description": "控制每个发布的并行任务数量。\n将其设置为零,可以禁用任何节流。"}}},diff --git a/frontend/src/types/proto/v1/project_service.ts b/frontend/src/types/proto/v1/project_service.tsindex 0d8c178397..607c1fb6f2 100644--- a/frontend/src/types/proto/v1/project_service.ts+++ b/frontend/src/types/proto/v1/project_service.ts@@ -217,6 +217,8 @@ export interface Project {* Without specification, sampling is disabled, resulting in a full validation.*/ciSamplingSize: number;+ /** The maximum number of parallel tasks to run during the rollout. */+ parallelTasksPerRollout: number;}export interface Project_ExecutionRetryPolicy {@@ -1680,6 +1682,7 @@ function createBaseProject(): Project {allowSelfApproval: false,executionRetryPolicy: undefined,ciSamplingSize: 0,+ parallelTasksPerRollout: 0,};}@@ -1733,6 +1736,9 @@ export const Project: MessageFns<Project> = {if (message.ciSamplingSize !== 0) {writer.uint32(184).int32(message.ciSamplingSize);}+ if (message.parallelTasksPerRollout !== 0) {+ writer.uint32(192).int32(message.parallelTasksPerRollout);+ }return writer;},@@ -1871,6 +1877,14 @@ export const Project: MessageFns<Project> = {message.ciSamplingSize = reader.int32();continue;}+ case 24: {+ if (tag !== 192) {+ break;+ }++ message.parallelTasksPerRollout = reader.int32();+ continue;+ }}if ((tag & 7) === 4 || tag === 0) {break;@@ -1908,6 +1922,9 @@ export const Project: MessageFns<Project> = {? Project_ExecutionRetryPolicy.fromJSON(object.executionRetryPolicy): undefined,ciSamplingSize: isSet(object.ciSamplingSize) ? globalThis.Number(object.ciSamplingSize) : 0,+ parallelTasksPerRollout: isSet(object.parallelTasksPerRollout)+ ? globalThis.Number(object.parallelTasksPerRollout)+ : 0,};},@@ -1961,6 +1978,9 @@ export const Project: MessageFns<Project> = {if (message.ciSamplingSize !== 0) {obj.ciSamplingSize = Math.round(message.ciSamplingSize);}+ if (message.parallelTasksPerRollout !== 0) {+ obj.parallelTasksPerRollout = Math.round(message.parallelTasksPerRollout);+ }return obj;},@@ -1987,6 +2007,7 @@ export const Project: MessageFns<Project> = {? Project_ExecutionRetryPolicy.fromPartial(object.executionRetryPolicy): undefined;message.ciSamplingSize = object.ciSamplingSize ?? 0;+ message.parallelTasksPerRollout = object.parallelTasksPerRollout ?? 0;return message;},};