!32 修复未匹配到热补丁时,返回日志与结果不否的问题

From: @rabbitali 
Reviewed-by: @Lostwayzxc 
Signed-off-by: @Lostwayzxc
This commit is contained in:
openeuler-ci-bot 2023-06-01 12:39:39 +00:00 committed by Gitee
commit 33130cbb80
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From a159ed3c419415e8822a6a2867654dbea01c49e4 Mon Sep 17 00:00:00 2001
From: rabbitali <shusheng.wen@outlook.com>
Date: Wed, 31 May 2023 15:40:03 +0800
Subject: [PATCH] modify the return result when no hot patch is matched
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ceres/manages/vulnerability_manage.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ceres/manages/vulnerability_manage.py b/ceres/manages/vulnerability_manage.py
index 5a475e4..4bb42db 100644
--- a/ceres/manages/vulnerability_manage.py
+++ b/ceres/manages/vulnerability_manage.py
@@ -350,7 +350,7 @@ class VulnerabilityManage:
if not hotpatch_list:
log = "No valid hot patch is matched."
- return NOT_PATCH, [dict(cve_id=cve["cve_id"], log=log, result="succeed") for cve in cves]
+ return NOT_PATCH, [dict(cve_id=cve["cve_id"], log=log, result="fail") for cve in cves]
cmd_execute_result = []
for base_pkg, hotpatch_cves in hotpatch_list.items():
--

View File

@ -1,10 +1,11 @@
Name: aops-ceres
Version: v1.2.1
Release: 1
Release: 2
Summary: An agent which needs to be adopted in client, it managers some plugins, such as gala-gopher(kpi collection), fluentd(log collection) and so on.
License: MulanPSL2
URL: https://gitee.com/openeuler/%{name}
Source0: %{name}-%{version}.tar.gz
Patch0001: 0001-modify-return-value-when-no-hotpatch-is-matched.patch
BuildRequires: python3-setuptools
@ -40,6 +41,9 @@ An agent which needs to be adopted in client, it managers some plugins, such as
%changelog
* Thu Jun 01 2023 wenxin<shusheng.wen@outlook.com> - v1.2.1-2
- modify the return result when no hot patch is matched
* Tue May 23 2023 wenixn<shusheng.wen@outlook.com> - v1.2.1-1
- the client supports hot patch cve rollback