From f1e12fc833bde803ff134a69176dddd2157e768f Mon Sep 17 00:00:00 2001 From: x00482489 Date: Thu, 23 Jun 2022 14:57:12 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E9=80=82=E9=85=8Doecp=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8F=8D=E6=9F=A5=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/approve.sh | 2 ++ src/lib/main_process.sh | 2 +- src/utils/compare_package.py | 37 +++++++++++++++++++++++++++++++----- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/lib/approve.sh b/src/lib/approve.sh index fb49d9e..6026f42 100644 --- a/src/lib/approve.sh +++ b/src/lib/approve.sh @@ -30,6 +30,8 @@ function save_build_result() { remote_place_cmd=$( cat < Date: Thu, 30 Jun 2022 10:48:16 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E9=80=82=E9=85=8Doecp=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8F=8D=E6=9F=A5=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/main_process.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/main_process.sh b/src/lib/main_process.sh index 64c3b17..d690f97 100644 --- a/src/lib/main_process.sh +++ b/src/lib/main_process.sh @@ -252,7 +252,7 @@ function compare_package() { fi if [[ "$(ls -A $new_dir | grep '.rpm')" ]]; then - python3 ${JENKINS_HOME}/oecp/cli.py $old_dir $new_dir -o $result_dir -w $result_dir -n 2 -f json -s $tbranch --pull-request-id ${giteePullRequestIid} || echo "continue although run oecp failed" + python3 ${JENKINS_HOME}/oecp/cli.py $old_dir $new_dir -o $result_dir -w $result_dir -n 2 -f json -s $tbranch -p ${JENKINS_HOME}/oecp/oecp/conf/plan/symbol.json --pull-request-id ${giteePullRequestIid} || echo "continue although run oecp failed" fi pr_link='https://gitee.com/${repo_owner}/'${repo}'/pulls/'${prid} -- Gitee From 013c9a331b2c3a451b1a20a1ade2e8193c7bd6e6 Mon Sep 17 00:00:00 2001 From: x00482489 Date: Thu, 30 Jun 2022 15:30:38 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E9=80=82=E9=85=8Doecp=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8F=8D=E6=9F=A5=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/main_process.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/main_process.sh b/src/lib/main_process.sh index d690f97..13381da 100644 --- a/src/lib/main_process.sh +++ b/src/lib/main_process.sh @@ -252,7 +252,7 @@ function compare_package() { fi if [[ "$(ls -A $new_dir | grep '.rpm')" ]]; then - python3 ${JENKINS_HOME}/oecp/cli.py $old_dir $new_dir -o $result_dir -w $result_dir -n 2 -f json -s $tbranch -p ${JENKINS_HOME}/oecp/oecp/conf/plan/symbol.json --pull-request-id ${giteePullRequestIid} || echo "continue although run oecp failed" + python3 ${JENKINS_HOME}/oecp/cli.py $old_dir $new_dir -o $result_dir -w $result_dir -n 2 -f json -s $tbranch -p ${JENKINS_HOME}/oecp/oecp/conf/plan/symbol.json --pull-request-id ${prid} || echo "continue although run oecp failed" fi pr_link='https://gitee.com/${repo_owner}/'${repo}'/pulls/'${prid} -- Gitee From 8393d06adbdd07ca3c8d04c75e12ffad237be08a Mon Sep 17 00:00:00 2001 From: x00482489 Date: Fri, 1 Jul 2022 14:52:06 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E9=80=82=E9=85=8Doecp=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8F=8D=E6=9F=A5=E9=9C=80=E6=B1=82,=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=81=94=E8=B0=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/compare_package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/compare_package.py b/src/utils/compare_package.py index 5ddf33b..969c200 100644 --- a/src/utils/compare_package.py +++ b/src/utils/compare_package.py @@ -90,7 +90,8 @@ class ComparePackage(object): old_rpm_name = self._get_dict([rpm, "name", "old"], details) effect_rpm = self._get_dict([rpm, "rpm symbol", "total_effect_other_rpm"], details) diff_rpm_name.append(old_rpm_name) - effect_rpms.extend(effect_rpm) + if isinstance(effect_rpm, list): + effect_rpms.extend(effect_rpm) diff_rpm.append("\n".join(diff_rpm_name)) diff_rpm.append("\n".join(effect_rpms)) else: @@ -382,7 +383,8 @@ class ComparePackage(object): tb = pt.PrettyTable(hrules=True, min_width=self.MIN_COLUMN_WIDTH, max_table_width=self.MAX_TABLE_WIDTH) tb.field_names = ["rpm name", "effected_other_rpm"] for rpm in diff_details: - value = "\n".join(diff_details[rpm]["rpm symbol"]["total_effect_other_rpm"]) + details = self._get_dict([rpm, "rpm symbol", "total_effect_other_rpm"], diff_details) + value = "\n".join(details) if isinstance(details, list) else [] tb.add_row([rpm, value]) self.logger.info(" \n%s", tb) tb.clear() -- Gitee From 375dc1e340b7b629643980180397dfc78b4bb41c Mon Sep 17 00:00:00 2001 From: x00482489 Date: Fri, 1 Jul 2022 16:11:28 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E9=80=82=E9=85=8Doecp=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8F=8D=E6=9F=A5=E9=9C=80=E6=B1=82,=E9=9C=80=E6=94=B9?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E4=BC=A0=E5=85=A5=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/approve.sh | 4 +++- src/lib/main_process.sh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/approve.sh b/src/lib/approve.sh index 6026f42..00d738f 100644 --- a/src/lib/approve.sh +++ b/src/lib/approve.sh @@ -30,7 +30,9 @@ function save_build_result() { remote_place_cmd=$( cat < Date: Tue, 5 Jul 2022 16:30:39 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E7=94=A8oecp=E7=9A=84=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/approve.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/approve.sh b/src/lib/approve.sh index 00d738f..2400930 100644 --- a/src/lib/approve.sh +++ b/src/lib/approve.sh @@ -32,7 +32,7 @@ function save_build_result() { sed -i "s/dbhost=127.0.0.1/dbhost=${MysqldbHost}/g" ${JENKINS_HOME}/oecp/oecp/conf/oecp.conf sed -i "s/dbport=3306/dbport=${MysqldbPort}/g" ${JENKINS_HOME}/oecp/oecp/conf/oecp.conf - python3 ${JENKINS_HOME}/oecp/cli.py -s $tbranch --db-password ${MysqlUserPasswd:5} --pull-request-id ${giteePullRequestIid} --submit-symbol + python3 ${JENKINS_HOME}/oecp/cli.py -s ${giteeTargetBranch} --db-password ${MysqlUserPasswd:5} --pull-request-id ${giteePullRequestIid} --submit-symbol if [[ -d "$committer_pr_x86_64_dir" && ("\$(ls -A $committer_pr_x86_64_dir | grep '\.rpm$')" || "\$(ls -A $committer_pr_x86_64_dir | grep '\.json$')") ]]; then if [[ ! -d "$global_x86_64_dir/report" ]]; then -- Gitee From 2f97e11b3fdaa5192afb6adfe9e0e0ac9358bf78 Mon Sep 17 00:00:00 2001 From: x00482489 Date: Tue, 5 Jul 2022 16:43:38 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=95=B4oecp=E7=9A=84=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/approve.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/approve.sh b/src/lib/approve.sh index 2400930..4b7a08b 100644 --- a/src/lib/approve.sh +++ b/src/lib/approve.sh @@ -26,14 +26,14 @@ function save_build_result() { global_x86_64_dir="/repo/openeuler/src-openeuler${repo_server_test_tail}/${giteeTargetBranch}/0X080480000XC0000000/${giteeRepoName}/x86_64/" global_aarch64_dir="/repo/openeuler/src-openeuler${repo_server_test_tail}/${giteeTargetBranch}/0X080480000XC0000000/${giteeRepoName}/aarch64/" - log_info "***** Start to config remote shell *****" - remote_place_cmd=$( - cat < Date: Wed, 6 Jul 2022 14:58:49 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E8=A1=A5=E5=85=85oecp=E7=9A=84=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/compare_package.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/utils/compare_package.py b/src/utils/compare_package.py index 969c200..f4135e9 100644 --- a/src/utils/compare_package.py +++ b/src/utils/compare_package.py @@ -34,8 +34,8 @@ class ComparePackage(object): MIN_COLUMN_WIDTH = 16 MAX_TABLE_WIDTH = 150 - all_check_item = ["rpm abi", "rpm kabi", "drive kabi", "rpm jabi", "rpm config", - "rpm kconfig", "rpm provides", "rpm requires", "rpm files"] + all_check_item = ["rpm abi", "rpm kabi", "drive kabi", "rpm jabi", "rpm config", "rpm service", + "rpm kconfig", "rpm provides", "rpm requires", "rpm files", "rpm cmd", "rpm header", "rpm lib"] def __init__(self, logger): self.logger = logger @@ -380,11 +380,12 @@ class ComparePackage(object): return result_dict def _show_each_rpm_effect_other_rpm_details(self, diff_details): + title = "Table of Check rpm symbol Result" tb = pt.PrettyTable(hrules=True, min_width=self.MIN_COLUMN_WIDTH, max_table_width=self.MAX_TABLE_WIDTH) tb.field_names = ["rpm name", "effected_other_rpm"] for rpm in diff_details: details = self._get_dict([rpm, "rpm symbol", "total_effect_other_rpm"], diff_details) value = "\n".join(details) if isinstance(details, list) else [] - tb.add_row([rpm, value]) - self.logger.info(" \n%s", tb) + tb.add_row([rpm, value]) if value else tb.add_row([rpm, ""]) + self.logger.info(" %s\n%s", title, tb) tb.clear() -- Gitee From 59bdba2a8edf9394a2298fd1b72f1d399511bb8a Mon Sep 17 00:00:00 2001 From: x00482489 Date: Wed, 6 Jul 2022 15:43:48 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E4=BD=BF=E5=BE=97prid=E5=85=B7=E6=9C=89?= =?UTF-8?q?=E5=94=AF=E4=B8=80=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/approve.sh | 2 +- src/lib/main_process.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/approve.sh b/src/lib/approve.sh index 4b7a08b..f987e9e 100644 --- a/src/lib/approve.sh +++ b/src/lib/approve.sh @@ -28,7 +28,7 @@ function save_build_result() { sed -i "s/dbhost=127.0.0.1/dbhost=${MysqldbHost}/g" ${JENKINS_HOME}/oecp/oecp/conf/oecp.conf sed -i "s/dbport=3306/dbport=${MysqldbPort}/g" ${JENKINS_HOME}/oecp/oecp/conf/oecp.conf - python3 ${JENKINS_HOME}/oecp/cli.py -s ${giteeTargetBranch} --db-password ${MysqlUserPasswd:5} --pull-request-id ${giteePullRequestIid} --submit-symbol + python3 ${JENKINS_HOME}/oecp/cli.py -s ${giteeTargetBranch}-${arch} --db-password ${MysqlUserPasswd:5} --pull-request-id ${giteeRepoName}-${giteePullRequestIid} --submit-symbol log_info "***** Start to config remote shell *****" remote_place_cmd=$( diff --git a/src/lib/main_process.sh b/src/lib/main_process.sh index c8b6bff..c51cc3c 100644 --- a/src/lib/main_process.sh +++ b/src/lib/main_process.sh @@ -254,7 +254,7 @@ function compare_package() { if [[ "$(ls -A $new_dir | grep '.rpm')" ]]; then sed -i "s/dbhost=127.0.0.1/dbhost=${MysqldbHost}/g" ${JENKINS_HOME}/oecp/oecp/conf/oecp.conf sed -i "s/dbport=3306/dbport=${MysqldbPort}/g" ${JENKINS_HOME}/oecp/oecp/conf/oecp.conf - python3 ${JENKINS_HOME}/oecp/cli.py $old_dir $new_dir -o $result_dir -w $result_dir -n 2 -f json -s $tbranch -p ${JENKINS_HOME}/oecp/oecp/conf/plan/symbol.json --db-password ${MysqlUserPasswd:5} --pull-request-id ${prid} || echo "continue although run oecp failed" + python3 ${JENKINS_HOME}/oecp/cli.py $old_dir $new_dir -o $result_dir -w $result_dir -n 2 -f json -s $tbranch-${arch} -p ${JENKINS_HOME}/oecp/oecp/conf/plan/symbol.json --db-password ${MysqlUserPasswd:5} --pull-request-id ${repo}-${prid} || echo "continue although run oecp failed" fi pr_link='https://gitee.com/${repo_owner}/'${repo}'/pulls/'${prid} -- Gitee