From 557f7bfebc789ef9041258db4fc7379c1f1d360d Mon Sep 17 00:00:00 2001 From: Wilber Date: Fri, 6 Dec 2019 12:48:48 +0800 Subject: [PATCH] add CI check for OperatorBase (#21549) --- tools/check_api_approvals.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/check_api_approvals.sh b/tools/check_api_approvals.sh index 6a1be9b7e66..8c7518ed517 100644 --- a/tools/check_api_approvals.sh +++ b/tools/check_api_approvals.sh @@ -146,6 +146,12 @@ if [ "${NEW_OP_ADDED}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then fi fi +HAS_OPERATORBASE_FLAG=`git diff -U0 --diff-filter=A upstream/$BRANCH | grep -E "public[[:space:]]+.*OperatorBase" || true` +if [ "${HAS_OPERATORBASE_FLAG}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then + echo_line="In order to support dynamic graph, all ops are not recommedned to inherit OperatorBase. Please use OperatorWithKernel instead.\nYou must have one RD (phlrain (Recommend), luotao1, lanxianghit or XiaoguangHu01) approval for the inherit of OperatorBase.\nYou inherit the OperatorBase class. The corresponding lines are as follows:\n${HAS_OPERATORBASE_FLAG}" + check_approval 1 47554610 46782768 22561442 6836917 +fi + HAS_INPLACE_TESTS=`git diff -U0 upstream/$BRANCH |grep "+" |grep -E "inplace_atol[[:space:]]*=.*" || true` if [ "${HAS_INPLACE_TESTS}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then echo_line="The calculation results of setting inplace enabled and disabled must be equal, that is, it's not recommended to set inplace_atol.\n If you do need to use inplace_atol, you must have one RD (XiaoguangHu01, lanxianghit, phlrain, luotao1) approval for the usage of inplace_atol.\nThe corresponding lines are as follows:\n${HAS_INPLACE_TESTS}\n" -- GitLab