!11 【bugfix】修复当没有异常时仍旧返回异常结果的问题&新增模型配置文件

From: @Lostwayzxc 
Reviewed-by: @zhu-yuncheng 
Signed-off-by: @zhu-yuncheng
This commit is contained in:
openeuler-ci-bot 2022-12-05 11:05:10 +00:00 committed by Gitee
commit 645c91e690
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 8 additions and 35 deletions

View File

@ -1,25 +0,0 @@
From 45d36577d0006175f3a4669f2e1308e18e687e38 Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Fri, 2 Dec 2022 20:21:42 +0800
Subject: [PATCH] update model name length limit to 50
---
diana/database/factory/table.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diana/database/factory/table.py b/diana/database/factory/table.py
index ef827f1..dbb7a49 100644
--- a/diana/database/factory/table.py
+++ b/diana/database/factory/table.py
@@ -77,7 +77,7 @@ class Model(Base, MyBase):
__tablename__ = "model"
model_id = Column(String(32), primary_key=True, nullable=False)
- model_name = Column(String(20), nullable=False)
+ model_name = Column(String(50), nullable=False)
tag = Column(String(255), nullable=True)
algo_id = Column(String(32), ForeignKey(
'algorithm.algo_id'), nullable=False)
--
2.33.0

Binary file not shown.

BIN
aops-diana-v1.1.2.tar.gz Normal file

Binary file not shown.

View File

@ -1,11 +1,10 @@
Name: aops-diana Name: aops-diana
Version: v1.1.1 Version: v1.1.2
Release: 2 Release: 1
Summary: An intelligent abnormal detection framework of aops Summary: An intelligent abnormal detection framework of aops
License: MulanPSL2 License: MulanPSL2
URL: https://gitee.com/openeuler/%{name} URL: https://gitee.com/openeuler/%{name}
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
Patch0001: 0001-update-model-name-length-limit-to-50.patch
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
Requires: aops-vulcanus >= v1.0.0 Requires: aops-vulcanus >= v1.0.0
@ -22,7 +21,7 @@ An intelligent abnormal detection framework of aops
%prep %prep
%autosetup -n %{name}-%{version} -p1 %autosetup -n %{name}-%{version}
# build for aops-diana # build for aops-diana
@ -37,12 +36,7 @@ An intelligent abnormal detection framework of aops
%doc README.* %doc README.*
%attr(0644,root,root) %{_sysconfdir}/aops/diana.ini %attr(0644,root,root) %{_sysconfdir}/aops/diana.ini
%attr(0644,root,root) %{_sysconfdir}/aops/diana_hosts.json %attr(0644,root,root) %{_sysconfdir}/aops/diana_hosts.json
%attr(0644,root,root) %{_sysconfdir}/aops/algorithm/ai_template1.json %attr(0644,root,root) %{_sysconfdir}/aops/algorithm/*.json
%attr(0644,root,root) %{_sysconfdir}/aops/algorithm/ai_template2.json
%attr(0644,root,root) %{_sysconfdir}/aops/algorithm/mysql_intelligent.json
%attr(0644,root,root) %{_sysconfdir}/aops/algorithm/lvs_network_error_tree.json
%attr(0644,root,root) %{_sysconfdir}/aops/algorithm/mysql_network_error_tree.json
%attr(0644,root,root) %{_sysconfdir}/aops/algorithm/tpcc_network_error_tree.json
%attr(0755,root,root) %{_bindir}/aops-diana %attr(0755,root,root) %{_bindir}/aops-diana
%attr(0755,root,root) /usr/lib/systemd/system/aops-diana.service %attr(0755,root,root) /usr/lib/systemd/system/aops-diana.service
%{python3_sitelib}/aops_diana*.egg-info %{python3_sitelib}/aops_diana*.egg-info
@ -50,6 +44,10 @@ An intelligent abnormal detection framework of aops
%changelog %changelog
* Mon Dec 5 2022 Lostway<luoshengwei@huawei.com> - v1.1.2-1
- Bugfix: return none when there's no abnormal
- Feature: add model config for each node
* Fri Dec 2 2022 zhuyuncheng<zhuyuncheng@huawei.com> - v1.1.1-2 * Fri Dec 2 2022 zhuyuncheng<zhuyuncheng@huawei.com> - v1.1.1-2
- Add patch to change model name length limit from 20 to 50 in mysql table - Add patch to change model name length limit from 20 to 50 in mysql table