-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-29838 Run Hadoop Check as a GitHub Action #7651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| # 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. | ||
|
|
||
| # yamllint disable rule:line-length | ||
| --- | ||
| name: Yetus JDK17 Hadoop3 Compile Check | ||
|
|
||
| "on": | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| statuses: write | ||
|
|
||
| jobs: | ||
| jdk17-hadoop3-compile-check: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
|
|
||
| env: | ||
| YETUS_VERSION: '0.15.0' | ||
|
|
||
| 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: Download Yetus | ||
| run: | | ||
| mkdir -p yetus | ||
| cd yetus | ||
| 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 | ||
| - name: Run Yetus JDK17 Hadoop3 Compile Check | ||
| env: | ||
| ARCHIVE_PATTERN_LIST: "TEST-*.xml,org.apache.h*.txt,*.dumpstream,*.dump" | ||
| DOCKERFILE: "${{ github.workspace }}/src/dev-support/docker/Dockerfile" | ||
| GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
| GITHUB_USER: ${{ github.actor }} | ||
| PATCHDIR: "${{ github.workspace }}/yetus-jdk17-hadoop3-compile-check/output" | ||
| PLUGINS: "compile,github,htmlout,javac,javadoc,maven,mvninstall,shadedjars" | ||
| SET_JAVA_HOME: "/usr/lib/jvm/java-17" | ||
| SOURCEDIR: "${{ github.workspace }}/src" | ||
| TESTS_FILTER: "javac,javadoc" | ||
| 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" | ||
| BUILD_THREAD: "4" | ||
| BRANCH_NAME: "${{ github.base_ref }}" | ||
| SKIP_ERRORPRONE: 'true' | ||
| DEBUG: 'true' | ||
| run: | | ||
| cd "${{ github.workspace }}" | ||
| bash src/dev-support/jenkins_precommit_github_yetus.sh | ||
| - name: Publish Job Summary | ||
| if: always() | ||
| run: | | ||
| cd "${{ github.workspace }}" | ||
| python3 src/dev-support/yetus_console_to_md.py yetus-jdk17-hadoop3-compile-check/output/console.txt >> $GITHUB_STEP_SUMMARY | ||
| - name: Publish Results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: yetus-jdk17-hadoop3-compile-check-output | ||
| path: ${{ github.workspace }}/yetus-jdk17-hadoop3-compile-check/output | ||
| retention-days: 7 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| # 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. | ||
|
|
||
| # yamllint disable rule:line-length | ||
| --- | ||
| name: Yetus JDK17 Hadoop3 Unit Check | ||
|
|
||
| "on": | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| statuses: write | ||
|
|
||
| jobs: | ||
| jdk17-hadoop3-unit-check: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 360 | ||
|
|
||
| strategy: | ||
Apache9 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - name: "small" | ||
| test_profile: "runSmallTests" | ||
| - name: "medium" | ||
| test_profile: "runMediumTests" | ||
| # Large tests split alphabetically by class name (after "Test" prefix) | ||
| # Wave 1: Test[A-H]*, Wave 2: Test[I-R]*, Wave 3: Test[S-Z]* | ||
| - name: "large-wave-1" | ||
| test_profile: "runLargeTests-wave1" | ||
| - name: "large-wave-2" | ||
| test_profile: "runLargeTests-wave2" | ||
| - name: "large-wave-3" | ||
| test_profile: "runLargeTests-wave3" | ||
|
|
||
| name: ${{ matrix.name }} | ||
|
|
||
| env: | ||
| YETUS_VERSION: '0.15.0' | ||
|
|
||
| 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: Download Yetus | ||
| run: | | ||
| mkdir -p yetus | ||
| cd yetus | ||
| 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 | ||
|
|
||
| - name: Run Yetus JDK17 Hadoop3 Unit Check | ||
| env: | ||
| ARCHIVE_PATTERN_LIST: "TEST-*.xml,org.apache.h*.txt,*.dumpstream,*.dump" | ||
| DOCKERFILE: "${{ github.workspace }}/src/dev-support/docker/Dockerfile" | ||
| GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
| GITHUB_USER: ${{ github.actor }} | ||
| PATCHDIR: "${{ github.workspace }}/yetus-jdk17-hadoop3-unit-check/output" | ||
| PLUGINS: "github,htmlout,maven,unit" | ||
ndimiduk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| SET_JAVA_HOME: "/usr/lib/jvm/java-17" | ||
| SOURCEDIR: "${{ github.workspace }}/src" | ||
| TESTS_FILTER: "mvninstall" | ||
| 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: "1.0C" | ||
| SUREFIRE_SECOND_PART_FORK_COUNT: "0.5C" | ||
| BRANCH_NAME: "${{ github.base_ref }}" | ||
| SKIP_ERRORPRONE: 'true' | ||
| DEBUG: 'true' | ||
| TEST_PROFILE: ${{ matrix.test_profile }} | ||
| run: | | ||
| cd "${{ github.workspace }}" | ||
| bash src/dev-support/jenkins_precommit_github_yetus.sh | ||
|
|
||
| - name: Publish Job Summary | ||
| if: always() | ||
| run: | | ||
| cd "${{ github.workspace }}" | ||
| python3 src/dev-support/yetus_console_to_md.py yetus-jdk17-hadoop3-unit-check/output/console.txt >> $GITHUB_STEP_SUMMARY | ||
|
|
||
| - name: Publish Test Results | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think here we should also include a job summary, but do not like other checks, as there is only one unit plugin, showing the result of yetus does not provide more information. I think we should filter the junit console output, filter out the failed UTs and show them on the job summary page. If no failure, we just show something like 'no failure' or 'pass'.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I originally intended to add it later, but yeah, let me look into this.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can do it later, the current one is OK for now.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added it but it seems it's not working. I don't see any test reports on the Summary for the failed jobs...
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's revert the change in yetus_console_to_md.py, and just use it to convert the console.txt to job summary. We can file a new issue to introduce a new script which parses the result from patch-unit file directly, as there is only one check for unit check, we do not need to check the console.txt any more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I kept this change in and it is including the failed test in the summary. Maybe in a follow up we can change the behavior so that all tests are run, even if there are failures, and we report all of them. |
||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: yetus-jdk17-hadoop3-unit-check-${{ matrix.name }} | ||
| path: ${{ github.workspace }}/yetus-jdk17-hadoop3-unit-check/output | ||
| retention-days: 7 | ||
Uh oh!
There was an error while loading. Please reload this page.