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
[SPARK-32695][INFRA] Explicitly cache and hash 'build' directly in GitHub Actions #29536
Conversation
This comment has been minimized.
This comment has been minimized.
This reverts commit cfe5e92.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This reverts commit 1f4706e.
This comment has been minimized.
This comment has been minimized.
cc @dongjoon-hyun and @gengliangwang can you take a look when you're available? |
Test build #127872 has finished for PR 29536 at commit
|
@@ -99,10 +99,14 @@ jobs: | |||
run: git merge --progress --ff-only origin/${{ github.event.inputs.target }} | |||
# Cache local repositories. Note that GitHub Actions cache has a 2G limit. | |||
- name: Cache Scala, SBT, Maven and Zinc | |||
uses: actions/cache@v1 | |||
uses: actions/cache@v2 |
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.
why is the difference between v1 and v2?
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.
In order to allow multiple file path (https://github.com/actions/cache#whats-new). It is also to make it consistent in this file. cache@v2
is used in all places at this file except here.
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.
Previously, other files like build/mvn
and build/sbt
are also cached and overwritten. So, when you have some changes there, they are ignored.
build/zinc-* | ||
build/scala-* | ||
build/*.jar | ||
key: build-${{ hashFiles('**/pom.xml', 'project/build.properties', 'build/mvn', 'build/sbt', 'build/sbt-launch-lib.bash', 'build/spark-build-info') }} |
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.
(Ah, I see. glob patterns like build/*'
cannot be used in hashFiles
now...)
Looked around the GH actions docs and this update looks resonable to me. |
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
Thanks @maropu and @gengliangwang! |
Merged to master. branch-3.0 and branch-2.4. |
…tHub Actions ### What changes were proposed in this pull request? This PR proposes to explicitly cache and hash the files/directories under 'build' for SBT and Zinc at GitHub Actions. Otherwise, it can end up with overwriting `build` directory. See also #29286 (comment) Previously, other files like `build/mvn` and `build/sbt` are also cached and overwritten. So, when you have some changes there, they are ignored. ### Why are the changes needed? To make GitHub Actions build stable. ### Does this PR introduce _any_ user-facing change? No, dev-only. ### How was this patch tested? The builds in this PR test it out. Closes #29536 from HyukjinKwon/SPARK-32695. Authored-by: HyukjinKwon <gurwls223@apache.org> Signed-off-by: HyukjinKwon <gurwls223@apache.org> (cherry picked from commit b07e742) Signed-off-by: HyukjinKwon <gurwls223@apache.org>
…tHub Actions ### What changes were proposed in this pull request? This PR proposes to explicitly cache and hash the files/directories under 'build' for SBT and Zinc at GitHub Actions. Otherwise, it can end up with overwriting `build` directory. See also #29286 (comment) Previously, other files like `build/mvn` and `build/sbt` are also cached and overwritten. So, when you have some changes there, they are ignored. ### Why are the changes needed? To make GitHub Actions build stable. ### Does this PR introduce _any_ user-facing change? No, dev-only. ### How was this patch tested? The builds in this PR test it out. Closes #29536 from HyukjinKwon/SPARK-32695. Authored-by: HyukjinKwon <gurwls223@apache.org> Signed-off-by: HyukjinKwon <gurwls223@apache.org> (cherry picked from commit b07e742) Signed-off-by: HyukjinKwon <gurwls223@apache.org>
What changes were proposed in this pull request?
This PR proposes to explicitly cache and hash the files/directories under 'build' for SBT and Zinc at GitHub Actions. Otherwise, it can end up with overwriting
build
directory. See also #29286 (comment)Previously, other files like
build/mvn
andbuild/sbt
are also cached and overwritten. So, when you have some changes there, they are ignored.Why are the changes needed?
To make GitHub Actions build stable.
Does this PR introduce any user-facing change?
No, dev-only.
How was this patch tested?
The builds in this PR test it out.