diff --git a/.gtmproject.yaml b/.gtmproject.yaml index 2cc885e9a7..daf3e196ad 100644 --- a/.gtmproject.yaml +++ b/.gtmproject.yaml @@ -12,7 +12,7 @@ project: # 主分支 default_branch: "master" # 默认目标分支 - default_target_branch: "v1.3.0" + default_target_branch: "v1.4.0" # 默认单据来源 default_source: "github" # 默认事件类型 diff --git a/dbm-ui/backend/flow/plugins/components/collections/mongodb/mongo_shutdown_meta.py b/dbm-ui/backend/flow/plugins/components/collections/mongodb/mongo_shutdown_meta.py index ec55a3d9d9..66a037769e 100644 --- a/dbm-ui/backend/flow/plugins/components/collections/mongodb/mongo_shutdown_meta.py +++ b/dbm-ui/backend/flow/plugins/components/collections/mongodb/mongo_shutdown_meta.py @@ -15,6 +15,7 @@ from typing import Dict, List from django.db import transaction +from django.utils.translation import ugettext as _ from pipeline.component_framework.component import Component from pipeline.core.flow.activity import Service @@ -47,7 +48,7 @@ def decommission_proxies(self, cluster: Cluster, proxies: List[Dict]): proxy_objs = common.filter_out_instance_obj(proxies, cluster.proxyinstance_set.all()) _t = common.not_exists(proxies, proxy_objs) if _t: - raise Exception("{} 存在不是本集群的实例下架列表".format(_t)) + raise Exception(_("{} 存在不是本集群的实例下架列表").format(_t)) machine_obj, cc_manage = defaultdict(dict), CcManage(cluster.bk_biz_id) cc_manage.delete_service_instance(bk_instance_ids=[obj.bk_instance_id for obj in proxy_objs]) diff --git a/dbm-ui/backend/tests/db_services/mysql/permission/test_authorize_handler.py b/dbm-ui/backend/tests/db_services/mysql/permission/test_authorize_handler.py index b75960a3c0..8fc56de3c8 100644 --- a/dbm-ui/backend/tests/db_services/mysql/permission/test_authorize_handler.py +++ b/dbm-ui/backend/tests/db_services/mysql/permission/test_authorize_handler.py @@ -16,6 +16,7 @@ import pytest from openpyxl.writer.excel import save_virtual_workbook +from backend.db_meta.enums import ClusterType from backend.db_services.mysql.permission.authorize.dataclass import MySQLAuthorizeMeta, MySQLExcelAuthorizeMeta from backend.db_services.mysql.permission.authorize.handlers import MySQLAuthorizeHandler from backend.db_services.mysql.permission.constants import AUTHORIZE_EXCEL_HEADER @@ -52,7 +53,7 @@ def test_pre_check_excel_rules(self, query_fixture): excel = io.BytesIO(excel_bytes) excel_obj = namedtuple("ExcelObj", ["file"])(file=excel) - excel_authorize = MySQLExcelAuthorizeMeta(authorize_file=excel_obj) + excel_authorize = MySQLExcelAuthorizeMeta(authorize_file=excel_obj, cluster_type=ClusterType.TenDBHA) excel_authorize.authorize_excel_data = ExcelHandler.paser(excel_authorize.authorize_file.file) authorize_data_list = self.handler.pre_check_excel_rules(excel_authorize)