From 3d08a5d113213deec31ff8deacffa8971748d131 Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 29 Jan 2024 07:57:13 +0000 Subject: [PATCH 1/8] fix,test=document_fix --- tools/check_file_diff_approvals.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/check_file_diff_approvals.sh b/tools/check_file_diff_approvals.sh index 941cebeea29680..439c9f87518dc9 100644 --- a/tools/check_file_diff_approvals.sh +++ b/tools/check_file_diff_approvals.sh @@ -270,6 +270,12 @@ if echo "$DIFF_OUTPUT" | grep -q 'diff --git a/paddle/phi/kernels/.*\.cc b/paddl fi fi +IF_USE_SUBPROCESS = `git diff -U5 upstream/$BRANCH -- '*.py' | grep -B5 --no-group-separator subprocess || true` +if [ "${IF_USE_SUBPROCESS}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then + echo_line="You must have one RD wanghuancoder approval for using subprocess, which may cause security problem.\n" + check_approval 1 wanghuancoder +fi + HAS_DEFINE_FLAG=`git diff -U0 upstream/$BRANCH |grep -o -m 1 "DEFINE_int32" |grep -o -m 1 "DEFINE_bool" | grep -o -m 1 "DEFINE_string" || true` if [ ${HAS_DEFINE_FLAG} ] && [ "${GIT_PR_ID}" != "" ]; then echo_line="You must have one RD lanxianghit approval for the usage (either add or delete) of DEFINE_int32/DEFINE_bool/DEFINE_string flag.\n" From d839c2192460598707441c93dd289c8270944d57 Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 29 Jan 2024 07:58:03 +0000 Subject: [PATCH 2/8] fix,test=document_fix --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 67774e58138b86..b50e51c1f7e106 100644 --- a/setup.py +++ b/setup.py @@ -300,7 +300,7 @@ def git_commit(): subprocess.Popen( cmd, stdout=subprocess.PIPE, - cwd=env_dict.get("PADDLE_SOURCE_DIR"), + cwd=env_dict.get("PADDLE_SOURCE_DIR1"), ) .communicate()[0] .strip() From 50a517d32e7a82268263e97ca0d823762fbe5cd4 Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 29 Jan 2024 08:09:29 +0000 Subject: [PATCH 3/8] fix --- tools/check_file_diff_approvals.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check_file_diff_approvals.sh b/tools/check_file_diff_approvals.sh index 439c9f87518dc9..c98b8c99daa6e8 100644 --- a/tools/check_file_diff_approvals.sh +++ b/tools/check_file_diff_approvals.sh @@ -273,7 +273,7 @@ fi IF_USE_SUBPROCESS = `git diff -U5 upstream/$BRANCH -- '*.py' | grep -B5 --no-group-separator subprocess || true` if [ "${IF_USE_SUBPROCESS}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then echo_line="You must have one RD wanghuancoder approval for using subprocess, which may cause security problem.\n" - check_approval 1 wanghuancoder + check_approval 1 wanghuancoder risemeup1 fi HAS_DEFINE_FLAG=`git diff -U0 upstream/$BRANCH |grep -o -m 1 "DEFINE_int32" |grep -o -m 1 "DEFINE_bool" | grep -o -m 1 "DEFINE_string" || true` From 217294b3d86f4fea959b8669d219c3ede2aa17bc Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 29 Jan 2024 08:36:41 +0000 Subject: [PATCH 4/8] fix,test=document_fix --- tools/check_file_diff_approvals.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/check_file_diff_approvals.sh b/tools/check_file_diff_approvals.sh index c98b8c99daa6e8..07d707c9f6ca7c 100644 --- a/tools/check_file_diff_approvals.sh +++ b/tools/check_file_diff_approvals.sh @@ -270,10 +270,10 @@ if echo "$DIFF_OUTPUT" | grep -q 'diff --git a/paddle/phi/kernels/.*\.cc b/paddl fi fi -IF_USE_SUBPROCESS = `git diff -U5 upstream/$BRANCH -- '*.py' | grep -B5 --no-group-separator subprocess || true` +IF_USE_SUBPROCESS = `git diff -U5 upstream/$BRANCH -- '*.py' | grep -B5 --no-group-separator "subprocess" || true` if [ "${IF_USE_SUBPROCESS}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then echo_line="You must have one RD wanghuancoder approval for using subprocess, which may cause security problem.\n" - check_approval 1 wanghuancoder risemeup1 + check_approval 1 wanghuancoder fi HAS_DEFINE_FLAG=`git diff -U0 upstream/$BRANCH |grep -o -m 1 "DEFINE_int32" |grep -o -m 1 "DEFINE_bool" | grep -o -m 1 "DEFINE_string" || true` From eef26efee48dfe3825ee0f3289c68567d8a6f93e Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 29 Jan 2024 10:00:13 +0000 Subject: [PATCH 5/8] fix,test=document_fix --- tools/check_file_diff_approvals.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check_file_diff_approvals.sh b/tools/check_file_diff_approvals.sh index 07d707c9f6ca7c..bb1dc6c0bf7e6a 100644 --- a/tools/check_file_diff_approvals.sh +++ b/tools/check_file_diff_approvals.sh @@ -271,7 +271,7 @@ if echo "$DIFF_OUTPUT" | grep -q 'diff --git a/paddle/phi/kernels/.*\.cc b/paddl fi IF_USE_SUBPROCESS = `git diff -U5 upstream/$BRANCH -- '*.py' | grep -B5 --no-group-separator "subprocess" || true` -if [ "${IF_USE_SUBPROCESS}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then +if [ ${IF_USE_SUBPROCESS} ]; then echo_line="You must have one RD wanghuancoder approval for using subprocess, which may cause security problem.\n" check_approval 1 wanghuancoder fi From eb75110b7be6bdd5707d6f51b2e9b2d65b8c4c82 Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 29 Jan 2024 10:56:21 +0000 Subject: [PATCH 6/8] fix,test=document_fix --- tools/check_file_diff_approvals.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check_file_diff_approvals.sh b/tools/check_file_diff_approvals.sh index bb1dc6c0bf7e6a..14bae54af47e7f 100644 --- a/tools/check_file_diff_approvals.sh +++ b/tools/check_file_diff_approvals.sh @@ -270,7 +270,7 @@ if echo "$DIFF_OUTPUT" | grep -q 'diff --git a/paddle/phi/kernels/.*\.cc b/paddl fi fi -IF_USE_SUBPROCESS = `git diff -U5 upstream/$BRANCH -- '*.py' | grep -B5 --no-group-separator "subprocess" || true` +IF_USE_SUBPROCESS=`git diff -U5 upstream/$BRANCH -- '*.py' | grep -B5 --no-group-separator "subprocess" || true` if [ ${IF_USE_SUBPROCESS} ]; then echo_line="You must have one RD wanghuancoder approval for using subprocess, which may cause security problem.\n" check_approval 1 wanghuancoder From e953a77ca672c57cae232685d826a1a10cd9c2aa Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 29 Jan 2024 11:21:34 +0000 Subject: [PATCH 7/8] document_fix --- tools/check_file_diff_approvals.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check_file_diff_approvals.sh b/tools/check_file_diff_approvals.sh index 14bae54af47e7f..5305923e1083bc 100644 --- a/tools/check_file_diff_approvals.sh +++ b/tools/check_file_diff_approvals.sh @@ -271,7 +271,7 @@ if echo "$DIFF_OUTPUT" | grep -q 'diff --git a/paddle/phi/kernels/.*\.cc b/paddl fi IF_USE_SUBPROCESS=`git diff -U5 upstream/$BRANCH -- '*.py' | grep -B5 --no-group-separator "subprocess" || true` -if [ ${IF_USE_SUBPROCESS} ]; then +if [[ ${IF_USE_SUBPROCESS} ]]; then echo_line="You must have one RD wanghuancoder approval for using subprocess, which may cause security problem.\n" check_approval 1 wanghuancoder fi From 8e03839ddec124892550c3e3bf3c2198529cb236 Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 29 Jan 2024 11:29:02 +0000 Subject: [PATCH 8/8] fix,test=document_fix --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b50e51c1f7e106..67774e58138b86 100644 --- a/setup.py +++ b/setup.py @@ -300,7 +300,7 @@ def git_commit(): subprocess.Popen( cmd, stdout=subprocess.PIPE, - cwd=env_dict.get("PADDLE_SOURCE_DIR1"), + cwd=env_dict.get("PADDLE_SOURCE_DIR"), ) .communicate()[0] .strip()