From ozone-commits-return-326-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Fri Dec 6 08:14:21 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 03B5F18065D for ; Fri, 6 Dec 2019 09:14:20 +0100 (CET) Received: (qmail 78034 invoked by uid 500); 6 Dec 2019 08:14:20 -0000 Mailing-List: contact ozone-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ozone-commits@hadoop.apache.org Delivered-To: mailing list ozone-commits@hadoop.apache.org Received: (qmail 78013 invoked by uid 99); 6 Dec 2019 08:14:20 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Dec 2019 08:14:20 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 226BA8D80B; Fri, 6 Dec 2019 08:14:20 +0000 (UTC) Date: Fri, 06 Dec 2019 08:14:20 +0000 To: "ozone-commits@hadoop.apache.org" Subject: [hadoop-ozone] 01/01: debug acceptance test timeout MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: elek@apache.org In-Reply-To: <157562005978.23069.3840471620762962301@gitbox.apache.org> References: <157562005978.23069.3840471620762962301@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: hadoop-ozone X-Git-Refname: refs/heads/debug-acceptance-timeout X-Git-Reftype: branch X-Git-Rev: 64caf25b7b2cc227dbd12b5a2ae0f0efe93ef7c7 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20191206081420.226BA8D80B@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. elek pushed a commit to branch debug-acceptance-timeout in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git commit 64caf25b7b2cc227dbd12b5a2ae0f0efe93ef7c7 Author: Márton Elek AuthorDate: Fri Dec 6 09:13:33 2019 +0100 debug acceptance test timeout --- .github/workflows/post-commit.yml | 90 +--------------------- .github/workflows/tmate.sh | 7 ++ hadoop-ozone/dev-support/checks/acceptance.sh | 2 +- .../dist/src/main/compose/ozonesecure/test.sh | 2 +- hadoop-ozone/dist/src/main/compose/testlib.sh | 7 +- 5 files changed, 17 insertions(+), 91 deletions(-) diff --git a/.github/workflows/post-commit.yml b/.github/workflows/post-commit.yml index 5097be4..16877de 100644 --- a/.github/workflows/post-commit.yml +++ b/.github/workflows/post-commit.yml @@ -16,103 +16,19 @@ name: build-branch on: - push jobs: - build: - name: compile - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@master - - uses: ./.github/buildenv - with: - args: ./hadoop-ozone/dev-support/checks/build.sh - rat: - name: rat - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@master - - uses: ./.github/buildenv - with: - args: ./hadoop-ozone/dev-support/checks/rat.sh - - uses: actions/upload-artifact@master - if: always() - with: - name: rat - path: target/rat - author: - name: author - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@master - - uses: ./.github/buildenv - with: - args: ./hadoop-ozone/dev-support/checks/author.sh - - uses: actions/upload-artifact@master - if: always() - with: - name: author - path: target/author - unit: - name: unit - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@master - - uses: ./.github/buildenv - with: - args: ./hadoop-ozone/dev-support/checks/unit.sh - - uses: ./.github/buildenv - if: github.repository == 'apache/hadoop-ozone' - with: - args: ./hadoop-ozone/dev-support/checks/sonar.sh - env: - SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/upload-artifact@master - if: always() - with: - name: unit - path: target/unit - checkstyle: - name: checkstyle - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@master - - uses: ./.github/buildenv - with: - args: ./hadoop-ozone/dev-support/checks/checkstyle.sh - - uses: actions/upload-artifact@master - if: always() - with: - name: checkstyle - path: target/checkstyle - findbugs: - name: findbugs - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@master - - uses: ./.github/buildenv - with: - args: ./hadoop-ozone/dev-support/checks/findbugs.sh - - uses: actions/upload-artifact@master - if: always() - with: - name: findbugs - path: target/findbugs acceptance: name: acceptance runs-on: ubuntu-18.04 - needs: - - build - - rat - - checkstyle - - unit - - findbugs + timeout-minutes: 90 steps: - uses: actions/checkout@master + - run: ./.github/workflows/tmate.sh - uses: ./.github/buildenv with: args: ./hadoop-ozone/dev-support/checks/build.sh - run: sudo pip install robotframework - run: sudo chown runner -R . - - run: cd ./hadoop-ozone/dist/target/ozone-*-SNAPSHOT/ && mkdir .aws && sudo chown 1000 .aws + - run: cd ./hadoop-ozone/dist/target/ozone-*-SNAPSHOT/ && mkdir .aws && sudo chown 1000 .aws - run: ./hadoop-ozone/dev-support/checks/acceptance.sh - uses: actions/upload-artifact@master if: always() diff --git a/.github/workflows/tmate.sh b/.github/workflows/tmate.sh new file mode 100755 index 0000000..c10a557 --- /dev/null +++ b/.github/workflows/tmate.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -ex +sudo apt-get -y install tmate +tmate -S /tmp/tmate.sock new-session -d +sleep 2 +tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}' +tmate -S /tmp/tmate.sock display -p '#{tmate_web}' diff --git a/hadoop-ozone/dev-support/checks/acceptance.sh b/hadoop-ozone/dev-support/checks/acceptance.sh index c3c1aa0..71481ca 100755 --- a/hadoop-ozone/dev-support/checks/acceptance.sh +++ b/hadoop-ozone/dev-support/checks/acceptance.sh @@ -15,7 +15,7 @@ # limitations under the License. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd "$DIR/../../.." || exit 1 - +set -x REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/acceptance"} mkdir -p "$REPORT_DIR" diff --git a/hadoop-ozone/dist/src/main/compose/ozonesecure/test.sh b/hadoop-ozone/dist/src/main/compose/ozonesecure/test.sh index f328463..a925f36 100755 --- a/hadoop-ozone/dist/src/main/compose/ozonesecure/test.sh +++ b/hadoop-ozone/dist/src/main/compose/ozonesecure/test.sh @@ -14,7 +14,7 @@ # 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. - +set -x COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" export COMPOSE_DIR diff --git a/hadoop-ozone/dist/src/main/compose/testlib.sh b/hadoop-ozone/dist/src/main/compose/testlib.sh index c1cae05..0b8371f 100755 --- a/hadoop-ozone/dist/src/main/compose/testlib.sh +++ b/hadoop-ozone/dist/src/main/compose/testlib.sh @@ -89,6 +89,7 @@ start_docker_env(){ ## @param Name of the container in the docker-compose file ## @param robot test file or directory relative to the smoketest dir execute_robot_test(){ + set -x CONTAINER="$1" shift 1 #Remove first argument which was the container name # shellcheck disable=SC2206 @@ -101,13 +102,15 @@ execute_robot_test(){ OUTPUT_NAME="$COMPOSE_ENV_NAME-$TEST_NAME-$CONTAINER" OUTPUT_PATH="$RESULT_DIR_INSIDE/robot-$OUTPUT_NAME.xml" docker-compose -f "$COMPOSE_FILE" exec -T "$CONTAINER" mkdir -p "$RESULT_DIR_INSIDE" + + docker-compose -f "$COMPOSE_FILE" exec -T -e SECURITY_ENABLED="${SECURITY_ENABLED}" "$CONTAINER" ln -f -s /dev/stdout /tmp/out.txt # shellcheck disable=SC2068 - docker-compose -f "$COMPOSE_FILE" exec -T -e SECURITY_ENABLED="${SECURITY_ENABLED}" "$CONTAINER" python -m robot ${ARGUMENTS[@]} --log NONE -N "$TEST_NAME" --report NONE "${OZONE_ROBOT_OPTS[@]}" --output "$OUTPUT_PATH" "$SMOKETEST_DIR_INSIDE/$TEST" + docker-compose -f "$COMPOSE_FILE" exec -T -e SECURITY_ENABLED="${SECURITY_ENABLED}" "$CONTAINER" python -m robot ${ARGUMENTS[@]} --log NONE -N "$TEST_NAME" --debugfile /tmp/out --report NONE "${OZONE_ROBOT_OPTS[@]}" --output "$OUTPUT_PATH" "$SMOKETEST_DIR_INSIDE/$TEST" FULL_CONTAINER_NAME=$(docker-compose -f "$COMPOSE_FILE" ps | grep "_${CONTAINER}_" | head -n 1 | awk '{print $1}') docker cp "$FULL_CONTAINER_NAME:$OUTPUT_PATH" "$RESULT_DIR/" set -e - + set +x } --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-commits-unsubscribe@hadoop.apache.org For additional commands, e-mail: ozone-commits-help@hadoop.apache.org