Skip to content

Commit

Permalink
Merge branch 'apache:master' into HDDS-11462
Browse files Browse the repository at this point in the history
  • Loading branch information
slfan1989 authored Oct 23, 2024
2 parents bf2b877 + 3f98df5 commit 7ba9075
Show file tree
Hide file tree
Showing 569 changed files with 13,947 additions and 4,477 deletions.
117 changes: 96 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ on:
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.repository == 'apache/ozone' && github.event_name == 'push' }}
OZONE_WITH_COVERAGE: ${{ github.event_name == 'push' }}
jobs:
build-info:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -102,10 +104,6 @@ jobs:
runs-on: ubuntu-20.04
timeout-minutes: 60
if: needs.build-info.outputs.needs-build == 'true'
strategy:
matrix:
java: [ 8 ]
fail-fast: false
steps:
- name: Checkout project
uses: actions/checkout@v4
Expand Down Expand Up @@ -136,11 +134,11 @@ jobs:
name: ratis-jars
path: |
~/.m2/repository/org/apache/ratis
- name: Setup java
- name: Setup java ${{ env.TEST_JAVA_VERSION }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
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:
Expand All @@ -155,6 +153,7 @@ jobs:
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
Expand All @@ -171,6 +170,8 @@ jobs:
- build-info
- build
- basic
- dependency
- license
timeout-minutes: 45
if: needs.build-info.outputs.needs-compile == 'true'
strategy:
Expand All @@ -179,7 +180,7 @@ jobs:
include:
- os: ubuntu-20.04
- java: 8
os: macos-12
os: macos-13
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -212,13 +213,13 @@ jobs:
name: ratis-jars
path: |
~/.m2/repository/org/apache/ratis
- name: Setup java
- 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 -Djavac.version=${{ matrix.java }} ${{ inputs.ratis_args }}
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 }}
Expand Down Expand Up @@ -261,7 +262,7 @@ jobs:
name: ratis-jars
path: |
~/.m2/repository/org/apache/ratis
- name: Setup java
- name: Setup java 8
uses: actions/setup-java@v4
with:
distribution: 'temurin'
Expand Down Expand Up @@ -309,11 +310,11 @@ jobs:
name: ratis-jars
path: |
~/.m2/repository/org/apache/ratis
- name: Setup java
- name: Setup java ${{ env.TEST_JAVA_VERSION }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8
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
Expand Down Expand Up @@ -388,6 +389,11 @@ jobs:
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
Expand All @@ -402,11 +408,73 @@ jobs:
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'
Expand Down Expand Up @@ -454,6 +522,8 @@ jobs:
- build-info
- build
- basic
- dependency
- license
runs-on: ubuntu-20.04
timeout-minutes: 60
if: needs.build-info.outputs.needs-kubernetes-tests == 'true'
Expand Down Expand Up @@ -529,11 +599,11 @@ jobs:
name: ratis-jars
path: |
~/.m2/repository/org/apache/ratis
- name: Setup java
- name: Setup java ${{ env.TEST_JAVA_VERSION }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
java-version: ${{ env.TEST_JAVA_VERSION }}
- name: Execute tests
continue-on-error: true
run: |
Expand All @@ -546,7 +616,11 @@ jobs:
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
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
Expand All @@ -558,7 +632,7 @@ jobs:
coverage:
runs-on: ubuntu-20.04
timeout-minutes: 30
if: github.repository == 'apache/ozone' && github.event_name == 'push'
if: github.event_name == 'push'
needs:
- build-info
- acceptance
Expand Down Expand Up @@ -587,15 +661,16 @@ jobs:
run: |
mkdir -p hadoop-ozone/dist/target
tar xzvf target/artifacts/ozone-bin/ozone*.tar.gz -C hadoop-ozone/dist/target
- name: Calculate combined coverage
run: ./hadoop-ozone/dev-support/checks/coverage.sh
- name: Setup java 17
- name: Setup java ${{ env.TEST_JAVA_VERSION }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
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 }}
Expand Down
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
<extension>
<groupId>com.gradle</groupId>
<artifactId>common-custom-user-data-maven-extension</artifactId>
<version>2.0</version>
<version>2.0.1</version>
</extension>
</extensions>
Loading

0 comments on commit 7ba9075

Please sign in to comment.