Repository navigation
HDDS-17856. Add more dependencies to cache #12101
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
90f9fc1
d8fb8bc
ea2bb73
aacfd3e
c7a49c5
385e2bd
df977e5
0a02c56
d076500
adc7fda
d8862e2
21dfe58
69b1253
d75acd6
90cfdff
08585e9
0cca77a
b20ca1c
e9f1d33
9245b84
51b6ba3
1d35dfe
fb80d8d
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 |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ on: | |
| paths: | ||
| - 'pom.xml' | ||
| - '**/pom.xml' | ||
| - 'dev-support/ci/populate-cache.sh' | ||
| - '.github/actions/setup-java-with-cache/action.yml' | ||
| - '.github/workflows/populate-cache.yml' | ||
| - '.mvn/extensions.xml' | ||
|
|
@@ -62,16 +63,15 @@ jobs: | |
| java-version: ${{ env.TEST_JAVA_VERSION }} | ||
| only-exact-hit: true | ||
|
|
||
| - name: Fetch plugin dependencies | ||
| - name: Fetch dependencies | ||
| if: steps.restore-cache.outputs.cache-hit != 'true' | ||
| run: ./mvnw $MAVEN_ARGS --no-transfer-progress --show-version dependency:resolve-plugins | ||
| run: | | ||
| dev-support/ci/populate-cache.sh | ||
|
|
||
| - name: Get versions | ||
| id: versions | ||
| run: | | ||
| source hadoop-ozone/dev-support/checks/_lib.sh | ||
| NODEJS_VERSION=$(get_version nodejs) | ||
| echo "NODEJS_VERSION=$NODEJS_VERSION" >> $GITHUB_ENV | ||
| HADOOP_VERSION=$(get_version hadoop) | ||
| echo "HADOOP_VERSION=$HADOOP_VERSION" >> $GITHUB_ENV | ||
| RANGER_VERSION=$(get_version ranger) | ||
|
|
@@ -101,6 +101,30 @@ jobs: | |
| key: hadoop-${{ env.HADOOP_VERSION }} | ||
| retention-days: 90 | ||
|
|
||
| - name: Restore Hadoop AWS dependencies | ||
| id: restore-hadoop-deps | ||
| uses: apache/infrastructure-actions/stash/restore@restore/v1 | ||
| with: | ||
| path: ~/.cache/ozone/maven-repo | ||
| key: hadoop-${{ env.HADOOP_VERSION }}-deps | ||
|
|
||
| - name: Fetch Hadoop AWS dependencies | ||
| if: steps.restore-hadoop-deps.outputs.stash-hit != 'true' | ||
| run: | | ||
| # create custom local repo dir for Hadoop AWS dependencies | ||
| mkdir -p ~/.cache/ozone/maven-repo | ||
| bash hadoop-ozone/dist/src/main/compose/ozone/test-s3a.sh | ||
| env: | ||
| BUILD_ONLY: true | ||
|
Member
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 see AWS SDK bundle is a big one, and only
Contributor
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. Yes, especially since it depends on Hadoop version, does not need to be rebuilt for each Ozone POM change.
Contributor
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. Addressed in c7a49c5 + 385e2bd. Cache is now back to 720MB: https://github.com/adoroszlai/ozone/actions/runs/44781106817/job/136443699067#step:22:26 and there is a separate stash for Hadoop AWS Maven dependencies: https://github.com/adoroszlai/ozone/actions/runs/44770754325/job/136407450271#step:11:3 which is used in https://github.com/adoroszlai/ozone/actions/runs/44783549819/job/136459595521#step:18:6 |
||
|
|
||
| - name: Stash Hadoop AWS dependencies | ||
| if: steps.restore-hadoop-deps.outputs.stash-hit != 'true' | ||
| uses: apache/infrastructure-actions/stash/save@save/v1 | ||
| with: | ||
| path: ~/.cache/ozone/maven-repo | ||
| key: hadoop-${{ env.HADOOP_VERSION }}-deps | ||
| retention-days: 90 | ||
|
|
||
| - name: Restore Ranger | ||
| id: restore-ranger | ||
| uses: apache/infrastructure-actions/stash/restore@restore/v1 | ||
|
|
@@ -126,22 +150,6 @@ jobs: | |
| key: ranger-${{ env.RANGER_VERSION }} | ||
| retention-days: 90 | ||
|
|
||
| - name: Restore NodeJS tarballs | ||
| id: restore-nodejs | ||
| if: steps.restore-cache.outputs.cache-hit != 'true' | ||
| uses: actions/cache@v6 | ||
| with: | ||
| path: ~/.m2/repository/com/github/eirslett/node | ||
| key: nodejs-${{ env.NODEJS_VERSION }} | ||
|
|
||
| - name: Download NodeJS | ||
| if: steps.restore-cache.outputs.cache-hit != 'true' && steps.restore-nodejs.outputs.cache-hit != 'true' | ||
| run: dev-support/ci/download-nodejs.sh | ||
|
|
||
| - name: Fetch dependencies | ||
| if: steps.restore-cache.outputs.cache-hit != 'true' | ||
| run: ./mvnw $BUILD_ARGS $MAVEN_ARGS --no-transfer-progress --show-version -Pgo-offline clean verify | ||
|
|
||
| - name: Delete Ozone jars from repo | ||
| if: steps.restore-cache.outputs.cache-hit != 'true' | ||
| run: rm -fr ~/.m2/repository/org/apache/ozone | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| #!/usr/bin/env bash | ||
| # 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. | ||
|
|
||
| # Fetches Ozone build and runtime dependencies. | ||
|
|
||
| set -e -u -o pipefail | ||
|
|
||
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
| cd "$DIR/../.." || exit 1 | ||
|
|
||
| # fetch plugins, even if not part of normal build | ||
| ./mvnw --batch-mode --show-version dependency:resolve-plugins help:help "$@" | ||
|
|
||
| # install, but skip shaded modules | ||
| ./mvnw --batch-mode --show-version clean install \ | ||
| -DskipShade -Pgo-offline ${BUILD_ARGS:-} "$@" | ||
|
|
||
| # no shading | ||
| hadoop-ozone/dev-support/checks/_build.sh compile cyclonedx:makeBom \ | ||
| -pl :ozone-filesystem-shaded,:ozone-filesystem-hadoop2 \ | ||
| -Dmaven-replacer-plugin.skip "$@" | ||
|
|
||
| # exercise some checks on limited modules to get more dependencies | ||
| hadoop-ozone/dev-support/checks/errorprone.sh -pl :ozone-main "$@" || true | ||
| hadoop-ozone/dev-support/checks/pmd.sh -am -pl :ozone-dev-support "$@" || true | ||
| hadoop-ozone/dev-support/checks/repro.sh -pl :ozone-main "$@" || true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,6 +146,7 @@ | |
| <maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version> | ||
| <maven-patch-plugin.version>1.3</maven-patch-plugin.version> | ||
| <maven-remote-resources-plugin.version>3.3.0</maven-remote-resources-plugin.version> | ||
| <maven-replacer-plugin.skip>false</maven-replacer-plugin.skip> | ||
| <maven-replacer-plugin.version>1.5.3</maven-replacer-plugin.version> | ||
| <maven-resources-plugin.version>3.5.0</maven-resources-plugin.version> | ||
| <maven-shade-plugin.version>3.6.2</maven-shade-plugin.version> | ||
|
|
@@ -3053,12 +3054,10 @@ | |
| <profile> | ||
| <id>go-offline</id> | ||
| <properties> | ||
| <cyclonedx.skip>true</cyclonedx.skip> | ||
|
Member
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. This seems re-enables
Contributor
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 removed Could be a bug in
Member
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. Makes sense, thanks! Just to confirm, is the SBOM only needed for releases? If so, I noticed that makeBom takes about 100s in the CI build job. Maybe we can consider skipping it in CI? |
||
| <enforcer.skip>true</enforcer.skip> | ||
| <jacoco.skip>true</jacoco.skip> | ||
| <maven.javadoc.skip>true</maven.javadoc.skip> | ||
| <mdep.analyze.skip>true</mdep.analyze.skip> | ||
| <skip.installnodepnpm>true</skip.installnodepnpm> | ||
| <skip.pnpm>true</skip.pnpm> | ||
| <test>void</test> | ||
| </properties> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this! Should we also include
populate-cache.yml?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Ozone-specific Maven cache does not depend on (most of) the rest of the workflow, like the 3rd-party component stashes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it depends on:
$TEST_JAVA_VERSIONWe could:
populate-cache.sh(and 3rd-party stashes after the Ozone cache)I'll try if we can remove the Java 21 part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
populate-cachechanges done in 9245b84, 51b6ba3, 1d35dfe.Java 21 stuff removed (b20ca1c, e9f1d33), profiles being removed in #12120.