From b832e88011a4a332c60bd086dc832769a8ad8507 Mon Sep 17 00:00:00 2001 From: iSecloud <869820505@qq.com> Date: Wed, 11 Sep 2024 16:08:02 +0800 Subject: [PATCH] =?UTF-8?q?refactor(backend):=20helm=E6=95=B4=E5=8C=85?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=20#6855?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/backend/flow/utils/cc_manage.py | 6 ++++-- dbm-ui/backend/iam_app/handlers/drf_perm/storage.py | 4 ++-- dbm-ui/backend/ticket/builders/__init__.py | 4 ++-- helm-charts/bk-dbm/Chart.yaml | 4 ++-- helm-charts/bk-dbm/charts/db-simulation/Chart.yaml | 2 +- helm-charts/bk-dbm/charts/dbm/Chart.yaml | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/dbm-ui/backend/flow/utils/cc_manage.py b/dbm-ui/backend/flow/utils/cc_manage.py index 691b2e5a06..ec080d29a1 100644 --- a/dbm-ui/backend/flow/utils/cc_manage.py +++ b/dbm-ui/backend/flow/utils/cc_manage.py @@ -406,7 +406,8 @@ def add_label_for_service_instance(self, bk_instance_ids: list, labels_dict: dic "bk_biz_id": self.hosting_biz_id, "instance_ids": bk_instance_ids, "labels": labels_dict, - } + }, + use_admin=True, ) def delete_service_instance(self, bk_instance_ids: List[int]): @@ -416,7 +417,8 @@ def delete_service_instance(self, bk_instance_ids: List[int]): { "bk_biz_id": self.hosting_biz_id, "service_instance_ids": bk_instance_ids, - } + }, + use_admin=True, ) except Exception as error: logger.warning(error) diff --git a/dbm-ui/backend/iam_app/handlers/drf_perm/storage.py b/dbm-ui/backend/iam_app/handlers/drf_perm/storage.py index 5a17cd3c3d..5e0166ba8a 100644 --- a/dbm-ui/backend/iam_app/handlers/drf_perm/storage.py +++ b/dbm-ui/backend/iam_app/handlers/drf_perm/storage.py @@ -51,12 +51,12 @@ def instance_id_getter(self, request, view): if is_all_pkg.pop(): self.actions = [ActionEnum.PACKAGE_MANAGE] self.resource_meta = ResourceEnum.DBTYPE - db_types = set([path.split("/")[0] for path in file_path_list]) + db_types = set([path.strip("/").split("/")[0] for path in file_path_list]) return list(db_types) else: self.actions = [ActionEnum.DB_MANAGE] self.resource_meta = ResourceEnum.BUSINESS - bk_biz_ids = set([int(path.split("/")[2]) for path in file_path_list]) + bk_biz_ids = set([int(path.strip("/").split("/")[2]) for path in file_path_list]) return list(bk_biz_ids) except Exception: logger.error(_("文件操作路径{}不合法,请联系管理员").format(file_path_list)) diff --git a/dbm-ui/backend/ticket/builders/__init__.py b/dbm-ui/backend/ticket/builders/__init__.py index f7ceeb8015..cc91929392 100644 --- a/dbm-ui/backend/ticket/builders/__init__.py +++ b/dbm-ui/backend/ticket/builders/__init__.py @@ -277,8 +277,8 @@ class TicketFlowBuilder: resource_apply_builder: ResourceApplyParamBuilder = None resource_batch_apply_builder: ResourceApplyParamBuilder = None - # inner flow互斥的重试类型,默认为自动重试 - retry_type: FlowRetryType = FlowRetryType.AUTO_RETRY + # inner flow互斥的重试类型,默认为手动重试 + retry_type: FlowRetryType = FlowRetryType.MANUAL_RETRY # 默认是否需要审批,人工确认。后续用于初始化单据配置表 default_need_itsm: bool = True default_need_manual_confirm: bool = True diff --git a/helm-charts/bk-dbm/Chart.yaml b/helm-charts/bk-dbm/Chart.yaml index a03f8bf182..b8822c68e2 100644 --- a/helm-charts/bk-dbm/Chart.yaml +++ b/helm-charts/bk-dbm/Chart.yaml @@ -91,5 +91,5 @@ dependencies: description: A Helm chart for bk-dbm name: bk-dbm type: application -version: 1.5.0-alpha.12 -appVersion: 1.5.0-alpha.12 +version: 1.5.0-alpha.13 +appVersion: 1.5.0-alpha.13 diff --git a/helm-charts/bk-dbm/charts/db-simulation/Chart.yaml b/helm-charts/bk-dbm/charts/db-simulation/Chart.yaml index 4d3baaceab..4444610266 100644 --- a/helm-charts/bk-dbm/charts/db-simulation/Chart.yaml +++ b/helm-charts/bk-dbm/charts/db-simulation/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 0.0.1-alpha.69 +appVersion: 0.0.1-alpha.70 description: A Helm chart for Kubernetes name: db-simulation type: application diff --git a/helm-charts/bk-dbm/charts/dbm/Chart.yaml b/helm-charts/bk-dbm/charts/dbm/Chart.yaml index 948d3daebb..d6031245fc 100644 --- a/helm-charts/bk-dbm/charts/dbm/Chart.yaml +++ b/helm-charts/bk-dbm/charts/dbm/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 1.5.0-alpha.509 +appVersion: 1.5.0-alpha.517 description: A Helm chart for dbm name: dbm type: application