This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 5b3ffa207bae [SPARK-50885][BUILD] Change to use `SbtPomKeys` to obtain 
`io.grpc.version` in `SparkBuild.scala`
5b3ffa207bae is described below

commit 5b3ffa207bae824f9f0cb9b3ec9d813cf7379725
Author: yangjie01 <[email protected]>
AuthorDate: Sat Jan 18 14:41:22 2025 -0800

    [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 <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
    (cherry picked from commit b104db93034f3f2a983f3b0dcbac224c29288745)
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 project/SparkBuild.scala | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index 0fbb9e2861d6..abf6b5df469b 100644
--- a/project/SparkBuild.scala
+++ b/project/SparkBuild.scala
@@ -90,8 +90,6 @@ object BuildCommons {
   // Google Protobuf version used for generating the protobuf.
   // SPARK-41247: needs to be consistent with `protobuf.version` in `pom.xml`.
   val protoVersion = "4.29.3"
-  // GRPC version used for Spark Connect.
-  val grpcVersion = "1.67.1"
 }
 
 object SparkBuild extends PomBuild {
@@ -646,8 +644,11 @@ object SparkConnectCommon {
       val guavaFailureaccessVersion =
         SbtPomKeys.effectivePom.value.getProperties.get(
           "guava.failureaccess.version").asInstanceOf[String]
+      val grpcVersion =
+        SbtPomKeys.effectivePom.value.getProperties.get(
+          "io.grpc.version").asInstanceOf[String]
       Seq(
-        "io.grpc" % "protoc-gen-grpc-java" % BuildCommons.grpcVersion 
asProtocPlugin(),
+        "io.grpc" % "protoc-gen-grpc-java" % grpcVersion asProtocPlugin(),
         "com.google.guava" % "guava" % guavaVersion,
         "com.google.guava" % "failureaccess" % guavaFailureaccessVersion,
         "com.google.protobuf" % "protobuf-java" % protoVersion % "protobuf"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to