From a1efc7d5f59ab7935adb96b7cfc571f3508546f1 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Fri, 19 Dec 2025 11:35:58 +0100 Subject: [PATCH 01/19] WIP Experiment with GH Actions for static checks --- .github/workflows/yetus-general-check.yml | 82 +++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/yetus-general-check.yml diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml new file mode 100644 index 000000000000..a344705603bc --- /dev/null +++ b/.github/workflows/yetus-general-check.yml @@ -0,0 +1,82 @@ +# 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: Yetus General Check + +on: + pull_request: + types: [opened, synchronize, reopened] + +permissions: + checks: write + contents: read + pull-requests: write + +jobs: + general-check: + runs-on: ubuntu-latest + timeout-minutes: 600 + + steps: + - name: Checkout HBase + uses: actions/checkout@v4 + with: + path: src + fetch-depth: 0 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Maven cache + uses: actions/cache@v4 + with: + path: ~/.m2 + key: hbase-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: | + hbase-m2- + + - name: Run Yetus Test Patch + uses: apache/yetus-test-patch-action@main + with: + basedir: ./src + patchdir: ./out + buildtool: maven + githubtoken: ${{ secrets.GITHUB_TOKEN }} + javahome: /usr/lib/jvm/temurin-17-jdk-amd64 + personality: ./src/dev-support/hbase-personality.sh + plugins: all,-javadoc,-jira,-shadedjars,-unit,-findbugs + testsfilter: checkstyle,javac,javadoc,pylint,shellcheck,shelldocs,blanks,perlcritic,ruby-lint,rubocop + blanks-eol-ignore-file: ./src/dev-support/blanks-eol-ignore.txt + blanks-tabs-ignore-file: ./src/dev-support/blanks-tabs-ignore.txt + author-ignore-list: ./src/dev-support/_chapters/developer.adoc + docker: true + dockermemlimit: 20g + proclimit: 30000 + buildjava: 17 + skip-errorprone: false + + - name: Publish Test Results + if: always() + uses: actions/upload-artifact@v4 + with: + name: yetus-general-check-output + path: ${{ github.workspace }}/out + retention-days: 7 From 8e66126afebb2b05b822da4917eac06707b717df Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Fri, 19 Dec 2025 12:13:45 +0100 Subject: [PATCH 02/19] pin to a feature branch for dev purposes --- .github/workflows/yetus-general-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index a344705603bc..5f851cccb2e6 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -19,6 +19,8 @@ name: Yetus General Check on: + push: + branches: [29787-gh-actions-static] pull_request: types: [opened, synchronize, reopened] From faa7b88386a2e47aa7545524056f5879ab316344 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Fri, 19 Dec 2025 12:34:42 +0100 Subject: [PATCH 03/19] maybe address yamllint issues --- .github/workflows/yetus-general-check.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index 5f851cccb2e6..d0b5a80d1d0a 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -18,7 +18,7 @@ --- name: Yetus General Check -on: +"on": push: branches: [29787-gh-actions-static] pull_request: @@ -65,7 +65,9 @@ jobs: javahome: /usr/lib/jvm/temurin-17-jdk-amd64 personality: ./src/dev-support/hbase-personality.sh plugins: all,-javadoc,-jira,-shadedjars,-unit,-findbugs - testsfilter: checkstyle,javac,javadoc,pylint,shellcheck,shelldocs,blanks,perlcritic,ruby-lint,rubocop + testsfilter: >- + checkstyle,javac,javadoc,pylint,shellcheck,shelldocs,blanks, + perlcritic,ruby-lint,rubocop blanks-eol-ignore-file: ./src/dev-support/blanks-eol-ignore.txt blanks-tabs-ignore-file: ./src/dev-support/blanks-tabs-ignore.txt author-ignore-list: ./src/dev-support/_chapters/developer.adoc From d9a977c8b66c13922a23befdfec0326d953e516c Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Fri, 19 Dec 2025 15:15:31 +0100 Subject: [PATCH 04/19] only on PRs for now --- .github/workflows/yetus-general-check.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index d0b5a80d1d0a..075494dd8a1b 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -19,8 +19,6 @@ name: Yetus General Check "on": - push: - branches: [29787-gh-actions-static] pull_request: types: [opened, synchronize, reopened] From 0f034f886071d04e2d02454fa3a6058cbb6fb8f5 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Fri, 19 Dec 2025 15:36:37 +0100 Subject: [PATCH 05/19] add missing statuses:write --- .github/workflows/yetus-general-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index 075494dd8a1b..a27d7f88af38 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -26,6 +26,7 @@ permissions: checks: write contents: read pull-requests: write + statuses: write jobs: general-check: From 64d5eeedf0f1e3aea768acc117ea54e008649cc4 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Fri, 19 Dec 2025 15:58:05 +0100 Subject: [PATCH 06/19] drop unsupported paramteres --- .github/workflows/yetus-general-check.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index a27d7f88af38..a9a9aaabcac6 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -62,19 +62,12 @@ jobs: buildtool: maven githubtoken: ${{ secrets.GITHUB_TOKEN }} javahome: /usr/lib/jvm/temurin-17-jdk-amd64 - personality: ./src/dev-support/hbase-personality.sh plugins: all,-javadoc,-jira,-shadedjars,-unit,-findbugs testsfilter: >- checkstyle,javac,javadoc,pylint,shellcheck,shelldocs,blanks, perlcritic,ruby-lint,rubocop - blanks-eol-ignore-file: ./src/dev-support/blanks-eol-ignore.txt - blanks-tabs-ignore-file: ./src/dev-support/blanks-tabs-ignore.txt - author-ignore-list: ./src/dev-support/_chapters/developer.adoc - docker: true - dockermemlimit: 20g - proclimit: 30000 - buildjava: 17 - skip-errorprone: false + blankseolignorefile: ./src/dev-support/blanks-eol-ignore.txt + blankstabsignorefile: ./src/dev-support/blanks-tabs-ignore.txt - name: Publish Test Results if: always() From 75e6c972f8cb006c91b03f2c71cda6733f3be655 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Fri, 19 Dec 2025 17:22:43 +0100 Subject: [PATCH 07/19] go "under the hood" to enable personality features --- .github/workflows/yetus-general-check.yml | 38 +++++++++++++++-------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index a9a9aaabcac6..cefd7c367c18 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -55,19 +55,31 @@ jobs: hbase-m2- - name: Run Yetus Test Patch - uses: apache/yetus-test-patch-action@main - with: - basedir: ./src - patchdir: ./out - buildtool: maven - githubtoken: ${{ secrets.GITHUB_TOKEN }} - javahome: /usr/lib/jvm/temurin-17-jdk-amd64 - plugins: all,-javadoc,-jira,-shadedjars,-unit,-findbugs - testsfilter: >- - checkstyle,javac,javadoc,pylint,shellcheck,shelldocs,blanks, - perlcritic,ruby-lint,rubocop - blankseolignorefile: ./src/dev-support/blanks-eol-ignore.txt - blankstabsignorefile: ./src/dev-support/blanks-tabs-ignore.txt + run: | + mkdir -p "${{ github.workspace }}/out" + docker run --rm \ + -v "${{ github.workspace }}/src:/src:ro" \ + -v "${{ github.workspace }}/out:/out" \ + -e GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" \ + ghcr.io/apache/yetus:main \ + test-patch \ + --basedir=/src \ + --patch-dir=/out \ + --build-tool=maven \ + --project=hbase \ + --personality=/src/dev-support/hbase-personality.sh \ + --github-token="${{ secrets.GITHUB_TOKEN }}" \ + --java-home=/usr/lib/jvm/temurin-17-jdk-amd64 \ + --plugins=all,-javadoc,-jira,-shadedjars,-unit,-findbugs \ + --tests-filter=checkstyle,javac,javadoc,pylint,shellcheck,shelldocs,blanks,perlcritic,ruby-lint,rubocop \ + --blanks-eol-ignore-file=/src/dev-support/blanks-eol-ignore.txt \ + --blanks-tabs-ignore-file=/src/dev-support/blanks-tabs-ignore.txt \ + --quick-hadoopcheck \ + --skip-dirs=dev-support \ + --brief-report-file=/out/brief.txt \ + --console-report-file=/out/console.txt \ + --html-report-file=/out/report.html \ + --junit-report-xml=/out/junit-report.xml - name: Publish Test Results if: always() From fa89335c57a37916cc1147e4da34192d47047dfe Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Fri, 19 Dec 2025 17:40:30 +0100 Subject: [PATCH 08/19] missing env maybe --- .github/workflows/yetus-general-check.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index cefd7c367c18..b0b5a16ccde3 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -60,20 +60,31 @@ jobs: docker run --rm \ -v "${{ github.workspace }}/src:/src:ro" \ -v "${{ github.workspace }}/out:/out" \ + -e GITHUB_ACTIONS=true \ + -e GITHUB_EVENT_NAME="${{ github.event_name }}" \ + -e GITHUB_BASE_REF="${{ github.base_ref }}" \ + -e GITHUB_HEAD_REF="${{ github.head_ref }}" \ + -e GITHUB_REF="${{ github.ref }}" \ + -e GITHUB_REPOSITORY="${{ github.repository }}" \ + -e GITHUB_RUN_NUMBER="${{ github.run_number }}" \ + -e GITHUB_RUN_ID="${{ github.run_id }}" \ + -e GITHUB_SHA="${{ github.sha }}" \ -e GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" \ + -e GITHUB_WORKSPACE=/github/workspace \ + -v "${{ github.workspace }}/src:/github/workspace/src:ro" \ ghcr.io/apache/yetus:main \ test-patch \ - --basedir=/src \ + --basedir=/github/workspace/src \ --patch-dir=/out \ --build-tool=maven \ --project=hbase \ - --personality=/src/dev-support/hbase-personality.sh \ + --personality=/github/workspace/src/dev-support/hbase-personality.sh \ --github-token="${{ secrets.GITHUB_TOKEN }}" \ --java-home=/usr/lib/jvm/temurin-17-jdk-amd64 \ --plugins=all,-javadoc,-jira,-shadedjars,-unit,-findbugs \ --tests-filter=checkstyle,javac,javadoc,pylint,shellcheck,shelldocs,blanks,perlcritic,ruby-lint,rubocop \ - --blanks-eol-ignore-file=/src/dev-support/blanks-eol-ignore.txt \ - --blanks-tabs-ignore-file=/src/dev-support/blanks-tabs-ignore.txt \ + --blanks-eol-ignore-file=/github/workspace/src/dev-support/blanks-eol-ignore.txt \ + --blanks-tabs-ignore-file=/github/workspace/src/dev-support/blanks-tabs-ignore.txt \ --quick-hadoopcheck \ --skip-dirs=dev-support \ --brief-report-file=/out/brief.txt \ From 69bb2b574f5504233d92306b3ea9c76dc1bfc137 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Fri, 19 Dec 2025 17:44:52 +0100 Subject: [PATCH 09/19] needs write access --- .github/workflows/yetus-general-check.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index b0b5a16ccde3..a2b0b75fc8c9 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -58,7 +58,7 @@ jobs: run: | mkdir -p "${{ github.workspace }}/out" docker run --rm \ - -v "${{ github.workspace }}/src:/src:ro" \ + -v "${{ github.workspace }}/src:/github/workspace/src" \ -v "${{ github.workspace }}/out:/out" \ -e GITHUB_ACTIONS=true \ -e GITHUB_EVENT_NAME="${{ github.event_name }}" \ @@ -71,7 +71,6 @@ jobs: -e GITHUB_SHA="${{ github.sha }}" \ -e GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" \ -e GITHUB_WORKSPACE=/github/workspace \ - -v "${{ github.workspace }}/src:/github/workspace/src:ro" \ ghcr.io/apache/yetus:main \ test-patch \ --basedir=/github/workspace/src \ From 84ff0e346f4dcb03c763c3d56ac231044fdc87e9 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Fri, 19 Dec 2025 18:28:27 +0100 Subject: [PATCH 10/19] fix yaml lints --- .github/workflows/yetus-general-check.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index a2b0b75fc8c9..b36cb345cacb 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -77,13 +77,17 @@ jobs: --patch-dir=/out \ --build-tool=maven \ --project=hbase \ - --personality=/github/workspace/src/dev-support/hbase-personality.sh \ + --personality=/github/workspace/src/dev-support\ +/hbase-personality.sh \ --github-token="${{ secrets.GITHUB_TOKEN }}" \ --java-home=/usr/lib/jvm/temurin-17-jdk-amd64 \ --plugins=all,-javadoc,-jira,-shadedjars,-unit,-findbugs \ - --tests-filter=checkstyle,javac,javadoc,pylint,shellcheck,shelldocs,blanks,perlcritic,ruby-lint,rubocop \ - --blanks-eol-ignore-file=/github/workspace/src/dev-support/blanks-eol-ignore.txt \ - --blanks-tabs-ignore-file=/github/workspace/src/dev-support/blanks-tabs-ignore.txt \ + --tests-filter=checkstyle,javac,javadoc,pylint,\ +shellcheck,shelldocs,blanks,perlcritic,ruby-lint,rubocop \ + --blanks-eol-ignore-file=/github/workspace/src\ +/dev-support/blanks-eol-ignore.txt \ + --blanks-tabs-ignore-file=/github/workspace/src\ +/dev-support/blanks-tabs-ignore.txt \ --quick-hadoopcheck \ --skip-dirs=dev-support \ --brief-report-file=/out/brief.txt \ From ff367b04b3c671627395342dac38e047c926aa27 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Fri, 19 Dec 2025 18:50:09 +0100 Subject: [PATCH 11/19] more yaml formatting --- .github/workflows/yetus-general-check.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index b36cb345cacb..4aed10b79b3d 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. +# yamllint disable rule:line-length --- name: Yetus General Check @@ -57,8 +58,9 @@ jobs: - name: Run Yetus Test Patch run: | mkdir -p "${{ github.workspace }}/out" + BASE=/github/workspace/src docker run --rm \ - -v "${{ github.workspace }}/src:/github/workspace/src" \ + -v "${{ github.workspace }}/src:${BASE}" \ -v "${{ github.workspace }}/out:/out" \ -e GITHUB_ACTIONS=true \ -e GITHUB_EVENT_NAME="${{ github.event_name }}" \ @@ -73,21 +75,17 @@ jobs: -e GITHUB_WORKSPACE=/github/workspace \ ghcr.io/apache/yetus:main \ test-patch \ - --basedir=/github/workspace/src \ + --basedir=${BASE} \ --patch-dir=/out \ --build-tool=maven \ --project=hbase \ - --personality=/github/workspace/src/dev-support\ -/hbase-personality.sh \ + --personality=${BASE}/dev-support/hbase-personality.sh \ --github-token="${{ secrets.GITHUB_TOKEN }}" \ --java-home=/usr/lib/jvm/temurin-17-jdk-amd64 \ --plugins=all,-javadoc,-jira,-shadedjars,-unit,-findbugs \ - --tests-filter=checkstyle,javac,javadoc,pylint,\ -shellcheck,shelldocs,blanks,perlcritic,ruby-lint,rubocop \ - --blanks-eol-ignore-file=/github/workspace/src\ -/dev-support/blanks-eol-ignore.txt \ - --blanks-tabs-ignore-file=/github/workspace/src\ -/dev-support/blanks-tabs-ignore.txt \ + --tests-filter=checkstyle,javac,javadoc,pylint,shellcheck,shelldocs,blanks,perlcritic,ruby-lint,rubocop \ + --blanks-eol-ignore-file=${BASE}/dev-support/blanks-eol-ignore.txt \ + --blanks-tabs-ignore-file=${BASE}/dev-support/blanks-tabs-ignore.txt \ --quick-hadoopcheck \ --skip-dirs=dev-support \ --brief-report-file=/out/brief.txt \ From b46d9bee466fdf8bfcd54aa39d2f5a467f86812a Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Mon, 22 Dec 2025 12:56:30 +0100 Subject: [PATCH 12/19] use yetus:0.15.0 --- .github/workflows/yetus-general-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index 4aed10b79b3d..de0ed1efb45e 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -73,7 +73,7 @@ jobs: -e GITHUB_SHA="${{ github.sha }}" \ -e GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" \ -e GITHUB_WORKSPACE=/github/workspace \ - ghcr.io/apache/yetus:main \ + ghcr.io/apache/yetus:0.15.0 \ test-patch \ --basedir=${BASE} \ --patch-dir=/out \ From 2cedeea7db31e783d5b6058d0f6970c5f328beb9 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Mon, 22 Dec 2025 13:27:25 +0100 Subject: [PATCH 13/19] do as the jenkinsfile does --- .github/workflows/yetus-general-check.yml | 69 +++++++++++------------ 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index de0ed1efb45e..41ffdf066af3 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -34,6 +34,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 600 + env: + YETUS_VERSION: '0.15.0' + steps: - name: Checkout HBase uses: actions/checkout@v4 @@ -55,43 +58,39 @@ jobs: restore-keys: | hbase-m2- + - name: Download Yetus + run: | + mkdir -p yetus + cd yetus + curl -L -O https://dlcdn.apache.org/yetus/${{ env.YETUS_VERSION }}/apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz + tar --strip-components=1 -xzf apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz + rm apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz + - name: Run Yetus Test Patch + env: + ARCHIVE_PATTERN_LIST: "TEST-*.xml,org.apache.h*.txt,*.dumpstream,*.dump" + BUILD_URL_ARTIFACTS: "artifact/${{ github.run_number }}/output" + DOCKERFILE: "${{ github.workspace }}/src/dev-support/docker/Dockerfile" + GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + GITHUB_USER: ${{ github.actor }} + PATCHDIR: "${{ github.workspace }}/output" + PLUGINS: "all,-javadoc,-jira,-shadedjars,-unit" + SET_JAVA_HOME: "/usr/lib/jvm/java-17" + SOURCEDIR: "${{ github.workspace }}/src" + TESTS_FILTER: "checkstyle,javac,javadoc,pylint,shellcheck,shelldocs,blanks,perlcritic,ruby-lint,rubocop" + YETUSDIR: "${{ github.workspace }}/yetus" + AUTHOR_IGNORE_LIST: "src/main/asciidoc/_chapters/developer.adoc" + BLANKS_EOL_IGNORE_FILE: "dev-support/blanks-eol-ignore.txt" + BLANKS_TABS_IGNORE_FILE: "dev-support/blanks-tabs-ignore.txt" + EXCLUDE_TESTS_URL: "https://ci-hbase.apache.org/job/HBase-Find-Flaky-Tests/job/${{ github.base_ref }}/lastSuccessfulBuild/artifact/output/excludes" + BUILD_THREAD: "4" + SUREFIRE_FIRST_PART_FORK_COUNT: "0.5C" + SUREFIRE_SECOND_PART_FORK_COUNT: "0.5C" + HADOOP_PROFILE: "3.0" + BRANCH_NAME: "${{ github.base_ref }}" run: | - mkdir -p "${{ github.workspace }}/out" - BASE=/github/workspace/src - docker run --rm \ - -v "${{ github.workspace }}/src:${BASE}" \ - -v "${{ github.workspace }}/out:/out" \ - -e GITHUB_ACTIONS=true \ - -e GITHUB_EVENT_NAME="${{ github.event_name }}" \ - -e GITHUB_BASE_REF="${{ github.base_ref }}" \ - -e GITHUB_HEAD_REF="${{ github.head_ref }}" \ - -e GITHUB_REF="${{ github.ref }}" \ - -e GITHUB_REPOSITORY="${{ github.repository }}" \ - -e GITHUB_RUN_NUMBER="${{ github.run_number }}" \ - -e GITHUB_RUN_ID="${{ github.run_id }}" \ - -e GITHUB_SHA="${{ github.sha }}" \ - -e GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" \ - -e GITHUB_WORKSPACE=/github/workspace \ - ghcr.io/apache/yetus:0.15.0 \ - test-patch \ - --basedir=${BASE} \ - --patch-dir=/out \ - --build-tool=maven \ - --project=hbase \ - --personality=${BASE}/dev-support/hbase-personality.sh \ - --github-token="${{ secrets.GITHUB_TOKEN }}" \ - --java-home=/usr/lib/jvm/temurin-17-jdk-amd64 \ - --plugins=all,-javadoc,-jira,-shadedjars,-unit,-findbugs \ - --tests-filter=checkstyle,javac,javadoc,pylint,shellcheck,shelldocs,blanks,perlcritic,ruby-lint,rubocop \ - --blanks-eol-ignore-file=${BASE}/dev-support/blanks-eol-ignore.txt \ - --blanks-tabs-ignore-file=${BASE}/dev-support/blanks-tabs-ignore.txt \ - --quick-hadoopcheck \ - --skip-dirs=dev-support \ - --brief-report-file=/out/brief.txt \ - --console-report-file=/out/console.txt \ - --html-report-file=/out/report.html \ - --junit-report-xml=/out/junit-report.xml + cd "${{ github.workspace }}" + bash src/dev-support/jenkins_precommit_github_yetus.sh - name: Publish Test Results if: always() From ea74e3af64d79fd06d3fd085acd9ff44fdcd1ee3 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Mon, 22 Dec 2025 13:35:27 +0100 Subject: [PATCH 14/19] use the same fetch script as jenkinsfile --- .github/workflows/yetus-general-check.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index 41ffdf066af3..3fcb01ec8e12 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -62,7 +62,11 @@ jobs: run: | mkdir -p yetus cd yetus - curl -L -O https://dlcdn.apache.org/yetus/${{ env.YETUS_VERSION }}/apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz + bash "${{ github.workspace }}/src/dev-support/jenkins-scripts/cache-apache-project-artifact.sh" \ + --keys 'https://downloads.apache.org/yetus/KEYS' \ + --verify-tar-gz \ + ./apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz \ + yetus/${{ env.YETUS_VERSION }}/apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz tar --strip-components=1 -xzf apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz rm apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz From 3fda2215c3e8aafc2f1b9b25637d87e0f19b1238 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Mon, 22 Dec 2025 13:48:32 +0100 Subject: [PATCH 15/19] introduce some breakages --- .../hbase/testclassification/ClientTests.java | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/ClientTests.java b/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/ClientTests.java index b0e259e1f9e2..ff98ebbc81fa 100644 --- a/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/ClientTests.java +++ b/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/ClientTests.java @@ -1,25 +1,9 @@ -/* - * 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. - */ package org.apache.hadoop.hbase.testclassification; /** * Tag a test as related to the client. This tests the hbase-client package and all of the client * tests in hbase-server. + * @author ndimiduk * @see org.apache.hadoop.hbase.testclassification.ClientTests * @see org.apache.hadoop.hbase.testclassification.CoprocessorTests * @see org.apache.hadoop.hbase.testclassification.FilterTests @@ -36,5 +20,5 @@ * @see org.apache.hadoop.hbase.testclassification.VerySlowMapReduceTests */ public interface ClientTests { - public static final String TAG = "org.apache.hadoop.hbase.testclassification.ClientTests"; + public static final String TAG = "org.apache.hadoop.hbase.testclassification.ClientTests"; } From a186c9131e148cc68a5897d1dcc993375e4103f3 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Mon, 22 Dec 2025 15:04:05 +0100 Subject: [PATCH 16/19] maybe fix output path for uploads --- .github/workflows/yetus-general-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index 3fcb01ec8e12..e6e889ffa636 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -101,5 +101,5 @@ jobs: uses: actions/upload-artifact@v4 with: name: yetus-general-check-output - path: ${{ github.workspace }}/out + path: ${{ github.workspace }}/output retention-days: 7 From 67b9a739d45f1042ab3790142d301bcca9777c2a Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Mon, 22 Dec 2025 16:21:40 +0100 Subject: [PATCH 17/19] GH won't let us deep-link to artifact results --- .github/workflows/yetus-general-check.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index e6e889ffa636..1b55334f8a10 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -73,7 +73,6 @@ jobs: - name: Run Yetus Test Patch env: ARCHIVE_PATTERN_LIST: "TEST-*.xml,org.apache.h*.txt,*.dumpstream,*.dump" - BUILD_URL_ARTIFACTS: "artifact/${{ github.run_number }}/output" DOCKERFILE: "${{ github.workspace }}/src/dev-support/docker/Dockerfile" GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} GITHUB_USER: ${{ github.actor }} From 15866473ca2bebe76695ebc81cce1c8b19394034 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Mon, 22 Dec 2025 16:25:18 +0100 Subject: [PATCH 18/19] Revert "GH won't let us deep-link to artifact results" This reverts commit 1475173c488b6f4d42e75012173e0e14af3821f8. This argument is required by the jenkins script --- .github/workflows/yetus-general-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index 1b55334f8a10..e6e889ffa636 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -73,6 +73,7 @@ jobs: - name: Run Yetus Test Patch env: ARCHIVE_PATTERN_LIST: "TEST-*.xml,org.apache.h*.txt,*.dumpstream,*.dump" + BUILD_URL_ARTIFACTS: "artifact/${{ github.run_number }}/output" DOCKERFILE: "${{ github.workspace }}/src/dev-support/docker/Dockerfile" GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} GITHUB_USER: ${{ github.actor }} From c43c61b80dc68ca7b19ea7e91d6eef8eba6f19ba Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Mon, 22 Dec 2025 17:14:53 +0100 Subject: [PATCH 19/19] BUILD_URL_ARTIFACTS only for actions --- .github/workflows/yetus-general-check.yml | 1 - dev-support/jenkins_precommit_github_yetus.sh | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/yetus-general-check.yml b/.github/workflows/yetus-general-check.yml index e6e889ffa636..1b55334f8a10 100644 --- a/.github/workflows/yetus-general-check.yml +++ b/.github/workflows/yetus-general-check.yml @@ -73,7 +73,6 @@ jobs: - name: Run Yetus Test Patch env: ARCHIVE_PATTERN_LIST: "TEST-*.xml,org.apache.h*.txt,*.dumpstream,*.dump" - BUILD_URL_ARTIFACTS: "artifact/${{ github.run_number }}/output" DOCKERFILE: "${{ github.workspace }}/src/dev-support/docker/Dockerfile" GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} GITHUB_USER: ${{ github.actor }} diff --git a/dev-support/jenkins_precommit_github_yetus.sh b/dev-support/jenkins_precommit_github_yetus.sh index 8604d96760dc..09a3e28f4959 100755 --- a/dev-support/jenkins_precommit_github_yetus.sh +++ b/dev-support/jenkins_precommit_github_yetus.sh @@ -31,7 +31,6 @@ declare -i missing_env=0 declare -a required_envs=( # these ENV variables define the required API with Jenkinsfile_GitHub "ARCHIVE_PATTERN_LIST" - "BUILD_URL_ARTIFACTS" "DOCKERFILE" "GITHUB_PASSWORD" "GITHUB_USER" @@ -53,6 +52,12 @@ for required_env in "${required_envs[@]}"; do fi done +# BUILD_URL_ARTIFACTS is required for Jenkins but optional for GitHub Actions +if [[ "${GITHUB_ACTIONS}" != "true" ]] && [[ -z "${BUILD_URL_ARTIFACTS}" ]]; then + echo "[ERROR] Required environment variable 'BUILD_URL_ARTIFACTS' is not set." + missing_env=${missing_env}+1 +fi + if [ ${missing_env} -gt 0 ]; then echo "[ERROR] Please set the required environment variables before invoking. If this error is " \ "on Jenkins, then please file a JIRA about the error." @@ -103,7 +108,9 @@ YETUS_ARGS+=("--spotbugs-strict-precheck") # rsync these files back into the archive dir YETUS_ARGS+=("--archive-list=${ARCHIVE_PATTERN_LIST}") # URL for user-side presentation in reports and such to our artifacts -YETUS_ARGS+=("--build-url-artifacts=${BUILD_URL_ARTIFACTS}") +if [[ -n "${BUILD_URL_ARTIFACTS}" ]]; then + YETUS_ARGS+=("--build-url-artifacts=${BUILD_URL_ARTIFACTS}") +fi # plugins to enable YETUS_ARGS+=("--plugins=${PLUGINS},-findbugs") # run in docker mode and specifically point to our