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

rickyma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git


The following commit(s) were added to refs/heads/master by this push:
     new 47a1aa136 [#1977][FOLLOWUP] fix(coordinator): When resolving merge 
conflicts, some changes were reverted (#2001)
47a1aa136 is described below

commit 47a1aa136b7957545c02a76d6ee7b66090a132a1
Author: leewish <mr.liwenl...@outlook.com>
AuthorDate: Thu Aug 1 20:33:44 2024 +0800

    [#1977][FOLLOWUP] fix(coordinator): When resolving merge conflicts, some 
changes were reverted (#2001)
    
    What changes were proposed in this pull request?
    Display version and git commit id in dashboard
    
    Why are the changes needed?
    
    Issue: #1977
    Prev PR: #1964
    
    The version and git commit id can be used to easily locate whether the 
component has been upgraded and troubleshoot problems.
    
    Does this PR introduce any user-facing change?
    User can view version and git commit id from dashboard
    
    How was this patch tested?
    Use the latest version, open the dashboard ui, and you can see the version 
and git commit id on the Coordinator and Shuffle server pages.
    Submit a task, and you can see the version and git commit id of each 
application task in the Apps module on the Application page.
---
 .../src/main/java/org/apache/uniffle/coordinator/ServerNode.java    | 6 +++++-
 .../org/apache/uniffle/client/impl/grpc/CoordinatorGrpcClient.java  | 5 +++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
index 7bb6845d9..0e6c78385 100644
--- a/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
+++ b/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
@@ -312,7 +312,7 @@ public class ServerNode implements Comparable<ServerNode> {
         + "], version["
         + version
         + "], gitCommitId["
-        + storageInfo.size()
+        + gitCommitId
         + "]";
   }
 
@@ -368,6 +368,10 @@ public class ServerNode implements Comparable<ServerNode> {
     return startTimeMs;
   }
 
+  public String getVersion() {
+    return version;
+  }
+
   public String getGitCommitId() {
     return gitCommitId;
   }
diff --git 
a/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/CoordinatorGrpcClient.java
 
b/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/CoordinatorGrpcClient.java
index 3f7ff066c..4e4e3cecd 100644
--- 
a/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/CoordinatorGrpcClient.java
+++ 
b/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/CoordinatorGrpcClient.java
@@ -48,6 +48,7 @@ import 
org.apache.uniffle.client.response.RssFetchRemoteStorageResponse;
 import org.apache.uniffle.client.response.RssGetShuffleAssignmentsResponse;
 import org.apache.uniffle.client.response.RssSendHeartBeatResponse;
 import org.apache.uniffle.common.PartitionRange;
+import org.apache.uniffle.common.ProjectConstants;
 import org.apache.uniffle.common.RemoteStorageInfo;
 import org.apache.uniffle.common.ServerStatus;
 import org.apache.uniffle.common.ShuffleServerInfo;
@@ -146,6 +147,8 @@ public class CoordinatorGrpcClient extends GrpcClient 
implements CoordinatorClie
             .setStatusValue(serverStatus.ordinal())
             .putAllStorageInfo(StorageInfoUtils.toProto(storageInfo))
             .setStartTimeMs(startTimeMs)
+            .setVersion(ProjectConstants.VERSION)
+            .setGitCommitId(ProjectConstants.getGitCommitId())
             .build();
 
     RssProtos.StatusCode status;
@@ -265,6 +268,8 @@ public class CoordinatorGrpcClient extends GrpcClient 
implements CoordinatorClie
         ApplicationInfoRequest.newBuilder()
             .setAppId(request.getAppId())
             .setUser(request.getUser())
+            .setVersion(ProjectConstants.VERSION)
+            .setGitCommitId(ProjectConstants.getGitCommitId())
             .build();
     ApplicationInfoResponse rpcResponse =
         blockingStub

Reply via email to