From 6b8031b8793714f73567f27676b8991a8d0d6946 Mon Sep 17 00:00:00 2001 From: muyuying1 Date: Fri, 22 Sep 2023 16:01:17 +0800 Subject: [PATCH 1/3] parent eed1d66eb2ff800356045571b2874a2e5699cf81 author muyuying1 1695369677 +0800 committer muyuying1 1695374263 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cve获取失败的情况调用majun --- .../javcra/application/majun/majun_start.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/release-assistant/javcra/application/majun/majun_start.py b/release-assistant/javcra/application/majun/majun_start.py index 3091db0..eef7497 100644 --- a/release-assistant/javcra/application/majun/majun_start.py +++ b/release-assistant/javcra/application/majun/majun_start.py @@ -45,6 +45,8 @@ class MaJunStart: The combined data """ new_cve_list = list() + if not cve_list: + return new_cve_list for cve in cve_list[:]: if "abi是否变化" in cve.keys(): cve.update({"abiChange": cve.pop("abi是否变化")}) @@ -138,8 +140,15 @@ class MaJunStart: resp = self.trigger_cve_archive(user_email) if not resp: raise ValueError("trigger cve-manege archive failure") - cve_list = self.get_cve_list(branch_name, obs_ak, obs_sk) + cve_list = [] + try: + cve_list = self.get_cve_list(branch_name, obs_ak, obs_sk) + except Exception as e: + logger.error("get cve list failed!") new_cves = self.cve_list_recombine(cve_list) + if not new_cves: + logger.info("new_cves is empty,send it to majun") + return send_content_majun(new_cves, majun_id, multip_start=True) if multi_content: obs_project = f"{branch_name.replace('-', ':')}:{multi_content}" all_multi_packages = ShellCmdApi.call_subprocess( -- Gitee From 5d89a87bab83382cd4f07563533a2456d1e7079e Mon Sep 17 00:00:00 2001 From: muyuying1 Date: Mon, 25 Sep 2023 10:24:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0ValueError=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=8D=95=E8=8E=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- release-assistant/javcra/application/majun/majun_start.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/release-assistant/javcra/application/majun/majun_start.py b/release-assistant/javcra/application/majun/majun_start.py index eef7497..382b3c0 100644 --- a/release-assistant/javcra/application/majun/majun_start.py +++ b/release-assistant/javcra/application/majun/majun_start.py @@ -145,7 +145,10 @@ class MaJunStart: cve_list = self.get_cve_list(branch_name, obs_ak, obs_sk) except Exception as e: logger.error("get cve list failed!") - new_cves = self.cve_list_recombine(cve_list) + try: + new_cves = self.cve_list_recombine(cve_list) + except ValueError as e: + logger.error("cve list recombine,detailed info:%s" % e) if not new_cves: logger.info("new_cves is empty,send it to majun") return send_content_majun(new_cves, majun_id, multip_start=True) -- Gitee From 46b1d804dbf00637e59babe3ac0eb1d8b13600ed Mon Sep 17 00:00:00 2001 From: muyuying1 Date: Mon, 25 Sep 2023 10:41:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0ValueError=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=8D=95=E8=8E=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- release-assistant/javcra/application/majun/majun_start.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/release-assistant/javcra/application/majun/majun_start.py b/release-assistant/javcra/application/majun/majun_start.py index 382b3c0..fee4516 100644 --- a/release-assistant/javcra/application/majun/majun_start.py +++ b/release-assistant/javcra/application/majun/majun_start.py @@ -143,12 +143,9 @@ class MaJunStart: cve_list = [] try: cve_list = self.get_cve_list(branch_name, obs_ak, obs_sk) - except Exception as e: - logger.error("get cve list failed!") - try: - new_cves = self.cve_list_recombine(cve_list) except ValueError as e: - logger.error("cve list recombine,detailed info:%s" % e) + logger.error("get cve list failed!") + new_cves = self.cve_list_recombine(cve_list) if not new_cves: logger.info("new_cves is empty,send it to majun") return send_content_majun(new_cves, majun_id, multip_start=True) -- Gitee