Skip to content

Commit 038cea7

Browse files
authored
Merge branch 'master' into HDDS-11531
2 parents 57ea5fd + 51c6ed6 commit 038cea7

File tree

945 files changed

+26334
-8276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

945 files changed

+26334
-8276
lines changed

.github/workflows/ci.yml

Lines changed: 102 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ on:
2828
required: false
2929
env:
3030
FAIL_FAST: ${{ github.event_name == 'pull_request' }}
31-
BUILD_JAVA_VERSION: 8 # minimum version
32-
TEST_JAVA_VERSION: 17 # preferred version
31+
# Minimum required Java version for running Ozone is defined in pom.xml (javac.version).
32+
TEST_JAVA_VERSION: 17 # JDK version used by CI build and tests; should match the JDK version in apache/ozone-runner image
3333
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
34+
HADOOP_IMAGE: ghcr.io/apache/hadoop
35+
OZONE_IMAGE: ghcr.io/apache/ozone
36+
OZONE_RUNNER_IMAGE: ghcr.io/apache/ozone-runner
3437
OZONE_WITH_COVERAGE: ${{ github.event_name == 'push' }}
3538
jobs:
3639
build-info:
@@ -104,10 +107,6 @@ jobs:
104107
runs-on: ubuntu-20.04
105108
timeout-minutes: 60
106109
if: needs.build-info.outputs.needs-build == 'true'
107-
strategy:
108-
matrix:
109-
java: [ 8, 17 ]
110-
fail-fast: false
111110
steps:
112111
- name: Checkout project
113112
uses: actions/checkout@v4
@@ -138,33 +137,32 @@ jobs:
138137
name: ratis-jars
139138
path: |
140139
~/.m2/repository/org/apache/ratis
141-
- name: Setup java
140+
- name: Setup java ${{ env.TEST_JAVA_VERSION }}
142141
uses: actions/setup-java@v4
143142
with:
144143
distribution: 'temurin'
145-
java-version: ${{ matrix.java }}
144+
java-version: ${{ env.TEST_JAVA_VERSION }}
146145
- name: Run a full build
147146
run: hadoop-ozone/dev-support/checks/build.sh -Pdist -Psrc -Dmaven.javadoc.skip=true ${{ inputs.ratis_args }}
148147
env:
149148
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
150149
- name: Store binaries for tests
151150
uses: actions/upload-artifact@v4
152151
with:
153-
name: ozone-bin-${{ matrix.java }}
152+
name: ozone-bin
154153
path: |
155154
hadoop-ozone/dist/target/ozone-*.tar.gz
156155
!hadoop-ozone/dist/target/ozone-*-src.tar.gz
157156
retention-days: 1
158157
- name: Store source tarball for compilation
159158
uses: actions/upload-artifact@v4
160-
if: ${{ matrix.java == env.BUILD_JAVA_VERSION }}
159+
if: needs.build-info.outputs.needs-compile == 'true'
161160
with:
162161
name: ozone-src
163162
path: hadoop-ozone/dist/target/ozone-*-src.tar.gz
164163
retention-days: 1
165164
- name: Store Maven repo for tests
166165
uses: actions/upload-artifact@v4
167-
if: ${{ matrix.java == env.BUILD_JAVA_VERSION }}
168166
with:
169167
name: ozone-repo
170168
path: |
@@ -175,6 +173,8 @@ jobs:
175173
- build-info
176174
- build
177175
- basic
176+
- dependency
177+
- license
178178
timeout-minutes: 45
179179
if: needs.build-info.outputs.needs-compile == 'true'
180180
strategy:
@@ -183,7 +183,7 @@ jobs:
183183
include:
184184
- os: ubuntu-20.04
185185
- java: 8
186-
os: macos-12
186+
os: macos-13
187187
fail-fast: false
188188
runs-on: ${{ matrix.os }}
189189
steps:
@@ -216,13 +216,13 @@ jobs:
216216
name: ratis-jars
217217
path: |
218218
~/.m2/repository/org/apache/ratis
219-
- name: Setup java
219+
- name: Setup java ${{ matrix.java }}
220220
uses: actions/setup-java@v4
221221
with:
222222
distribution: 'temurin'
223223
java-version: ${{ matrix.java }}
224224
- name: Compile Ozone using Java ${{ matrix.java }}
225-
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 }}
225+
run: hadoop-ozone/dev-support/checks/build.sh -Pdist -DskipRecon -Dmaven.javadoc.failOnWarnings=${{ matrix.java != 8 }} -Djavac.version=${{ matrix.java }} ${{ inputs.ratis_args }}
226226
env:
227227
OZONE_WITH_COVERAGE: false
228228
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
@@ -265,19 +265,18 @@ jobs:
265265
name: ratis-jars
266266
path: |
267267
~/.m2/repository/org/apache/ratis
268-
- name: Setup java
268+
- name: Setup java 8
269269
uses: actions/setup-java@v4
270270
with:
271271
distribution: 'temurin'
272272
java-version: 8
273273
- name: Execute tests
274274
run: hadoop-ozone/dev-support/checks/${{ matrix.check }}.sh ${{ inputs.ratis_args }}
275-
continue-on-error: true
276275
env:
277276
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
278277
- name: Summary of failures
279278
run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ matrix.check }}/summary.txt
280-
if: ${{ !cancelled() }}
279+
if: ${{ failure() }}
281280
- name: Archive build results
282281
uses: actions/upload-artifact@v4
283282
if: ${{ !cancelled() }}
@@ -313,19 +312,18 @@ jobs:
313312
name: ratis-jars
314313
path: |
315314
~/.m2/repository/org/apache/ratis
316-
- name: Setup java
315+
- name: Setup java ${{ env.TEST_JAVA_VERSION }}
317316
uses: actions/setup-java@v4
318317
with:
319318
distribution: 'temurin'
320-
java-version: 8
319+
java-version: ${{ env.TEST_JAVA_VERSION }}
321320
- name: Execute tests
322321
run: hadoop-ozone/dev-support/checks/${{ github.job }}.sh ${{ inputs.ratis_args }}
323-
continue-on-error: true
324322
env:
325323
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
326324
- name: Summary of failures
327325
run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt
328-
if: ${{ !cancelled() }}
326+
if: ${{ failure() }}
329327
- name: Archive build results
330328
uses: actions/upload-artifact@v4
331329
if: ${{ !cancelled() }}
@@ -348,7 +346,7 @@ jobs:
348346
- name: Download compiled Ozone binaries
349347
uses: actions/download-artifact@v4
350348
with:
351-
name: ozone-bin-${{ env.BUILD_JAVA_VERSION }}
349+
name: ozone-bin
352350
- name: Untar binaries
353351
run: |
354352
mkdir dist
@@ -392,13 +390,76 @@ jobs:
392390
name: ozone-repo
393391
path: |
394392
~/.m2/repository/org/apache/ozone
393+
- name: Setup java ${{ env.TEST_JAVA_VERSION }}
394+
uses: actions/setup-java@v4
395+
with:
396+
distribution: 'temurin'
397+
java-version: ${{ env.TEST_JAVA_VERSION }}
395398
- name: Execute tests
396399
run: |
397400
hadoop-ozone/dev-support/checks/${{ github.job }}.sh
401+
- name: Summary of failures
402+
run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt
403+
if: ${{ failure() }}
404+
- name: Archive build results
405+
uses: actions/upload-artifact@v4
406+
if: always()
407+
with:
408+
name: ${{ github.job }}
409+
path: target/${{ github.job }}
398410
continue-on-error: true
411+
repro:
412+
needs:
413+
- build-info
414+
- build
415+
runs-on: ubuntu-20.04
416+
timeout-minutes: 30
417+
steps:
418+
- name: Checkout project
419+
uses: actions/checkout@v4
420+
- name: Cache for maven dependencies
421+
uses: actions/cache/restore@v4
422+
with:
423+
path: |
424+
~/.m2/repository/*/*/*
425+
!~/.m2/repository/org/apache/ozone
426+
key: maven-repo-${{ hashFiles('**/pom.xml') }}
427+
restore-keys: |
428+
maven-repo-
429+
- name: Download Ozone repo
430+
id: download-ozone-repo
431+
uses: actions/download-artifact@v4
432+
with:
433+
name: ozone-repo
434+
path: |
435+
~/.m2/repository/org/apache/ozone
436+
- name: Download Ratis repo
437+
if: ${{ inputs.ratis_args != '' }}
438+
uses: actions/download-artifact@v4
439+
with:
440+
name: ratis-jars
441+
path: |
442+
~/.m2/repository/org/apache/ratis
443+
- name: Setup java ${{ env.TEST_JAVA_VERSION }}
444+
uses: actions/setup-java@v4
445+
with:
446+
distribution: 'temurin'
447+
java-version: ${{ env.TEST_JAVA_VERSION }}
448+
- name: Execute tests
449+
run: |
450+
hadoop-ozone/dev-support/checks/${{ github.job }}.sh -Pdist -Psrc -Dmaven.javadoc.skip=true ${{ inputs.ratis_args }}
399451
- name: Summary of failures
400452
run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt
401-
if: ${{ !cancelled() }}
453+
if: ${{ failure() }}
454+
- name: Install diffoscope
455+
run: |
456+
sudo apt update -q
457+
sudo apt install -y diffoscope
458+
if: ${{ failure() }}
459+
- name: Check artifact differences
460+
run: |
461+
hadoop-ozone/dev-support/checks/_diffoscope.sh
462+
if: ${{ failure() }}
402463
- name: Archive build results
403464
uses: actions/upload-artifact@v4
404465
if: always()
@@ -411,6 +472,8 @@ jobs:
411472
- build-info
412473
- build
413474
- basic
475+
- dependency
476+
- license
414477
runs-on: ubuntu-20.04
415478
timeout-minutes: 150
416479
if: needs.build-info.outputs.needs-compose-tests == 'true'
@@ -425,14 +488,8 @@ jobs:
425488
ref: ${{ needs.build-info.outputs.sha }}
426489
- name: Download compiled Ozone binaries
427490
uses: actions/download-artifact@v4
428-
if: ${{ matrix.suite }} == 'MR' # until HDDS-11053 is fixed
429-
with:
430-
name: ozone-bin-${{ env.BUILD_JAVA_VERSION }}
431-
- name: Download compiled Ozone binaries
432-
uses: actions/download-artifact@v4
433-
if: ${{ matrix.suite }} != 'MR'
434491
with:
435-
name: ozone-bin-${{ env.TEST_JAVA_VERSION }}
492+
name: ozone-bin
436493
- name: Untar binaries
437494
run: |
438495
mkdir -p hadoop-ozone/dist/target
@@ -448,10 +505,9 @@ jobs:
448505
KEEP_IMAGE: false
449506
OZONE_ACCEPTANCE_SUITE: ${{ matrix.suite }}
450507
OZONE_VOLUME_OWNER: 1000
451-
continue-on-error: true
452508
- name: Summary of failures
453509
run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt
454-
if: ${{ !cancelled() }}
510+
if: ${{ failure() }}
455511
- name: Archive build results
456512
uses: actions/upload-artifact@v4
457513
if: always()
@@ -464,6 +520,8 @@ jobs:
464520
- build-info
465521
- build
466522
- basic
523+
- dependency
524+
- license
467525
runs-on: ubuntu-20.04
468526
timeout-minutes: 60
469527
if: needs.build-info.outputs.needs-kubernetes-tests == 'true'
@@ -475,7 +533,7 @@ jobs:
475533
- name: Download compiled Ozone binaries
476534
uses: actions/download-artifact@v4
477535
with:
478-
name: ozone-bin-${{ env.BUILD_JAVA_VERSION }}
536+
name: ozone-bin
479537
- name: Untar binaries
480538
run: |
481539
mkdir -p hadoop-ozone/dist/target
@@ -486,10 +544,9 @@ jobs:
486544
sudo mkdir .aws && sudo chmod 777 .aws && sudo chown 1000 .aws
487545
popd
488546
./hadoop-ozone/dev-support/checks/kubernetes.sh
489-
continue-on-error: true
490547
- name: Summary of failures
491548
run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt
492-
if: ${{ !cancelled() }}
549+
if: ${{ failure() }}
493550
- name: Archive build results
494551
uses: actions/upload-artifact@v4
495552
if: always()
@@ -545,19 +602,25 @@ jobs:
545602
distribution: 'temurin'
546603
java-version: ${{ env.TEST_JAVA_VERSION }}
547604
- name: Execute tests
548-
continue-on-error: true
549605
run: |
550606
args="${{ inputs.ratis_args }}"
551607
if [[ "${{ matrix.profile }}" == "flaky" ]]; then
552608
args="$args -Dsurefire.rerunFailingTestsCount=5 -Dsurefire.fork.timeout=3600"
553609
fi
610+
if [[ "${{ matrix.profile }}" != "filesystem" ]]; then
611+
args="$args -DskipShade"
612+
fi
554613
555614
hadoop-ozone/dev-support/checks/integration.sh -P${{ matrix.profile }} ${args}
556615
env:
557616
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
558617
- name: Summary of failures
559-
run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt
560-
if: ${{ !cancelled() }}
618+
run: |
619+
if [[ -s "target/${{ github.job }}/summary.md" ]]; then
620+
cat target/${{ github.job }}/summary.md >> $GITHUB_STEP_SUMMARY
621+
fi
622+
hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job }}/summary.txt
623+
if: ${{ failure() }}
561624
- name: Archive build results
562625
uses: actions/upload-artifact@v4
563626
if: always()
@@ -596,7 +659,7 @@ jobs:
596659
- name: Untar binaries
597660
run: |
598661
mkdir -p hadoop-ozone/dist/target
599-
tar xzvf target/artifacts/ozone-bin-${{ env.TEST_JAVA_VERSION }}/ozone*.tar.gz -C hadoop-ozone/dist/target
662+
tar xzvf target/artifacts/ozone-bin/ozone*.tar.gz -C hadoop-ozone/dist/target
600663
- name: Setup java ${{ env.TEST_JAVA_VERSION }}
601664
uses: actions/setup-java@v4
602665
with:

.github/workflows/intermittent-test-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
java-version: 8
116116
- name: Build (most) of Ozone
117117
run: |
118-
args="-Dskip.npx -Dskip.installnpx -DskipShade -Dmaven.javadoc.skip=true"
118+
args="-DskipRecon -DskipShade -Dmaven.javadoc.skip=true"
119119
if [[ "${{ github.event.inputs.ratis-ref }}" != "" ]]; then
120120
args="$args -Dratis.version=${{ needs.ratis.outputs.ratis-version }}"
121121
args="$args -Dratis.thirdparty.version=${{ needs.ratis.outputs.thirdparty-version }}"
@@ -183,7 +183,7 @@ jobs:
183183
export OZONE_REPO_CACHED=true
184184
fi
185185
186-
args="-DexcludedGroups=native|slow|unhealthy"
186+
args="-DexcludedGroups=native|slow|unhealthy -DskipShade"
187187
if [[ "${{ github.event.inputs.ratis-ref }}" != "" ]]; then
188188
args="$args -Dratis.version=${{ needs.ratis.outputs.ratis-version }}"
189189
args="$args -Dratis.thirdparty.version=${{ needs.ratis.outputs.thirdparty-version }}"

.github/workflows/populate-cache.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ on:
2626
- 'pom.xml'
2727
- '**/pom.xml'
2828
- '.github/workflows/populate-cache.yml'
29-
schedule:
30-
- cron: '20 3 * * *'
29+
workflow_call:
3130
workflow_dispatch:
3231

3332
jobs:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# This workflow periodically updates dependency cache.
17+
18+
name: scheduled-cache-update
19+
20+
on:
21+
schedule:
22+
- cron: '20 3 * * *'
23+
24+
jobs:
25+
update:
26+
uses: ./.github/workflows/populate-cache.yml
27+
secrets: inherit

.mvn/extensions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@
2929
<extension>
3030
<groupId>com.gradle</groupId>
3131
<artifactId>common-custom-user-data-maven-extension</artifactId>
32-
<version>2.0</version>
32+
<version>2.0.1</version>
3333
</extension>
3434
</extensions>

0 commit comments

Comments
 (0)