This is an automated email from the ASF dual-hosted git repository. erose pushed a commit to branch website-pr-test in repository https://gitbox.apache.org/repos/asf/ozone.git
commit 032a6b8b3bcd7285ba77c18eb5135fced98140ef Author: Ethan Rose <[email protected]> AuthorDate: Wed Oct 23 18:32:09 2024 -0400 Remove other workflows --- .github/workflows/build-ratis.yml | 137 ------ .github/workflows/ci-with-ratis.yml | 53 -- .github/workflows/ci.yml | 683 -------------------------- .github/workflows/close-pending.yaml | 32 -- .github/workflows/comments.yaml | 33 -- .github/workflows/intermittent-test-check.yml | 233 --------- .github/workflows/label-pr.yml | 29 -- .github/workflows/populate-cache.yml | 94 ---- .github/workflows/post-commit.yml | 27 - .github/workflows/pull-request.yml | 36 -- .github/workflows/repeat-acceptance.yml | 165 ------- 11 files changed, 1522 deletions(-) diff --git a/.github/workflows/build-ratis.yml b/.github/workflows/build-ratis.yml deleted file mode 100644 index 201a62e85f..0000000000 --- a/.github/workflows/build-ratis.yml +++ /dev/null @@ -1,137 +0,0 @@ -# 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. - -# This workflow can be called by other workflows to build Ratis. -# -# Inputs: -# - Ratis repo -# - the commit to build -# Outputs: -# - various version numbers that need to be provided to the Ozone build process. -# - Ratis repository is uploaded as an artifact named `ratis-jars` -# -# See `intermittent-test-check.yml` as an example use of this workflow. - -name: build-ratis -on: - workflow_call: - inputs: - repo: - description: Ratis repository - default: apache/ratis - required: true - type: string - ref: - description: Ratis ref (branch, tag or commit SHA) - default: master - required: true - type: string - outputs: - ratis-version: - description: "Ratis Version" - value: ${{ jobs.ratis.outputs.ratis-version }} - thirdparty-version: - description: "Ratis Third-Party Version" - value: ${{ jobs.ratis.outputs.thirdparty-version }} - grpc-version: - description: "gRPC Version" - value: ${{ jobs.ratis-thirdparty.outputs.grpc-version }} - netty-version: - description: "Netty Version" - value: ${{ jobs.ratis-thirdparty.outputs.netty-version }} - protobuf-version: - description: "Protobuf Version" - value: ${{ jobs.ratis-thirdparty.outputs.protobuf-version }} -env: - MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -jobs: - ratis: - runs-on: ubuntu-20.04 - timeout-minutes: 60 - outputs: - ratis-version: ${{ steps.versions.outputs.ratis }} - thirdparty-version: ${{ steps.versions.outputs.thirdparty }} - steps: - - name: Checkout project - uses: actions/checkout@v4 - with: - repository: ${{ inputs.repo }} - ref: ${{ inputs.ref }} - - name: Cache for maven dependencies - uses: actions/cache@v4 - with: - path: | - ~/.m2/repository - !~/.m2/repository/org/apache/ratis - key: ratis-dependencies-${{ hashFiles('**/pom.xml') }} - - name: Setup java - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 8 - - name: Get component versions - id: versions - run: | - thirdparty_version="$(mvn help:evaluate -N -q -DforceStdout -Dscan=false -Dexpression=ratis.thirdparty.version)" - echo "thirdparty=${thirdparty_version}" >> $GITHUB_OUTPUT - - ratis_sha=$(git rev-parse --short HEAD) - ratis_version="$(mvn help:evaluate -N -q -DforceStdout -Dscan=false -Dexpression=project.version | sed -e "s/-SNAPSHOT/-${ratis_sha}-SNAPSHOT/")" - echo "ratis=${ratis_version}" >> $GITHUB_OUTPUT - - name: Run a full build - run: | - mvn -B --no-transfer-progress -Dscan=false versions:set -DnewVersion=${{ steps.versions.outputs.ratis }} - dev-support/checks/build.sh - - name: Store Maven repo for tests - uses: actions/upload-artifact@v4 - with: - name: ratis-jars - path: | - ~/.m2/repository/org/apache/ratis - retention-days: 1 - ratis-thirdparty: - runs-on: ubuntu-20.04 - needs: - - ratis - timeout-minutes: 30 - outputs: - grpc-version: ${{ steps.versions.outputs.grpc }} - netty-version: ${{ steps.versions.outputs.netty }} - protobuf-version: ${{ steps.versions.outputs.protobuf }} - steps: - - name: Checkout project - uses: actions/checkout@v4 - with: - repository: apache/ratis-thirdparty - ref: ${{ needs.ratis.outputs.thirdparty-version }} - - name: Get component versions - id: versions - run: | - echo "grpc=$(mvn help:evaluate -N -q -DforceStdout -Dscan=false -Dexpression=shaded.grpc.version)" >> $GITHUB_OUTPUT - echo "netty=$(mvn help:evaluate -N -q -DforceStdout -Dscan=false -Dexpression=shaded.netty.version)" >> $GITHUB_OUTPUT - echo "protobuf=$(mvn help:evaluate -N -q -DforceStdout -Dscan=false -Dexpression=shaded.protobuf.version)" >> $GITHUB_OUTPUT - debug: - runs-on: ubuntu-20.04 - needs: - - ratis - - ratis-thirdparty - steps: - - name: Print versions - run: | - echo ${{ needs.ratis.outputs.ratis-version }} - echo ${{ needs.ratis.outputs.thirdparty-version }} - echo ${{ needs.ratis-thirdparty.outputs.grpc-version }} - echo ${{ needs.ratis-thirdparty.outputs.netty-version }} - echo ${{ needs.ratis-thirdparty.outputs.protobuf-version }} diff --git a/.github/workflows/ci-with-ratis.yml b/.github/workflows/ci-with-ratis.yml deleted file mode 100644 index 0c69b0e28c..0000000000 --- a/.github/workflows/ci-with-ratis.yml +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - -# This workflow tests Ozone with custom build of Ratis. -# -# Inputs: -# - Ozone commit to build -# - Ratis repo -# - Ratis commit to build - -name: ci-with-ratis -on: - workflow_dispatch: - inputs: - ref: - description: Ozone ref (branch, tag or commit SHA) - default: master - required: true - ratis-repo: - description: Ratis repository - default: 'apache/ratis' - required: true - ratis-ref: - description: Ratis ref (branch, tag or commit SHA) - default: 'master' - required: true -run-name: Test Ozone ${{ inputs.ref }} with Ratis ${{ inputs.ratis-repo }} @ ${{ inputs.ratis-ref }} -jobs: - ratis: - uses: ./.github/workflows/build-ratis.yml - with: - repo: ${{ github.event.inputs.ratis-repo || format('{0}/ratis', github.repository_owner) }} - ref: ${{ github.event.inputs.ratis-ref }} - ozone: - needs: - - ratis - uses: ./.github/workflows/ci.yml - secrets: inherit - with: - ratis_args: "-Dratis.version=${{ needs.ratis.outputs.ratis-version }} -Dratis.thirdparty.version=${{ needs.ratis.outputs.thirdparty-version }} -Dio.grpc.version=${{ needs.ratis.outputs.grpc-version }} -Dnetty.version=${{ needs.ratis.outputs.netty-version }} -Dgrpc.protobuf-compile.version=${{ needs.ratis.outputs.protobuf-version }}" - ref: ${{ github.event.inputs.ref }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index ace3a7e15b..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,683 +0,0 @@ -# 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. -name: full-ci -on: - workflow_call: - inputs: - ratis_args: - type: string - description: Version overrides from custom Ratis build - default: '' - required: false - ref: - type: string - description: Ozone ref (branch, tag or commit SHA) - default: '' - required: false -env: - FAIL_FAST: ${{ github.event_name == 'pull_request' }} - # Minimum required Java version for running Ozone is defined in pom.xml (javac.version). - TEST_JAVA_VERSION: 17 # JDK version used by CI build and tests; should match the JDK version in apache/ozone-runner image - MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 - OZONE_WITH_COVERAGE: ${{ github.event_name == 'push' }} -jobs: - build-info: - runs-on: ubuntu-20.04 - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - outputs: - acceptance-suites: ${{ steps.acceptance-suites.outputs.suites }} - needs-basic-check: ${{ steps.categorize-basic-checks.outputs.needs-basic-check }} - needs-native-check: ${{ steps.categorize-basic-checks.outputs.needs-native-check }} - basic-checks: ${{ steps.categorize-basic-checks.outputs.basic-checks }} - needs-build: ${{ steps.selective-checks.outputs.needs-build }} - needs-compile: ${{ steps.selective-checks.outputs.needs-compile }} - needs-compose-tests: ${{ steps.selective-checks.outputs.needs-compose-tests }} - needs-dependency-check: ${{ steps.selective-checks.outputs.needs-dependency-check }} - needs-integration-tests: ${{ steps.selective-checks.outputs.needs-integration-tests }} - needs-kubernetes-tests: ${{ steps.selective-checks.outputs.needs-kubernetes-tests }} - sha: ${{ steps.get-sha.outputs.sha }} - steps: - - name: "Checkout ${{ github.ref }} / ${{ github.sha }} (push)" - uses: actions/checkout@v4 - with: - persist-credentials: false - if: github.event_name == 'push' - - name: "Checkout ${{ github.sha }} with its parent (pull request)" - uses: actions/checkout@v4 - with: - ref: ${{ github.sha }} - fetch-depth: 2 - persist-credentials: false - if: github.event_name == 'pull_request' - - name: "Checkout ${{ inputs.ref }} given in workflow input (manual dispatch)" - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - persist-credentials: false - if: github.event_name == 'workflow_dispatch' - - name: Get SHA of ${{ inputs.ref || github.ref }} - id: get-sha - run: | - if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then - sha="$(git rev-parse --verify HEAD)" - else - sha="${GITHUB_SHA}" - fi - echo "sha=$sha" >> $GITHUB_OUTPUT - - name: Selective checks - id: selective-checks - env: - PR_LABELS: "${{ toJSON(github.event.pull_request.labels.*.name) }}" - PR_DRAFT: "${{ github.event.pull_request.draft }}" - run: | - if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then - # Run selective checks - dev-support/ci/selective_ci_checks.sh "${GITHUB_SHA}" - else - # Run all checks - dev-support/ci/selective_ci_checks.sh - fi - - name: Acceptance suites - id: acceptance-suites - run: dev-support/ci/acceptance_suites.sh - - name: Categorize Basic Checks - id: categorize-basic-checks - env: - ALL_BASIC_CHECKS: "${{ steps.selective-checks.outputs.basic-checks }}" - run: dev-support/ci/categorize_basic_checks.sh - build: - needs: - - build-info - runs-on: ubuntu-20.04 - timeout-minutes: 60 - if: needs.build-info.outputs.needs-build == 'true' - steps: - - name: Checkout project - uses: actions/checkout@v4 - with: - ref: ${{ needs.build-info.outputs.sha }} - - name: Cache for npm dependencies - uses: actions/cache@v4 - with: - path: | - ~/.pnpm-store - **/node_modules - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm- - - name: Cache for maven dependencies - uses: actions/cache/restore@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }} - restore-keys: | - maven-repo- - - name: Download Ratis repo - if: ${{ inputs.ratis_args != '' }} - uses: actions/download-artifact@v4 - with: - name: ratis-jars - path: | - ~/.m2/repository/org/apache/ratis - - name: Setup java ${{ env.TEST_JAVA_VERSION }} - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: ${{ env.TEST_JAVA_VERSION }} - - name: Run a full build - run: hadoop-ozone/dev-support/checks/build.sh -Pdist -Psrc -Dmaven.javadoc.skip=true ${{ inputs.ratis_args }} - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - - name: Store binaries for tests - uses: actions/upload-artifact@v4 - with: - name: ozone-bin - path: | - hadoop-ozone/dist/target/ozone-*.tar.gz - !hadoop-ozone/dist/target/ozone-*-src.tar.gz - retention-days: 1 - - name: Store source tarball for compilation - uses: actions/upload-artifact@v4 - if: needs.build-info.outputs.needs-compile == 'true' - with: - name: ozone-src - path: hadoop-ozone/dist/target/ozone-*-src.tar.gz - retention-days: 1 - - name: Store Maven repo for tests - uses: actions/upload-artifact@v4 - with: - name: ozone-repo - path: | - ~/.m2/repository/org/apache/ozone - retention-days: 1 - compile: - needs: - - build-info - - build - - basic - - dependency - - license - timeout-minutes: 45 - if: needs.build-info.outputs.needs-compile == 'true' - strategy: - matrix: - java: [ 11, 17, 21 ] - include: - - os: ubuntu-20.04 - - java: 8 - os: macos-13 - fail-fast: false - runs-on: ${{ matrix.os }} - steps: - - name: Download Ozone source tarball - uses: actions/download-artifact@v4 - with: - name: ozone-src - - name: Untar sources - run: | - tar --strip-components 1 -xzvf ozone*-src.tar.gz - - name: Workaround for HADOOP-19011 - run: | - git init - git config user.name 'Github Actions' - git config user.email '[email protected]' - git commit --allow-empty -a -m 'workaround for HADOOP-19011' - - name: Cache for maven dependencies - uses: actions/cache/restore@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }} - restore-keys: | - maven-repo- - - name: Download Ratis repo - if: ${{ inputs.ratis_args != '' }} - uses: actions/download-artifact@v4 - with: - name: ratis-jars - path: | - ~/.m2/repository/org/apache/ratis - - name: Setup java ${{ matrix.java }} - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - - name: Compile Ozone using Java ${{ matrix.java }} - run: hadoop-ozone/dev-support/checks/build.sh -Pdist -Dskip.npx -Dskip.installnpx -Dmaven.javadoc.failOnWarnings=${{ matrix.java != 8 }} -Djavac.version=${{ matrix.java }} ${{ inputs.ratis_args }} - env: - OZONE_WITH_COVERAGE: false - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - basic: - needs: - - build-info - runs-on: ubuntu-20.04 - timeout-minutes: 30 - if: needs.build-info.outputs.needs-basic-check == 'true' - strategy: - matrix: - check: ${{ fromJson(needs.build-info.outputs.basic-checks) }} - fail-fast: false - steps: - - name: Checkout project - uses: actions/checkout@v4 - with: - ref: ${{ needs.build-info.outputs.sha }} - if: matrix.check != 'bats' - - name: Checkout project with history - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ needs.build-info.outputs.sha }} - if: matrix.check == 'bats' - - name: Cache for maven dependencies - uses: actions/cache/restore@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }} - restore-keys: | - maven-repo- - if: ${{ !contains('author,bats,docs', matrix.check) }} - - name: Download Ratis repo - if: ${{ inputs.ratis_args != '' }} - uses: actions/download-artifact@v4 - with: - name: ratis-jars - path: | - ~/.m2/repository/org/apache/ratis - - name: Setup java 8 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 8 - - name: Execute tests - run: hadoop-ozone/dev-support/checks/${{ matrix.check }}.sh ${{ inputs.ratis_args }} - continue-on-error: true - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - - name: Summary of failures - run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ matrix.check }}/summary.txt - if: ${{ !cancelled() }} - - name: Archive build results - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: ${{ matrix.check }} - path: target/${{ matrix.check }} - continue-on-error: true - native: - needs: - - build-info - - basic - runs-on: ubuntu-20.04 - timeout-minutes: 150 - if: needs.build-info.outputs.needs-native-check == 'true' - steps: - - name: Checkout project - uses: actions/checkout@v4 - with: - ref: ${{ needs.build-info.outputs.sha }} - - name: Cache for maven dependencies - uses: actions/cache/restore@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }} - restore-keys: | - maven-repo- - - name: Download Ratis repo - if: ${{ inputs.ratis_args != '' }} - uses: actions/download-artifact@v4 - with: - name: ratis-jars - path: | - ~/.m2/repository/org/apache/ratis - - name: Setup java ${{ env.TEST_JAVA_VERSION }} - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: ${{ env.TEST_JAVA_VERSION }} - - name: Execute tests - run: hadoop-ozone/dev-support/checks/${{ github.job }}.sh ${{ inputs.ratis_args }} - continue-on-error: true - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - - name: Summary of failures - run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt - if: ${{ !cancelled() }} - - name: Archive build results - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} - with: - name: ${{ github.job }} - path: target/${{ github.job }} - continue-on-error: true - dependency: - needs: - - build-info - - build - runs-on: ubuntu-20.04 - timeout-minutes: 5 - if: needs.build-info.outputs.needs-dependency-check == 'true' - steps: - - name: Checkout project - uses: actions/checkout@v4 - with: - ref: ${{ needs.build-info.outputs.sha }} - - name: Download compiled Ozone binaries - uses: actions/download-artifact@v4 - with: - name: ozone-bin - - name: Untar binaries - run: | - mkdir dist - tar -C dist --strip-components 1 -xzf ozone*.tar.gz - - name: Execute tests - run: | - export OZONE_DIST_DIR=`pwd`/dist - ./hadoop-ozone/dev-support/checks/dependency.sh - - name: Archive build results - uses: actions/upload-artifact@v4 - if: always() - with: - name: dependency - path: target/dependency - continue-on-error: true - license: - needs: - - build-info - - build - runs-on: ubuntu-20.04 - timeout-minutes: 15 - if: needs.build-info.outputs.needs-dependency-check == 'true' - steps: - - name: Checkout project - uses: actions/checkout@v4 - with: - ref: ${{ needs.build-info.outputs.sha }} - - name: Cache for maven dependencies - uses: actions/cache/restore@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }} - restore-keys: | - maven-repo- - - name: Download Ozone repo - id: download-ozone-repo - uses: actions/download-artifact@v4 - with: - name: ozone-repo - path: | - ~/.m2/repository/org/apache/ozone - - name: Setup java ${{ env.TEST_JAVA_VERSION }} - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: ${{ env.TEST_JAVA_VERSION }} - - name: Execute tests - run: | - hadoop-ozone/dev-support/checks/${{ github.job }}.sh - continue-on-error: true - - name: Summary of failures - run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt - if: ${{ !cancelled() }} - - name: Archive build results - uses: actions/upload-artifact@v4 - if: always() - with: - name: ${{ github.job }} - path: target/${{ github.job }} - continue-on-error: true - repro: - needs: - - build-info - - build - runs-on: ubuntu-20.04 - timeout-minutes: 30 - steps: - - name: Checkout project - uses: actions/checkout@v4 - - name: Cache for maven dependencies - uses: actions/cache/restore@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }} - restore-keys: | - maven-repo- - - name: Download Ozone repo - id: download-ozone-repo - uses: actions/download-artifact@v4 - with: - name: ozone-repo - path: | - ~/.m2/repository/org/apache/ozone - - name: Download Ratis repo - if: ${{ inputs.ratis_args != '' }} - uses: actions/download-artifact@v4 - with: - name: ratis-jars - path: | - ~/.m2/repository/org/apache/ratis - - name: Setup java ${{ env.TEST_JAVA_VERSION }} - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: ${{ env.TEST_JAVA_VERSION }} - - name: Execute tests - run: | - hadoop-ozone/dev-support/checks/${{ github.job }}.sh -Pdist -Psrc -Dmaven.javadoc.skip=true ${{ inputs.ratis_args }} - continue-on-error: true - - name: Summary of failures - run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt - if: ${{ !cancelled() }} - - name: Install diffoscope - run: | - sudo apt update -q - sudo apt install -y diffoscope - if: ${{ failure() }} - - name: Check artifact differences - run: | - hadoop-ozone/dev-support/checks/_diffoscope.sh - if: ${{ failure() }} - - name: Archive build results - uses: actions/upload-artifact@v4 - if: always() - with: - name: ${{ github.job }} - path: target/${{ github.job }} - continue-on-error: true - acceptance: - needs: - - build-info - - build - - basic - - dependency - - license - runs-on: ubuntu-20.04 - timeout-minutes: 150 - if: needs.build-info.outputs.needs-compose-tests == 'true' - strategy: - matrix: - suite: ${{ fromJson(needs.build-info.outputs.acceptance-suites) }} - fail-fast: false - steps: - - name: Checkout project - uses: actions/checkout@v4 - with: - ref: ${{ needs.build-info.outputs.sha }} - - name: Download compiled Ozone binaries - uses: actions/download-artifact@v4 - with: - name: ozone-bin - - name: Untar binaries - run: | - mkdir -p hadoop-ozone/dist/target - tar xzvf ozone*.tar.gz -C hadoop-ozone/dist/target - rm ozone*.tar.gz - - name: Execute tests - run: | - pushd hadoop-ozone/dist/target/ozone-* - sudo mkdir .aws && sudo chmod 777 .aws && sudo chown 1000 .aws - popd - ./hadoop-ozone/dev-support/checks/acceptance.sh - env: - KEEP_IMAGE: false - OZONE_ACCEPTANCE_SUITE: ${{ matrix.suite }} - OZONE_VOLUME_OWNER: 1000 - continue-on-error: true - - name: Summary of failures - run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt - if: ${{ !cancelled() }} - - name: Archive build results - uses: actions/upload-artifact@v4 - if: always() - with: - name: acceptance-${{ matrix.suite }} - path: target/acceptance - continue-on-error: true - kubernetes: - needs: - - build-info - - build - - basic - - dependency - - license - runs-on: ubuntu-20.04 - timeout-minutes: 60 - if: needs.build-info.outputs.needs-kubernetes-tests == 'true' - steps: - - name: Checkout project - uses: actions/checkout@v4 - with: - ref: ${{ needs.build-info.outputs.sha }} - - name: Download compiled Ozone binaries - uses: actions/download-artifact@v4 - with: - name: ozone-bin - - name: Untar binaries - run: | - mkdir -p hadoop-ozone/dist/target - tar xzvf ozone*.tar.gz -C hadoop-ozone/dist/target - - name: Execute tests - run: | - pushd hadoop-ozone/dist/target/ozone-* - sudo mkdir .aws && sudo chmod 777 .aws && sudo chown 1000 .aws - popd - ./hadoop-ozone/dev-support/checks/kubernetes.sh - continue-on-error: true - - name: Summary of failures - run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt - if: ${{ !cancelled() }} - - name: Archive build results - uses: actions/upload-artifact@v4 - if: always() - with: - name: kubernetes - path: target/kubernetes - continue-on-error: true - integration: - needs: - - build-info - - basic - runs-on: ubuntu-20.04 - timeout-minutes: 150 - if: needs.build-info.outputs.needs-integration-tests == 'true' - strategy: - matrix: - profile: - - client - - container - - filesystem - - hdds - - om - - ozone - - recon - - shell - - snapshot - - flaky - fail-fast: false - steps: - - name: Checkout project - uses: actions/checkout@v4 - with: - ref: ${{ needs.build-info.outputs.sha }} - - name: Cache for maven dependencies - uses: actions/cache/restore@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }} - restore-keys: | - maven-repo- - - name: Download Ratis repo - if: ${{ inputs.ratis_args != '' }} - uses: actions/download-artifact@v4 - with: - name: ratis-jars - path: | - ~/.m2/repository/org/apache/ratis - - name: Setup java ${{ env.TEST_JAVA_VERSION }} - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: ${{ env.TEST_JAVA_VERSION }} - - name: Execute tests - continue-on-error: true - run: | - args="${{ inputs.ratis_args }}" - if [[ "${{ matrix.profile }}" == "flaky" ]]; then - args="$args -Dsurefire.rerunFailingTestsCount=5 -Dsurefire.fork.timeout=3600" - fi - - hadoop-ozone/dev-support/checks/integration.sh -P${{ matrix.profile }} ${args} - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - - name: Summary of failures - run: | - if [[ -s "target/${{ github.job }}/summary.md" ]]; then - cat target/${{ github.job }}/summary.md >> $GITHUB_STEP_SUMMARY - fi - hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt - if: ${{ !cancelled() }} - - name: Archive build results - uses: actions/upload-artifact@v4 - if: always() - with: - name: it-${{ matrix.profile }} - path: target/integration - continue-on-error: true - coverage: - runs-on: ubuntu-20.04 - timeout-minutes: 30 - if: github.event_name == 'push' - needs: - - build-info - - acceptance - - integration - - native - steps: - - name: Checkout project - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ needs.build-info.outputs.sha }} - - name: Cache for maven dependencies - uses: actions/cache/restore@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }} - restore-keys: | - maven-repo- - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - path: target/artifacts - - name: Untar binaries - run: | - mkdir -p hadoop-ozone/dist/target - tar xzvf target/artifacts/ozone-bin/ozone*.tar.gz -C hadoop-ozone/dist/target - - name: Setup java ${{ env.TEST_JAVA_VERSION }} - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: ${{ env.TEST_JAVA_VERSION }} - - name: Calculate combined coverage - run: ./hadoop-ozone/dev-support/checks/coverage.sh - - name: Upload coverage to Sonar - run: ./hadoop-ozone/dev-support/checks/sonar.sh - if: github.repository == 'apache/ozone' - env: - SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - - name: Archive build results - uses: actions/upload-artifact@v4 - with: - name: coverage - path: target/coverage - continue-on-error: true diff --git a/.github/workflows/close-pending.yaml b/.github/workflows/close-pending.yaml deleted file mode 100644 index ce18152407..0000000000 --- a/.github/workflows/close-pending.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# 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. -name: close-prs - -on: - schedule: - - cron: '0 0 * * *' - -jobs: - close-pending: - name: close-pending - runs-on: ubuntu-20.04 - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Execute close-pending script - if: github.repository == 'apache/ozone' - run: ./.github/close-pending.sh - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/comments.yaml b/.github/workflows/comments.yaml deleted file mode 100644 index 8f7d41c2bd..0000000000 --- a/.github/workflows/comments.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# 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. -name: comment-commands - -on: - issue_comment: - types: - - created - - edited - -jobs: - process-comment: - name: check-comment - runs-on: ubuntu-20.04 - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Execute process-comment script - run: ./.github/process-comment.sh - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/intermittent-test-check.yml b/.github/workflows/intermittent-test-check.yml deleted file mode 100644 index 5de5654ace..0000000000 --- a/.github/workflows/intermittent-test-check.yml +++ /dev/null @@ -1,233 +0,0 @@ -# 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. -name: flaky-test-check -on: - workflow_dispatch: - inputs: - ref: - description: Git Ref (Branch/Commit_ID/Tag) - default: master - required: true - test-class: - description: Test Class - default: NA - required: true - test-name: - description: Test Name - default: ALL - required: false - iterations: - description: Number of Iterations per split - default: 10 - required: true - splits: - description: Number of splits - default: 10 - required: true - fail-fast: - description: Stop after first failure - default: false - required: true - ratis-repo: - description: Ratis repository - default: '' - required: false - ratis-ref: - description: Ratis ref (branch, tag or commit SHA) - default: '' - required: false -env: - MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 - TEST_CLASS: ${{ github.event.inputs.test-class}} - TEST_METHOD: ${{ github.event.inputs.test-name }} - ITERATIONS: ${{ github.event.inputs.iterations }} - FAIL_FAST: ${{ github.event.inputs.fail-fast }} - RATIS_REPO: ${{ github.event.inputs.ratis-repo }} - RATIS_VERSION: ${{ github.event.inputs.ratis-ref }} -run-name: ${{ github.event_name == 'workflow_dispatch' && format('{0}#{1}[{2}]-{3}x{4}', inputs.test-class, inputs.test-name, inputs.ref, inputs.splits, inputs.iterations) || '' }} -jobs: - prepare-job: - runs-on: ubuntu-20.04 - outputs: - matrix: ${{steps.generate.outputs.matrix}} - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.ref }} - - id: generate - name: Generate test matrix - run: | - splits=() - for ((i = 1; i <= ${{ github.event.inputs.splits }}; i++)); do - splits+=("$i") - done - printf -v x "%s," "${splits[@]}" - split_matrix="[${x%,}]" - echo "matrix=$split_matrix" >> $GITHUB_OUTPUT - ratis: - uses: ./.github/workflows/build-ratis.yml - if: ${{ github.event.inputs.ratis-ref != '' }} - with: - repo: ${{ github.event.inputs.ratis-repo || format('{0}/ratis', github.repository_owner) }} - ref: ${{ github.event.inputs.ratis-ref }} - build: - if: ${{ always() }} - needs: - - prepare-job - - ratis - runs-on: ubuntu-20.04 - timeout-minutes: 60 - steps: - - name: Checkout project - uses: actions/checkout@v4 - - name: Cache for maven dependencies - uses: actions/cache/restore@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }} - restore-keys: | - maven-repo- - - name: Download Ratis repo - if: ${{ github.event.inputs.ratis-ref != '' }} - uses: actions/download-artifact@v4 - with: - name: ratis-jars - path: | - ~/.m2/repository/org/apache/ratis - - name: Setup java - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 8 - - name: Build (most) of Ozone - run: | - args="-Dskip.npx -Dskip.installnpx -DskipShade -Dmaven.javadoc.skip=true" - if [[ "${{ github.event.inputs.ratis-ref }}" != "" ]]; then - args="$args -Dratis.version=${{ needs.ratis.outputs.ratis-version }}" - args="$args -Dratis.thirdparty.version=${{ needs.ratis.outputs.thirdparty-version }}" - args="$args -Dio.grpc.version=${{ needs.ratis.outputs.grpc-version }}" - args="$args -Dnetty.version=${{ needs.ratis.outputs.netty-version }}" - args="$args -Dgrpc.protobuf-compile.version=${{ needs.ratis.outputs.protobuf-version }}" - fi - - hadoop-ozone/dev-support/checks/build.sh $args - - name: Store Maven repo for tests - uses: actions/upload-artifact@v4 - with: - name: ozone-repo - path: | - ~/.m2/repository/org/apache/ozone - retention-days: 1 - run-test: - if: ${{ always() }} - needs: - - prepare-job - - ratis - - build - name: Run-Split - runs-on: ubuntu-20.04 - strategy: - matrix: - split: ${{fromJson(needs.prepare-job.outputs.matrix)}} # Define splits - fail-fast: ${{ fromJson(github.event.inputs.fail-fast) }} - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.ref }} - - name: Cache for maven dependencies - uses: actions/cache/restore@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }} - restore-keys: | - maven-repo- - - name: Download Ratis repo - if: ${{ github.event.inputs.ratis-ref != '' }} - uses: actions/download-artifact@v4 - with: - name: ratis-jars - path: | - ~/.m2/repository/org/apache/ratis - - name: Download Ozone repo - id: download-ozone-repo - uses: actions/download-artifact@v4 - with: - name: ozone-repo - path: | - ~/.m2/repository/org/apache/ozone - continue-on-error: true - - name: Setup java - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 8 - - name: Execute tests - run: | - if [[ -e "${{ steps.download-ozone-repo.outputs.download-path }}" ]]; then - export OZONE_REPO_CACHED=true - fi - - args="-DexcludedGroups=native|slow|unhealthy" - if [[ "${{ github.event.inputs.ratis-ref }}" != "" ]]; then - args="$args -Dratis.version=${{ needs.ratis.outputs.ratis-version }}" - args="$args -Dratis.thirdparty.version=${{ needs.ratis.outputs.thirdparty-version }}" - args="$args -Dio.grpc.version=${{ needs.ratis.outputs.grpc-version }}" - args="$args -Dnetty.version=${{ needs.ratis.outputs.netty-version }}" - args="$args -Dgrpc.protobuf-compile.version=${{ needs.ratis.outputs.protobuf-version }}" - fi - - if [ "$TEST_METHOD" = "ALL" ]; then - echo "Running all tests from $TEST_CLASS" - set -x - hadoop-ozone/dev-support/checks/junit.sh $args -Dtest="$TEST_CLASS,Abstract*Test*\$*" - else - echo "Running test: $TEST_METHOD from $TEST_CLASS" - set -x - hadoop-ozone/dev-support/checks/junit.sh $args -Dtest="$TEST_CLASS#$TEST_METHOD,Abstract*Test*\$*" - fi - continue-on-error: true - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - - name: Summary of failures - run: hadoop-ozone/dev-support/checks/_summary.sh target/unit/summary.txt - if: ${{ !cancelled() }} - - name: Archive build results - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: result-${{ github.run_number }}-${{ github.run_id }}-split-${{ matrix.split }} - path: target/unit - count-failures: - if: ${{ failure() }} - needs: run-test - runs-on: ubuntu-20.04 - steps: - - name: Download build results - uses: actions/download-artifact@v4 - - name: Count failures - run: | - failures=$(find . -name 'summary.txt' | grep -v 'iteration' | xargs grep -v 'exit code: 0' | wc -l) - echo "Total failures: $failures" - if [[ $failures -gt 0 ]]; then - echo "" - echo "Failed runs:" - grep 'exit code: 1' */summary.txt | grep -o 'split.*teration [0-9]*' | sed -e 's/.summary.txt:/ /' -e 's/-/ /' | sort -g -k2 -k4 - echo "" - exit 1 - fi diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml deleted file mode 100644 index abc620b7ef..0000000000 --- a/.github/workflows/label-pr.yml +++ /dev/null @@ -1,29 +0,0 @@ -# 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. - -# This workflow reads its configuration from the .github/labeler.yml file. -name: pull-request-labeler -on: -- pull_request_target - -jobs: - labeler: - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v5 - diff --git a/.github/workflows/populate-cache.yml b/.github/workflows/populate-cache.yml deleted file mode 100644 index cc93390a5b..0000000000 --- a/.github/workflows/populate-cache.yml +++ /dev/null @@ -1,94 +0,0 @@ -# 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. - -# This workflow creates cache with Maven dependencies for Ozone build. - -name: populate-cache - -on: - push: - branches: - - master - - ozone-1.4 - paths: - - 'pom.xml' - - '**/pom.xml' - - '.github/workflows/populate-cache.yml' - schedule: - - cron: '20 3 * * *' - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-20.04 - steps: - - name: Checkout project - uses: actions/checkout@v4 - - - name: Restore cache for Maven dependencies - id: restore-cache - uses: actions/cache/restore@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }} - - - name: Setup Java - if: steps.restore-cache.outputs.cache-hit != 'true' - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 8 - - - name: Get NodeJS version - id: nodejs-version - if: steps.restore-cache.outputs.cache-hit != 'true' - run: echo "nodejs-version=$(mvn help:evaluate -Dexpression=nodejs.version -q -DforceStdout -Dscan=false)" >> $GITHUB_OUTPUT - - - name: Restore NodeJS tarballs - id: restore-nodejs - if: steps.restore-cache.outputs.cache-hit != 'true' - uses: actions/cache@v4 - with: - path: ~/.m2/repository/com/github/eirslett/node - key: nodejs-${{ steps.nodejs-version.outputs.nodejs-version }} - - - name: Download NodeJS - if: steps.restore-cache.outputs.cache-hit != 'true' && steps.restore-nodejs.outputs.cache-hit != 'true' - run: dev-support/ci/download-nodejs.sh - env: - NODEJS_VERSION: ${{ steps.nodejs-version.outputs.nodejs-version }} - - - name: Fetch dependencies - if: steps.restore-cache.outputs.cache-hit != 'true' - run: mvn --batch-mode --no-transfer-progress --show-version -Pgo-offline -Pdist clean verify - - - name: Delete Ozone jars from repo - if: steps.restore-cache.outputs.cache-hit != 'true' - run: rm -fr ~/.m2/repository/org/apache/ozone - - - name: List repo contents - if: always() - run: find ~/.m2/repository -type f | sort | xargs ls -lh - - - name: Save cache for Maven dependencies - if: steps.restore-cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/post-commit.yml b/.github/workflows/post-commit.yml deleted file mode 100644 index 91d9e1fcd9..0000000000 --- a/.github/workflows/post-commit.yml +++ /dev/null @@ -1,27 +0,0 @@ -# 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. -name: build-branch -on: - pull_request: - types: [opened, ready_for_review, synchronize] - push: -concurrency: - group: ci-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} -jobs: - CI: - if: github.event_name == 'pull_request' || !startsWith(github.ref_name, 'dependabot') - uses: ./.github/workflows/ci.yml - secrets: inherit diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml deleted file mode 100644 index 53ba44e0f2..0000000000 --- a/.github/workflows/pull-request.yml +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -name: pull request - -on: - pull_request: - types: - - reopened - - opened - - edited - - synchronize - -jobs: - title: - runs-on: ubuntu-20.04 - steps: - - name: Checkout project - uses: actions/checkout@v4 - - name: Check pull request title - env: - TITLE: ${{ github.event.pull_request.title }} - run: - dev-support/ci/pr_title_check.sh "${TITLE}" diff --git a/.github/workflows/repeat-acceptance.yml b/.github/workflows/repeat-acceptance.yml deleted file mode 100644 index 1c6fc3797e..0000000000 --- a/.github/workflows/repeat-acceptance.yml +++ /dev/null @@ -1,165 +0,0 @@ -# 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. - -# This workflow runs some acceptance test(s) multiple times concurrently. -# Specify the test by either: -# * "Test Suite", which should be ones of the existing suites from regular CI, -# e.g. "cert-rotation", or -# * "Test Filter", which is a regex pattern applied to filter test script's path -# (examples: "ozone-csi", "test-vault.sh", "ozone/test-ec.sh", "test-.*-rotation.sh") - -name: repeat-acceptance-test -on: - workflow_dispatch: - inputs: - ref: - description: Git Ref (Branch/Commit_ID/Tag) - default: master - required: true - test-suite: - description: Test Suite - required: false - test-filter: - description: Test Filter - required: false - splits: - description: Number of splits - default: 10 - required: true - fail-fast: - description: Stop after first failure - default: false - required: true -env: - MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 - OZONE_ACCEPTANCE_SUITE: ${{ github.event.inputs.test-suite}} - OZONE_TEST_SELECTOR: ${{ github.event.inputs.test-filter }} - FAIL_FAST: ${{ github.event.inputs.fail-fast }} - JAVA_VERSION: 8 -run-name: ${{ github.event_name == 'workflow_dispatch' && format('{0}[{1}]-{2}', inputs.test-suite || inputs.test-filter, inputs.ref, inputs.splits) || '' }} -jobs: - prepare-job: - runs-on: ubuntu-20.04 - outputs: - matrix: ${{steps.generate.outputs.matrix}} - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.ref }} - - name: Verify Test Filter - run: | - cd hadoop-ozone/dist/src/main/compose - source testlib.sh - find_tests - - id: generate - name: Generate test matrix - run: | - splits=() - for ((i = 1; i <= ${{ github.event.inputs.splits }}; i++)); do - splits+=("$i") - done - printf -v x "%s," "${splits[@]}" - split_matrix="[${x%,}]" - echo "matrix=$split_matrix" >> $GITHUB_OUTPUT - build: - needs: - - prepare-job - runs-on: ubuntu-20.04 - timeout-minutes: 60 - steps: - - name: Checkout project - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.ref }} - - name: Cache for npm dependencies - uses: actions/cache@v4 - with: - path: | - ~/.pnpm-store - **/node_modules - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm- - - name: Cache for maven dependencies - uses: actions/cache/restore@v4 - with: - path: | - ~/.m2/repository/*/*/* - !~/.m2/repository/org/apache/ozone - key: maven-repo-${{ hashFiles('**/pom.xml') }}-${{ env.JAVA_VERSION }} - restore-keys: | - maven-repo-${{ hashFiles('**/pom.xml') }} - maven-repo- - - name: Setup java - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: ${{ env.JAVA_VERSION }} - - name: Run a full build - run: hadoop-ozone/dev-support/checks/build.sh -Pdist -Psrc -Dmaven.javadoc.skip=true - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - - name: Store binaries for tests - uses: actions/upload-artifact@v4 - with: - name: ozone-bin - path: | - hadoop-ozone/dist/target/ozone-*.tar.gz - !hadoop-ozone/dist/target/ozone-*-src.tar.gz - retention-days: 1 - acceptance: - needs: - - prepare-job - - build - name: Run-Split - runs-on: ubuntu-20.04 - strategy: - matrix: - split: ${{ fromJson(needs.prepare-job.outputs.matrix) }} - fail-fast: ${{ fromJson(github.event.inputs.fail-fast) }} - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.ref }} - - name: Download compiled Ozone binaries - uses: actions/download-artifact@v4 - with: - name: ozone-bin - - name: Untar binaries - run: | - mkdir -p hadoop-ozone/dist/target - tar xzvf ozone*.tar.gz -C hadoop-ozone/dist/target - rm ozone*.tar.gz - sudo chmod -R a+rwX hadoop-ozone/dist/target - - name: Execute tests - run: | - pushd hadoop-ozone/dist/target/ozone-* - sudo mkdir .aws && sudo chmod 777 .aws && sudo chown 1000 .aws - popd - ./hadoop-ozone/dev-support/checks/acceptance.sh - env: - KEEP_IMAGE: false - OZONE_VOLUME_OWNER: 1000 - continue-on-error: true - - name: Summary of failures - run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt - if: ${{ !cancelled() }} - - name: Archive build results - uses: actions/upload-artifact@v4 - if: always() - with: - name: acceptance-${{ matrix.split }} - path: target/acceptance - continue-on-error: true --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
