-
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
base: master
Are you sure you want to change the base?
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" | ||
|
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. Do we need maven plugin here? We do not need mvninstall check?
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 dug into this earlier, and the answer seems to be no, the
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 mean can we remove maven plugin here? The console output for the unit check showed that we did run mvninstall check...
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 think we need the
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. OK, then could we add mvninstall in the TESTS_FILTER value to skip mvninstall check?
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 thought it didn't run at all because it's not included in the plugins list. In fact, because we don't use the plugin Looking.
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. Okay, i see that For the compile check, I'll keep For the general check, I'll drop |
||
| 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... |
||
| 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.