-
Notifications
You must be signed in to change notification settings - Fork 240
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
Add cache action to speed up mvn workflow [skip ci] #9674
Conversation
Compared the log line by line, the cache action does not help for most of dependencies in pom. |
This is closed prematurely IMO: First this PR did not explore the recommendation from #9609 (comment), to add a job to the workflow that would populate most of the cache once, and all the jobs in the matrix should depend on it. Without it , we currently fan out right away into a parallel execution that don't benefit from each other in terms of caching. Depending which ones you compared, some workflow runs on this PR are days or weeks apart. So nightly SNAPSHOTs, including the ~500M spark-rapids-jni is repulled. |
Got it, let me add a cache job and run some tests |
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
a809c96
to
845a40c
Compare
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
build |
@YanxuanLiu please keep in mind that we should add [skip ci] save resources if no need blossom resources |
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.
looks pretty good already
while true; do | ||
mvn help:evaluate -pl dist -Dexpression=included_buildvers \ | ||
-DforceStdout -PnoSnapshots -q | tr -d ',' | \ | ||
xargs -n 1 bash -c 'mvn initialize -pl sql-plugin-api -am -Dbuildver=$1' _ && break || { |
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.
We still do not populate the cache with Scala 2.13 artifacts: the second line in #9674 (comment)
If one statement works better for your logic we could use a loop
for pom_xml in pom.xml scala2.13/pom.xml; do
mvn -f $pom_xml help:evaluate -pl dist \
-Dexpression=included_buildvers -DforceStdout -PnoSnapshots -q | tr -d ',' | \
xargs -n 1 bash -c 'mvn -f $1 initialize -pl sql-plugin-api -am -Dbuildver=$2' _ $pom_xml;
done
Co-authored-by: Gera Shegalov <[email protected]>
Co-authored-by: Gera Shegalov <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
Signed-off-by: YanxuanLiu <[email protected]>
I've merged latest branch-24.02 to feature branch, but scala 2.13 still failed. Do you have any idea? @gerashegalov |
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've merged latest branch-24.02 to feature branch, but scala 2.13 still failed. Do you have any idea? @gerashegalov
need to fix a typo for buildver=$2
@YanxuanLiu
Co-authored-by: Gera Shegalov <[email protected]>
looks good now. Shall we merge the PR? |
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.
LGTM
build |
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.
LGTM. Please help keep monitoring if the cache storage usage would affect others who may share the same storage like https://github.com/orgs/NVIDIA/projects/4 or https://github.com/NVIDIA/spark-rapids/discussions thanks
- Save the overhead of setting up the runner by folding the short-lived runner get-shim-versions-from-dist steps into cache-dependencies job - Add restore-keys to make sure cache-dependencies does not start on an empty m2, stable versions like for spark artifacts do not change - Use de.qaware.maven:go-offline-maven-plugin suggested by @revans2 - Save scala compiler bridge into a cacheable location Previous mvn workflow duration: - before #9674: ~8min or much longer with retries - on cache hit: ~7min - on cache miss: ~11min After this PR: - on cache hit: 5min - on cache miss: 7min Signed-off-by: Gera Shegalov <[email protected]>
part of fix #9559