Skip to content

Commit b104db9

Browse files
LuciferYangdongjoon-hyun
authored andcommitted
[SPARK-50885][BUILD] Change to use SbtPomKeys to obtain io.grpc.version in SparkBuild.scala
### What changes were proposed in this pull request? This pr chanage to use ``` SbtPomKeys.effectivePom.value.getProperties.get("io.grpc.version").asInstanceOf[String] ``` to get `io.grpc.version`, so that when upgrading gRPC in the future, there will be no need to modify both `pom.xml` and `SparkBuild.scala` simultaneously. On the other hand, this PR moves the version retrieval from `BuildCommons` to `SparkConnectCommon`, because currently only `SparkConnectCommon` requires the definition of this version. ### Why are the changes needed? Simplify the management of the `grpcVersion`. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - Pass GitHub Actions ### Was this patch authored or co-authored using generative AI tooling? No Closes #49562 from LuciferYang/SPARK-50885. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent 98d9968 commit b104db9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

project/SparkBuild.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ object BuildCommons {
9090
// Google Protobuf version used for generating the protobuf.
9191
// SPARK-41247: needs to be consistent with `protobuf.version` in `pom.xml`.
9292
val protoVersion = "4.29.3"
93-
// GRPC version used for Spark Connect.
94-
val grpcVersion = "1.67.1"
9593
}
9694

9795
object SparkBuild extends PomBuild {
@@ -646,8 +644,11 @@ object SparkConnectCommon {
646644
val guavaFailureaccessVersion =
647645
SbtPomKeys.effectivePom.value.getProperties.get(
648646
"guava.failureaccess.version").asInstanceOf[String]
647+
val grpcVersion =
648+
SbtPomKeys.effectivePom.value.getProperties.get(
649+
"io.grpc.version").asInstanceOf[String]
649650
Seq(
650-
"io.grpc" % "protoc-gen-grpc-java" % BuildCommons.grpcVersion asProtocPlugin(),
651+
"io.grpc" % "protoc-gen-grpc-java" % grpcVersion asProtocPlugin(),
651652
"com.google.guava" % "guava" % guavaVersion,
652653
"com.google.guava" % "failureaccess" % guavaFailureaccessVersion,
653654
"com.google.protobuf" % "protobuf-java" % protoVersion % "protobuf"

0 commit comments

Comments
 (0)