You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/07/02 21:57:14 UTC

[GitHub] [hbase-native-client] bharathv opened a new pull request #10: HBASE-24642: Apache Yetus test-patch integration.

bharathv opened a new pull request #10:
URL: https://github.com/apache/hbase-native-client/pull/10


   Adds the plumbing needed to run test-patch tooling from Yetus.
   
   Example:
   
   YETUS_ARGS=patch.diff bin/run_tests_with_yetus.sh (without docker)
   
   RUN_IN_DOCKER=true YETUS_ARGS='--dirty-workspace patch.diff' bin/run_tests_with_yetus.sh
   (with docker)
   
   Sample output (with a few failing tests).
   
   | Vote |          Subsystem |  Runtime   | Comment
   ============================================================================
   +---------------------------------------------------------------------------
   |      |                    |            | Prechecks
   +---------------------------------------------------------------------------
   +---------------------------------------------------------------------------
   |      |                    |            | master Compile Tests
   +---------------------------------------------------------------------------
   |  +1  |    CMakeLists.txt  |   2m  9s   | master passed
   |  +1  |           compile  |   0m 44s   | master passed
   +---------------------------------------------------------------------------
   |      |                    |            | Patch Compile Tests
   +---------------------------------------------------------------------------
   |  +1  |    CMakeLists.txt  |   2m  3s   | the patch passed
   |  +1  |           compile  |  13m 54s   | the patch passed
   +---------------------------------------------------------------------------
   |      |                    |            | Other Tests
   +---------------------------------------------------------------------------
   |  -1  |              unit  |   0m 34s   | root in the patch failed.
   |      |                    |  21m  1s   |
   
                 Reason | Tests
    Failed CTEST tests  |  async-batch-rpc-retrying-test
                        |  async-rpc-retrying-test
                        |  client-test
                        |  filter-test
                        |  location-cache-retry-test
                        |  location-cache-test
                        |  scanner-test
   
   Supports both docker and non-docker mode. Runs all the unit-tests
   as a part of the test-patch run.
   
   Follow on patches will add the necessary integration with Jenkins
   for pre-commit builds.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase-native-client] bharathv edited a comment on pull request #10: HBASE-24642: Apache Yetus test-patch integration.

Posted by GitBox <gi...@apache.org>.
bharathv edited a comment on pull request #10:
URL: https://github.com/apache/hbase-native-client/pull/10#issuecomment-654970367


   Anyone has some free cycles to take a look at this patch? It should be fairly straight forward with some basic understanding of Yetus. There are some minor quirks with cmake integration but I can add more context as needed. Thank you.
   
   @phrocker FYI. I'm not able to add you as a reviewer, so @ mentioning for heads up.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase-native-client] bharathv commented on pull request #10: HBASE-24642: Apache Yetus test-patch integration.

Posted by GitBox <gi...@apache.org>.
bharathv commented on pull request #10:
URL: https://github.com/apache/hbase-native-client/pull/10#issuecomment-654970367


   Anyone has some free cycles to take a look at this patch? It should be fairly straight forward with some basic understanding of Yetus. There are some minor quirks with cmake integration but I can add more context as needed. Thank you.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase-native-client] joshelser commented on a change in pull request #10: HBASE-24642: Apache Yetus test-patch and Jenkins integration.

Posted by GitBox <gi...@apache.org>.
joshelser commented on a change in pull request #10:
URL: https://github.com/apache/hbase-native-client/pull/10#discussion_r453731756



##########
File path: bin/hbase-native-client-personality.sh
##########
@@ -0,0 +1,168 @@
+#!/usr/bin/env bash
+# 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.
+
+# You'll need a local installation of
+# [Apache Yetus' precommit checker](http://yetus.apache.org/documentation/0.1.0/#yetus-precommit)
+# to use this personality.
+#
+# Download from: http://yetus.apache.org/downloads/ . You can either grab the source artifact and
+# build from it, or use the convenience binaries provided on that download page.
+#
+# To run against, e.g. HBASE-15074 you'd then do
+# ```bash
+# test-patch --personality=bin/hbase-native-client-personality.sh HBASE-15074
+# ```
+#
+# If you want to skip the ~1 hour it'll take to do all the hadoop API checks, use
+# ```bash
+# test-patch  --plugins=all,-hadoopcheck --personality=dev-support/hbase-personality.sh HBASE-15074
+# ````
+#
+# pass the `--sentinel` flag if you want to allow test-patch to destructively alter local working
+# directory / branch in order to have things match what the issue patch requests.
+
+# Plugins enabled.
+personality_plugins "compile,unit,cmake,asflicense,github,jira,ctest,htmlout"
+
+if ! declare -f "yetus_info" >/dev/null; then
+  function yetus_info
+  {
+    echo "[$(date) INFO]: $*" 1>&2
+  }
+fi
+
+# work around yetus overwriting JAVA_HOME from our docker image
+function docker_do_env_adds
+{
+  declare k
+  for k in "${DOCKER_EXTRAENVS[@]}"; do
+    if [[ "JAVA_HOME" == "${k}" ]]; then
+      if [ -n "${JAVA_HOME}" ]; then
+        DOCKER_EXTRAARGS+=("--env=JAVA_HOME=${JAVA_HOME}")
+      fi
+    else
+      DOCKER_EXTRAARGS+=("--env=${k}=${!k}")
+    fi
+  done
+  DOCKER_EXTRAARGS+=("-h=securecluster")
+}
+
+## @description  Globals specific to this personality
+## @audience     private
+## @stability    evolving
+function personality_globals
+{
+  # shellcheck disable=SC2034
+  SUDO_USER=root
+  # shellcheck disable=SC2034
+  BUILD_NATIVE=true
+  # shellcheck disable=SC2034
+  BUILDTOOL=cmake
+  # shellcheck disable=SC2034
+  # Passed to cmake command using a custom personality.
+  CMAKE_ARGS="-DDOWNLOAD_DEPENDENCIES=ON"
+  # shellcheck disable=SC2034
+  # Expected by Yetus for compiling non-jvm projects.
+  JVM_REQUIRED=false
+  #shellcheck disable=SC2034
+  PROJECT_NAME=hbase-native-client
+  #shellcheck disable=SC2034
+  PATCH_BRANCH_DEFAULT=master
+  #shellcheck disable=SC2034
+  JIRA_ISSUE_RE='^HBASE-[0-9]+$'
+  #shellcheck disable=SC2034
+  GITHUB_REPO="apache/hbase-native-client"
+  # Yetus 0.7.0 enforces limits. Default proclimit is 1000.
+  # Up it. See HBASE-19902 for how we arrived at this number.
+  #shellcheck disable=SC2034
+  PROCLIMIT=10000
+  # Override if you want to bump up the memlimit for docker.
+  # shellcheck disable=SC2034
+  DOCKERMEMLIMIT=4g
+}
+
+## @description  Queue up modules for this personality
+## @audience     private
+## @stability    evolving
+## @param        repostatus
+## @param        testtype
+function personality_modules
+{
+  local repostatus=$1
+  local testtype=$2
+  local args
+  yetus_info "Personality: ${repostatus} ${testtype}"
+  clear_personality_queue
+  if [[ "${testtype}" =~ CMakeLists.txt ]]; then
+    args=${CMAKE_ARGS}
+    yetus_debug "Appending CMake args ${args}"
+  fi
+  personality_enqueue_module . ${args}
+}
+## This is named so that yetus will check us right after running tests.

Review comment:
       Whack these comments?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase-native-client] bharathv commented on a change in pull request #10: HBASE-24642: Apache Yetus test-patch and Jenkins integration.

Posted by GitBox <gi...@apache.org>.
bharathv commented on a change in pull request #10:
URL: https://github.com/apache/hbase-native-client/pull/10#discussion_r453769913



##########
File path: bin/hbase-native-client-personality.sh
##########
@@ -0,0 +1,168 @@
+#!/usr/bin/env bash
+# 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.
+
+# You'll need a local installation of
+# [Apache Yetus' precommit checker](http://yetus.apache.org/documentation/0.1.0/#yetus-precommit)
+# to use this personality.
+#
+# Download from: http://yetus.apache.org/downloads/ . You can either grab the source artifact and
+# build from it, or use the convenience binaries provided on that download page.
+#
+# To run against, e.g. HBASE-15074 you'd then do
+# ```bash
+# test-patch --personality=bin/hbase-native-client-personality.sh HBASE-15074
+# ```
+#
+# If you want to skip the ~1 hour it'll take to do all the hadoop API checks, use
+# ```bash
+# test-patch  --plugins=all,-hadoopcheck --personality=dev-support/hbase-personality.sh HBASE-15074
+# ````
+#
+# pass the `--sentinel` flag if you want to allow test-patch to destructively alter local working
+# directory / branch in order to have things match what the issue patch requests.
+
+# Plugins enabled.
+personality_plugins "compile,unit,cmake,asflicense,github,jira,ctest,htmlout"
+
+if ! declare -f "yetus_info" >/dev/null; then
+  function yetus_info
+  {
+    echo "[$(date) INFO]: $*" 1>&2
+  }
+fi
+
+# work around yetus overwriting JAVA_HOME from our docker image
+function docker_do_env_adds
+{
+  declare k
+  for k in "${DOCKER_EXTRAENVS[@]}"; do
+    if [[ "JAVA_HOME" == "${k}" ]]; then
+      if [ -n "${JAVA_HOME}" ]; then
+        DOCKER_EXTRAARGS+=("--env=JAVA_HOME=${JAVA_HOME}")
+      fi
+    else
+      DOCKER_EXTRAARGS+=("--env=${k}=${!k}")
+    fi
+  done
+  DOCKER_EXTRAARGS+=("-h=securecluster")
+}
+
+## @description  Globals specific to this personality
+## @audience     private
+## @stability    evolving
+function personality_globals
+{
+  # shellcheck disable=SC2034
+  SUDO_USER=root
+  # shellcheck disable=SC2034
+  BUILD_NATIVE=true
+  # shellcheck disable=SC2034
+  BUILDTOOL=cmake
+  # shellcheck disable=SC2034
+  # Passed to cmake command using a custom personality.
+  CMAKE_ARGS="-DDOWNLOAD_DEPENDENCIES=ON"
+  # shellcheck disable=SC2034
+  # Expected by Yetus for compiling non-jvm projects.
+  JVM_REQUIRED=false
+  #shellcheck disable=SC2034
+  PROJECT_NAME=hbase-native-client
+  #shellcheck disable=SC2034
+  PATCH_BRANCH_DEFAULT=master
+  #shellcheck disable=SC2034
+  JIRA_ISSUE_RE='^HBASE-[0-9]+$'
+  #shellcheck disable=SC2034
+  GITHUB_REPO="apache/hbase-native-client"
+  # Yetus 0.7.0 enforces limits. Default proclimit is 1000.
+  # Up it. See HBASE-19902 for how we arrived at this number.
+  #shellcheck disable=SC2034
+  PROCLIMIT=10000
+  # Override if you want to bump up the memlimit for docker.
+  # shellcheck disable=SC2034
+  DOCKERMEMLIMIT=4g
+}
+
+## @description  Queue up modules for this personality
+## @audience     private
+## @stability    evolving
+## @param        repostatus
+## @param        testtype
+function personality_modules
+{
+  local repostatus=$1
+  local testtype=$2
+  local args
+  yetus_info "Personality: ${repostatus} ${testtype}"
+  clear_personality_queue
+  if [[ "${testtype}" =~ CMakeLists.txt ]]; then
+    args=${CMAKE_ARGS}
+    yetus_debug "Appending CMake args ${args}"
+  fi
+  personality_enqueue_module . ${args}
+}
+## This is named so that yetus will check us right after running tests.

Review comment:
       Done.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase-native-client] bharathv merged pull request #10: HBASE-24642: Apache Yetus test-patch and Jenkins integration.

Posted by GitBox <gi...@apache.org>.
bharathv merged pull request #10:
URL: https://github.com/apache/hbase-native-client/pull/10


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase-native-client] bharathv commented on pull request #10: HBASE-24642: Apache Yetus test-patch integration.

Posted by GitBox <gi...@apache.org>.
bharathv commented on pull request #10:
URL: https://github.com/apache/hbase-native-client/pull/10#issuecomment-653237927


   @ndimiduk / @busbey Mind taking a look at this one? You folks are probably the most knowledgeable about Yetus related stuff, so appreciate any inputs. To give you some context, @phrocker and I are working on reviving hbase-native-client by fixing the build system and a ton of bugs and as a part of that I'm trying to add a precommit job for testing changes. Effort is tracked in HBASE-24537 and related jiras but I'm happy to fill you in on any additional context that is required. Also if you are interested, please take a look at the recent commits in the repo.  Thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase-native-client] bharathv commented on pull request #10: HBASE-24642: Apache Yetus test-patch and Jenkins integration.

Posted by GitBox <gi...@apache.org>.
bharathv commented on pull request #10:
URL: https://github.com/apache/hbase-native-client/pull/10#issuecomment-656392463


   @phrocker No worries. How about we get this patch in before #6? That validates both the patches. Tests that the precommit is running well and also tests your patch in a clean environment.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase-native-client] phrocker commented on pull request #10: HBASE-24642: Apache Yetus test-patch and Jenkins integration.

Posted by GitBox <gi...@apache.org>.
phrocker commented on pull request #10:
URL: https://github.com/apache/hbase-native-client/pull/10#issuecomment-656340176


   @bharathv I will take a look. sorry for the delay. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org