-
Notifications
You must be signed in to change notification settings - Fork 384
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
[DO-NOT-MERGE] Introduce new build tool sbt
#1627
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1627 +/- ##
==========================================
- Coverage 45.92% 45.87% -0.04%
==========================================
Files 159 159
Lines 9935 9924 -11
Branches 970 970
==========================================
- Hits 4562 4552 -10
+ Misses 5075 5070 -5
- Partials 298 302 +4 see 6 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
the diff between sbt and maven diff --git a/tmp/maven-files.out b/tmp/sbt-files.out
index d56ee78..e61150c 100644
--- a/tmp/maven-files.out
+++ b/tmp/sbt-files.out
@@ -1,8 +1,6 @@
-./META-INF/DEPENDENCIES
-./META-INF/LICENSE
+./META-INF/INDEX.LIST
./META-INF/LICENSE.txt
./META-INF/MANIFEST.MF
-./META-INF/NOTICE
./META-INF/NOTICE.txt
./META-INF/io.netty.versions.properties
./META-INF/maven/com.google.guava/guava/pom.properties
@@ -69,16 +67,6 @@
./META-INF/maven/io.netty/netty-transport-udt/pom.xml
./META-INF/maven/io.netty/netty-transport/pom.properties
./META-INF/maven/io.netty/netty-transport/pom.xml
-./META-INF/maven/org.apache.celeborn/celeborn-client-spark-3-shaded_2.12/pom.properties
-./META-INF/maven/org.apache.celeborn/celeborn-client-spark-3-shaded_2.12/pom.xml
-./META-INF/maven/org.apache.celeborn/celeborn-client-spark-3_2.12/pom.properties
-./META-INF/maven/org.apache.celeborn/celeborn-client-spark-3_2.12/pom.xml
-./META-INF/maven/org.apache.celeborn/celeborn-client-spark-common_2.12/pom.properties
-./META-INF/maven/org.apache.celeborn/celeborn-client-spark-common_2.12/pom.xml
-./META-INF/maven/org.apache.celeborn/celeborn-client_2.12/pom.properties
-./META-INF/maven/org.apache.celeborn/celeborn-client_2.12/pom.xml
-./META-INF/maven/org.apache.celeborn/celeborn-common_2.12/pom.properties
-./META-INF/maven/org.apache.celeborn/celeborn-common_2.12/pom.xml
./META-INF/maven/org.apache.commons/commons-lang3/pom.properties
./META-INF/maven/org.apache.commons/commons-lang3/pom.xml
./META-INF/maven/org.jctools/jctools-core/pom.properties
@@ -86,7 +74,7 @@
./META-INF/native/liborg_apache_celeborn_shaded_netty_transport_native_epoll_aarch_64.so
./META-INF/native/liborg_apache_celeborn_shaded_netty_transport_native_epoll_x86_64.so
./META-INF/services/reactor.blockhound.integration.BlockHoundIntegration
-./celeborn-client-spark-3-shaded_2.12-0.4.0-SNAPSHOT.jar
+./celeborn-client-spark-3-shaded-assembly-0.4.0-SNAPSHOT.jar
./org/apache/celeborn/client/ApplicationHeartbeater$$anon$1.class
./org/apache/celeborn/client/ApplicationHeartbeater.class
./org/apache/celeborn/client/ApplyNewLocationCallContext$.class |
The SBT is extremely faster than Maven, and its interactive CLI has a better experience for running tests. Personally, I lean to switch the building tool from Maven to SBT, as Spark does SPARK-44173, but this needs a consensus of the community :) |
+1. Glad to see this patch, maven's building is slow. |
Thanks for this 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.
Could you also update this new method in doc?
There is an additional benefit if we decide to migrate to SBT. |
Collected concerns from the PPMC:
|
I definitely understand it, until I found https://spark.apache.org/developer-tools.html and try it on developing Spark |
The bootstrap script currently supports passing environment variables > rm build/sbt-launch-1.9.0.jar
> export DEFAULT_ARTIFACT_REPOSITORY=https://mirrors.huaweicloud.com/repository/maven/ && ./build/sbt
The Delta project provided a good reference. By default, the > cat ~/.sbt/repositories
[repositories]
local
local-preloaded-ivy: file:///${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
local-preloaded: file:///${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}
huawei-central: https://mirrors.huaweicloud.com/repository/maven/
aliyun-maven: https://maven.aliyun.com/nexus/content/groups/public
gcs-maven-central-mirror: https://maven-central.storage-download.googleapis.com/repos/central/data/
typesafe-ivy-releases: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sbt-ivy-snapshots: https://repo.scala-sbt.org/scalasbt/ivy-snapshots/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sbt-plugin-releases: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
bintray-spark-packages: https://dl.bintray.com/spark-packages/maven/
typesafe-releases: https://repo.typesafe.com/typesafe/releases/
|
Passing Maven profiles to |
@cfmcgrady Do you have time to start a pure SBT building system? |
BTW, I think we can introduce a dependency audit mechanism like Spark does, we may need to merge |
|
I think Spark's developer-tools page is a good example to follow, we can provide a similar page at https://celeborn.apache.org/community/contributor_guide/build_and_test/ |
Based on my experience with Spark, dual building systems always introduce inconsistency, even after the continuous efforts of many excellent engineers, Spark's output artifacts and dependency resolve list still have some differences between sbt and maven. Thus I would argue that a pure sbt makes life easy. |
### What changes were proposed in this pull request? This PR introduces the SBT build system implementation that operates independently from the current Maven build system. Different from #1627, the current implementation does not depend on `pom.xml` The implementation enables packaging and testing functionalities for server-related modules and Spark-related modules using SBT. For Flink-related build/test, sbt build documentation, continuous integration, and plugins, they will be submitted in separate PRs ### Why are the changes needed? improve project build speed packing the project. ```shell $ ./build/sbt sbt:celeborn> clean [success] Total time: 1 s, completed 2023-7-25 16:36:12 sbt:celeborn> package [success] Total time: 28 s, completed 2023-7-25 16:36:46 ``` packing and shading the spark 3.3 client ```shell $ ./build/sbt -Pspark-3.3 sbt:celeborn> clean [success] Total time: 1 s, completed 2023-7-25 16:39:11 sbt:celeborn> project celeborn-client-spark-3-shaded sbt:celeborn-client-spark-3-shaded> assembly [success] Total time: 37 s, completed 2023-7-25 16:40:03 ``` packing and shading the spark 2.4 client ```shell $ ./build/sbt -Pspark-2.4 sbt:celeborn> clean [success] Total time: 1 s, completed 2023-7-25 16:41:06 sbt:celeborn> project celeborn-client-spark-2-shaded sbt:celeborn-client-spark-2-shaded> assembly [success] Total time: 36 s, completed 2023-7-25 16:41:53 ``` running server-related tests ```shell $ ./build/sbt clean test [success] Total time: 350 s (05:50), completed 2023-7-25 16:48:58 ``` ### Does this PR introduce _any_ user-facing change? yes ### How was this patch tested? tested locally Closes #1757 from cfmcgrady/pure-sbt. Authored-by: Fu Chen <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
What changes were proposed in this pull request?
Introduce new build tool
sbt
NOTICE AND LIMITATION :
Why are the changes needed?
The build tool
sbt
demonstrates superior speed and performance compared tomaven
.packing the project.
packing and shading the spark 3 client
only shading the spark 3 client
Life becomes much easier with
sbt
:)Does this PR introduce any user-facing change?
Yes, introduce the new build tool
sbt
How was this patch tested?
Manually tested