From 0cffa9d0ca642b3ece3aeefc5150f0ad3d8c5f00 Mon Sep 17 00:00:00 2001 From: Duo Zhang Date: Sun, 23 Jun 2024 22:57:29 +0800 Subject: [PATCH] HBASE-28688 Correct the usage for blanks ignore options in yetus (#6026) Signed-off-by: Guanghao Zhang (cherry picked from commit d1015a68ed9f94d74668abd37edefd32f5e9305b) --- dev-support/Jenkinsfile | 3 +- dev-support/Jenkinsfile_GitHub | 3 +- dev-support/blanks-eol-ignore.txt | 24 ++++++++++++++++ dev-support/blanks-tabs-ignore.txt | 28 +++++++++++++++++++ dev-support/hbase_nightly_yetus.sh | 8 +++--- dev-support/jenkins_precommit_github_yetus.sh | 7 +++-- 6 files changed, 64 insertions(+), 9 deletions(-) create mode 100644 dev-support/blanks-eol-ignore.txt create mode 100644 dev-support/blanks-tabs-ignore.txt diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile index 80d1289c1eeb..467f10ad747a 100644 --- a/dev-support/Jenkinsfile +++ b/dev-support/Jenkinsfile @@ -43,7 +43,8 @@ pipeline { PERSONALITY_FILE = 'tools/personality.sh' // This section of the docs tells folks not to use the javadoc tag. older branches have our old version of the check for said tag. AUTHOR_IGNORE_LIST = 'src/main/asciidoc/_chapters/developer.adoc' - BLANKS_IGNORE_LIST = '.*/generated/.*' + BLANKS_EOL_IGNORE_FILE = 'dev-support/blanks-eol-ignore.txt' + BLANKS_TABS_IGNORE_FILE = 'dev-support/blanks-tabs-ignore.txt' // output from surefire; sadly the archive function in yetus only works on file names. ARCHIVE_PATTERN_LIST = 'TEST-*.xml,org.apache.h*.txt,*.dumpstream,*.dump' // These tests currently have known failures. Once they burn down to 0, remove from here so that new problems will cause a failure. diff --git a/dev-support/Jenkinsfile_GitHub b/dev-support/Jenkinsfile_GitHub index a2b953464c04..b9551196ee12 100644 --- a/dev-support/Jenkinsfile_GitHub +++ b/dev-support/Jenkinsfile_GitHub @@ -41,7 +41,8 @@ pipeline { JDK_SPECIFIC_PLUGINS = 'compile,github,htmlout,javac,javadoc,maven,mvninstall,shadedjars,unit' // This section of the docs tells folks not to use the javadoc tag. older branches have our old version of the check for said tag. AUTHOR_IGNORE_LIST = 'src/main/asciidoc/_chapters/developer.adoc' - BLANKS_IGNORE_LIST = '.*/generated/.*' + BLANKS_EOL_IGNORE_FILE = 'dev-support/blanks-eol-ignore.txt' + BLANKS_TABS_IGNORE_FILE = 'dev-support/blanks-tabs-ignore.txt' // output from surefire; sadly the archive function in yetus only works on file names. ARCHIVE_PATTERN_LIST = 'TEST-*.xml,org.apache.h*.txt,*.dumpstream,*.dump' // These tests currently have known failures. Once they burn down to 0, remove from here so that new problems will cause a failure. diff --git a/dev-support/blanks-eol-ignore.txt b/dev-support/blanks-eol-ignore.txt new file mode 100644 index 000000000000..6912be308371 --- /dev/null +++ b/dev-support/blanks-eol-ignore.txt @@ -0,0 +1,24 @@ +## +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +## +.*/generated/.* +# we have generated code for other languages in hbase-examples +.*/gen-cpp/.* +.*/gen-perl/.* +.*/gen-php/.* +.*/gen-py/.* +.*/gen-rb/.* diff --git a/dev-support/blanks-tabs-ignore.txt b/dev-support/blanks-tabs-ignore.txt new file mode 100644 index 000000000000..49185487846e --- /dev/null +++ b/dev-support/blanks-tabs-ignore.txt @@ -0,0 +1,28 @@ +## +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +## +.*/generated/.* +# we have generated code for other languages in hbase-examples +.*/gen-cpp/.* +.*/gen-perl/.* +.*/gen-php/.* +.*/gen-py/.* +.*/gen-rb/.* +# we have tabs in asciidoc, not sure whether it is OK to replace them with spaces +src/main/asciidoc/.* +# perl officially suggests use tab instead of space for indentation +.*/*.pl diff --git a/dev-support/hbase_nightly_yetus.sh b/dev-support/hbase_nightly_yetus.sh index 3423a7e73c55..4cee1efde560 100755 --- a/dev-support/hbase_nightly_yetus.sh +++ b/dev-support/hbase_nightly_yetus.sh @@ -20,8 +20,8 @@ declare -i missing_env=0 # Validate params for required_env in "TESTS" "PERSONALITY_FILE" "BASEDIR" "ARCHIVE_PATTERN_LIST" "OUTPUT_DIR_RELATIVE" \ "OUTPUT_DIR" "PROJECT" "AUTHOR_IGNORE_LIST" \ - "BLANKS_IGNORE_LIST" "BRANCH_NAME" "TESTS_FILTER" "DEBUG" \ - "USE_YETUS_PRERELEASE" "WORKSPACE" "YETUS_RELEASE"; do + "BLANKS_EOL_IGNORE_FILE" "BLANKS_TABS_IGNORE_FILE" "BRANCH_NAME" "TESTS_FILTER" \ + "DEBUG" "USE_YETUS_PRERELEASE" "WORKSPACE" "YETUS_RELEASE"; do if [ -z "${!required_env}" ]; then echo "[ERROR] Required environment variable '${required_env}' is not set." missing_env=${missing_env}+1 @@ -59,8 +59,8 @@ YETUS_ARGS=("--patch-dir=${OUTPUT_DIR}" "${YETUS_ARGS[@]}") YETUS_ARGS=("--project=${PROJECT}" "${YETUS_ARGS[@]}") YETUS_ARGS=("--resetrepo" "${YETUS_ARGS[@]}") YETUS_ARGS=("--author-ignore-list=${AUTHOR_IGNORE_LIST}" "${YETUS_ARGS[@]}") -YETUS_ARGS=("--blanks-eol-ignore-list=${BLANKS_IGNORE_LIST}" "${YETUS_ARGS[@]}") -YETUS_ARGS=("--blanks-tabs-ignore-list=${BLANKS_IGNORE_LIST}" "${YETUS_ARGS[@]}") +YETUS_ARGS=("--blanks-eol-ignore-file=${BLANKS_EOL_IGNORE_FILE}" "${YETUS_ARGS[@]}") +YETUS_ARGS=("--blanks-tabs-ignore-file=${BLANKS_TABS_IGNORE_FILE}" "${YETUS_ARGS[@]}") YETUS_ARGS=("--sentinel" "${YETUS_ARGS[@]}") YETUS_ARGS=("--branch=${BRANCH_NAME}" "${YETUS_ARGS[@]}") YETUS_ARGS=("--tests-filter=${TESTS_FILTER}" "${YETUS_ARGS[@]}") diff --git a/dev-support/jenkins_precommit_github_yetus.sh b/dev-support/jenkins_precommit_github_yetus.sh index 95ddc0ed4aad..2d8421fd756d 100755 --- a/dev-support/jenkins_precommit_github_yetus.sh +++ b/dev-support/jenkins_precommit_github_yetus.sh @@ -42,7 +42,8 @@ declare -a required_envs=( "TESTS_FILTER" "YETUSDIR" "AUTHOR_IGNORE_LIST" - "BLANKS_IGNORE_LIST" + "BLANKS_EOL_IGNORE_FILE" + "BLANKS_TABS_IGNORE_FILE" ) # Validate params for required_env in "${required_envs[@]}"; do @@ -112,8 +113,8 @@ YETUS_ARGS+=("--dockerfile=${DOCKERFILE}") YETUS_ARGS+=("--mvn-custom-repos") YETUS_ARGS+=("--java-home=${SET_JAVA_HOME}") YETUS_ARGS+=("--author-ignore-list=${AUTHOR_IGNORE_LIST}") -YETUS_ARGS+=("--blanks-eol-ignore-list=${BLANKS_IGNORE_LIST}") -YETUS_ARGS+=("--blanks-tabs-ignore-list=${BLANKS_IGNORE_LIST}*") +YETUS_ARGS+=("--blanks-eol-ignore-file=${BLANKS_EOL_IGNORE_FILE}") +YETUS_ARGS+=("--blanks-tabs-ignore-file=${BLANKS_TABS_IGNORE_FILE}*") YETUS_ARGS+=("--tests-filter=${TESTS_FILTER}") YETUS_ARGS+=("--personality=${SOURCEDIR}/dev-support/hbase-personality.sh") YETUS_ARGS+=("--quick-hadoopcheck")