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 6e8f68ad3 [#1977] improvment(dashboard): Add version and git commit id 
in dashboard (#1964)
6e8f68ad3 is described below

commit 6e8f68ad3b4737affb9e847acb25b7e911010403
Author: leewish <mr.liwenl...@outlook.com>
AuthorDate: Thu Aug 1 14:19:37 2024 +0800

    [#1977] improvment(dashboard): Add version and git commit id in dashboard 
(#1964)
    
    ### What changes were proposed in this pull request?
    Display version and git commit id in dashboard
    
    ### Why are the changes needed?
    
    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.
---
 common/pom.xml                                     | 64 +++++++++++++++++++++-
 .../apache/uniffle/common/ProjectConstants.java    | 33 +++++++++++
 .../org/apache/uniffle/coordinator/AppInfo.java    | 22 +++++++-
 .../uniffle/coordinator/ApplicationManager.java    | 14 +++--
 .../coordinator/CoordinatorGrpcService.java        |  8 ++-
 .../apache/uniffle/coordinator/QuotaManager.java   |  9 ++-
 .../org/apache/uniffle/coordinator/ServerNode.java | 51 ++++++++++++++++-
 .../uniffle/coordinator/SimpleClusterManager.java  |  3 +
 .../web/resource/ApplicationResource.java          |  8 ++-
 .../web/resource/CoordinatorServerResource.java    |  3 +
 .../uniffle/coordinator/web/vo/AppInfoVO.java      | 20 ++++++-
 .../uniffle/coordinator/QuotaManagerTest.java      |  2 +-
 .../src/main/webapp/src/pages/ApplicationPage.vue  | 10 ++++
 .../webapp/src/pages/CoordinatorServerPage.vue     | 22 ++++++++
 .../webapp/src/pages/serverstatus/NodeListPage.vue |  2 +
 pom.xml                                            | 15 +++++
 proto/src/main/proto/Rss.proto                     |  4 ++
 17 files changed, 272 insertions(+), 18 deletions(-)

diff --git a/common/pom.xml b/common/pom.xml
index 1cdfaceb7..ee7f352a1 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -28,7 +28,11 @@
   <artifactId>rss-common</artifactId>
   <packaging>jar</packaging>
   <name>Apache Uniffle Common</name>
-
+  <scm>
+    
<connection>scm:git:g...@github.com:apache/incubator-uniffle.git</connection>
+    
<developerConnection>scm:git:g...@github.com:apache/incubator-uniffle.git</developerConnection>
+    <url>scm:git:g...@github.com:apache/incubator-uniffle.git</url>
+  </scm>
   <dependencies>
     <dependency>
       <artifactId>rss-proto</artifactId>
@@ -173,6 +177,12 @@
   </dependencies>
 
   <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
     <plugins>
       <plugin>
         <groupId>org.apache.felix</groupId>
@@ -180,6 +190,58 @@
         <version>2.4.0</version>
         <extensions>true</extensions>
       </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>templating-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>filter-src</id>
+            <goals>
+              <goal>filter-sources</goal>
+            </goals>
+            <configuration>
+              
<sourceDirectory>${basedir}/src/main/java-templates</sourceDirectory>
+              
<outputDirectory>${project.build.directory}/generated-sources/java-templates
+              </outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>buildnumber-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>initialize</phase>
+            <goals>
+              <goal>create-metadata</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          
<outputDirectory>${project.build.directory}/generated/build-metadata</outputDirectory>
+          <outputName>build.properties</outputName>
+          <revisionPropertyName>git.revision</revisionPropertyName>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>properties-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>initialize</phase>
+            <goals>
+              <goal>read-project-properties</goal>
+            </goals>
+            <configuration>
+              <files>
+                
<file>${project.build.directory}/generated/build-metadata/build.properties</file>
+              </files>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
+
   </build>
 </project>
diff --git 
a/common/src/main/java-templates/org/apache/uniffle/common/ProjectConstants.java
 
b/common/src/main/java-templates/org/apache/uniffle/common/ProjectConstants.java
new file mode 100644
index 000000000..4b4655f5f
--- /dev/null
+++ 
b/common/src/main/java-templates/org/apache/uniffle/common/ProjectConstants.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.common;
+public final class ProjectConstants {
+  /* Project version, specified in maven property. **/
+  public static final String VERSION = "${project.version}";
+  /* The latest git revision of at the time of building**/
+  public static final String REVISION = "${git.revision}";
+
+  private ProjectConstants() {} // prevent instantiation
+
+  public static String getGitCommitId() {
+    if (ProjectConstants.REVISION.length() >= 8) {
+      return ProjectConstants.REVISION.substring(0, 8);
+    }
+    return ProjectConstants.REVISION;
+  }
+}
diff --git 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/AppInfo.java 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/AppInfo.java
index d9e9f9953..16b9be1cc 100644
--- a/coordinator/src/main/java/org/apache/uniffle/coordinator/AppInfo.java
+++ b/coordinator/src/main/java/org/apache/uniffle/coordinator/AppInfo.java
@@ -23,11 +23,16 @@ public class AppInfo implements Comparable<AppInfo> {
   private String appId;
   private long updateTime;
   private long registrationTime;
+  private String version;
+  private String gitCommitId;
 
-  public AppInfo(String appId, long updateTime, long registrationTime) {
+  public AppInfo(
+      String appId, long updateTime, long registrationTime, String version, 
String gitCommitId) {
     this.appId = appId;
     this.updateTime = updateTime;
     this.registrationTime = registrationTime;
+    this.version = version;
+    this.gitCommitId = gitCommitId;
   }
 
   public String getAppId() {
@@ -54,6 +59,14 @@ public class AppInfo implements Comparable<AppInfo> {
     this.registrationTime = registrationTime;
   }
 
+  public String getVersion() {
+    return version;
+  }
+
+  public String getGitCommitId() {
+    return gitCommitId;
+  }
+
   @Override
   public int compareTo(AppInfo appInfo) {
     return Long.compare(registrationTime, appInfo.getRegistrationTime());
@@ -79,6 +92,11 @@ public class AppInfo implements Comparable<AppInfo> {
   }
 
   public static AppInfo createAppInfo(String appId, long updateTime) {
-    return new AppInfo(appId, updateTime, updateTime);
+    return createAppInfo(appId, updateTime, "", "");
+  }
+
+  public static AppInfo createAppInfo(
+      String appId, long updateTime, String version, String gitCommitId) {
+    return new AppInfo(appId, updateTime, updateTime, version, gitCommitId);
   }
 }
diff --git 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/ApplicationManager.java
 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/ApplicationManager.java
index 716c22692..afbcffd83 100644
--- 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/ApplicationManager.java
+++ 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/ApplicationManager.java
@@ -126,6 +126,11 @@ public class ApplicationManager implements Closeable {
   }
 
   public void registerApplicationInfo(String appId, String user) {
+    registerApplicationInfo(appId, user, "", "");
+  }
+
+  public void registerApplicationInfo(
+      String appId, String user, String version, String gitCommitId) {
     // using computeIfAbsent is just for MR and spark which is used 
RssShuffleManager as
     // implementation class
     // in such case by default, there is no currentUserAndApp, so a unified 
user implementation
@@ -137,9 +142,10 @@ public class ApplicationManager implements Closeable {
       CoordinatorMetrics.counterTotalAppNum.inc();
       LOG.info("New application is registered: {}", appId);
     }
-    AppInfo appInfo = AppInfo.createAppInfo(appId, System.currentTimeMillis());
+    AppInfo appInfo =
+        AppInfo.createAppInfo(appId, System.currentTimeMillis(), version, 
gitCommitId);
     if (quotaManager != null) {
-      quotaManager.registerApplicationInfo(appId, appAndTime);
+      quotaManager.registerApplicationInfo(appId, appAndTime, version, 
gitCommitId);
     } else {
       appAndTime.put(appId, appInfo);
     }
@@ -149,7 +155,7 @@ public class ApplicationManager implements Closeable {
     String user = appIdToUser.get(appId);
     // compatible with lower version clients
     if (user == null) {
-      registerApplicationInfo(appId, "");
+      registerApplicationInfo(appId, "", "", "");
     } else {
       Map<String, AppInfo> appAndTime = currentUserAndApp.get(user);
       AppInfo appInfo = appAndTime.get(appId);
@@ -157,7 +163,7 @@ public class ApplicationManager implements Closeable {
       if (appInfo != null) {
         appInfo.setUpdateTime(currentTimeMs);
       } else {
-        appInfo = new AppInfo(appId, currentTimeMs, currentTimeMs);
+        appInfo = new AppInfo(appId, currentTimeMs, currentTimeMs, "", "");
         appAndTime.put(appId, appInfo);
       }
     }
diff --git 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorGrpcService.java
 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorGrpcService.java
index a4376576d..82e133bf8 100644
--- 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorGrpcService.java
+++ 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorGrpcService.java
@@ -296,7 +296,9 @@ public class CoordinatorGrpcService extends 
CoordinatorServerGrpc.CoordinatorSer
       String appId = request.getAppId();
       String user = request.getUser();
       auditContext.setAppId(appId).setArgs("user=" + user);
-      coordinatorServer.getApplicationManager().registerApplicationInfo(appId, 
user);
+      coordinatorServer
+          .getApplicationManager()
+          .registerApplicationInfo(appId, user, request.getVersion(), 
request.getGitCommitId());
       if (LOG.isDebugEnabled()) {
         LOG.debug("Got a registered application info: {}", appId);
       }
@@ -505,7 +507,9 @@ public class CoordinatorGrpcService extends 
CoordinatorServerGrpc.CoordinatorSer
         StorageInfoUtils.fromProto(request.getStorageInfoMap()),
         request.getServerId().getNettyPort(),
         request.getServerId().getJettyPort(),
-        request.getStartTimeMs());
+        request.getStartTimeMs(),
+        request.getVersion(),
+        request.getGitCommitId());
   }
 
   /**
diff --git 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/QuotaManager.java 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/QuotaManager.java
index 72c462933..d8a08bc2c 100644
--- a/coordinator/src/main/java/org/apache/uniffle/coordinator/QuotaManager.java
+++ b/coordinator/src/main/java/org/apache/uniffle/coordinator/QuotaManager.java
@@ -128,7 +128,7 @@ public class QuotaManager {
         AppInfo appInfo = appAndTimes.get(uuid);
         long currentTimeMillis = System.currentTimeMillis();
         if (appInfo == null) {
-          appInfo = new AppInfo(uuid, currentTimeMillis, currentTimeMillis);
+          appInfo = new AppInfo(uuid, currentTimeMillis, currentTimeMillis, 
"", "");
           appAndTimes.put(uuid, appInfo);
         } else {
           appInfo.setUpdateTime(currentTimeMillis);
@@ -140,6 +140,11 @@ public class QuotaManager {
   }
 
   public void registerApplicationInfo(String appId, Map<String, AppInfo> 
appAndTime) {
+    registerApplicationInfo(appId, appAndTime, "", "");
+  }
+
+  public void registerApplicationInfo(
+      String appId, Map<String, AppInfo> appAndTime, String version, String 
gitCommitId) {
     long currentTimeMillis = System.currentTimeMillis();
     String[] appIdAndUuid = appId.split("_");
     String uuidFromApp = appIdAndUuid[appIdAndUuid.length - 1];
@@ -149,7 +154,7 @@ public class QuotaManager {
       // thread safe is guaranteed by synchronized
       AppInfo appInfo = appAndTime.get(appId);
       if (appInfo == null) {
-        appInfo = new AppInfo(appId, currentTimeMillis, currentTimeMillis);
+        appInfo = new AppInfo(appId, currentTimeMillis, currentTimeMillis, 
version, gitCommitId);
         appAndTime.put(appId, appInfo);
       } else {
         appInfo.setUpdateTime(currentTimeMillis);
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 8b90fdafe..7bb6845d9 100644
--- a/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
+++ b/coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
@@ -44,6 +44,8 @@ public class ServerNode implements Comparable<ServerNode> {
   private int nettyPort = -1;
   private int jettyPort = -1;
   private long startTimeMs = -1;
+  private String version;
+  private String gitCommitId;
 
   public ServerNode(String id) {
     this(id, "", 0, 0, 0, 0, 0, Sets.newHashSet(), ServerStatus.EXCLUDED);
@@ -164,6 +166,40 @@ public class ServerNode implements Comparable<ServerNode> {
       int nettyPort,
       int jettyPort,
       long startTimeMs) {
+    this(
+        id,
+        ip,
+        grpcPort,
+        usedMemory,
+        preAllocatedMemory,
+        availableMemory,
+        eventNumInFlush,
+        tags,
+        status,
+        storageInfoMap,
+        nettyPort,
+        jettyPort,
+        startTimeMs,
+        "",
+        "");
+  }
+
+  public ServerNode(
+      String id,
+      String ip,
+      int grpcPort,
+      long usedMemory,
+      long preAllocatedMemory,
+      long availableMemory,
+      int eventNumInFlush,
+      Set<String> tags,
+      ServerStatus status,
+      Map<String, StorageInfo> storageInfoMap,
+      int nettyPort,
+      int jettyPort,
+      long startTimeMs,
+      String version,
+      String gitCommitId) {
     this.id = id;
     this.ip = ip;
     this.grpcPort = grpcPort;
@@ -183,6 +219,8 @@ public class ServerNode implements Comparable<ServerNode> {
       this.jettyPort = jettyPort;
     }
     this.startTimeMs = startTimeMs;
+    this.version = version;
+    this.gitCommitId = gitCommitId;
   }
 
   public ShuffleServerId convertToGrpcProto() {
@@ -265,13 +303,16 @@ public class ServerNode implements Comparable<ServerNode> 
{
         + eventNumInFlush
         + "], timestamp["
         + timestamp
-        + "], tags"
+        + "], tags["
         + tags.toString()
-        + ""
-        + ", status["
+        + "], status["
         + status
         + "], storages[num="
         + storageInfo.size()
+        + "], version["
+        + version
+        + "], gitCommitId["
+        + storageInfo.size()
         + "]";
   }
 
@@ -326,4 +367,8 @@ public class ServerNode implements Comparable<ServerNode> {
   public long getStartTimeMs() {
     return startTimeMs;
   }
+
+  public String getGitCommitId() {
+    return gitCommitId;
+  }
 }
diff --git 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java
 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java
index b0b16b424..3c27b8d89 100644
--- 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java
+++ 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java
@@ -356,6 +356,9 @@ public class SimpleClusterManager implements ClusterManager 
{
 
   @Override
   public List<ServerNode> list() {
+    for (Map.Entry<String, ServerNode> entry : servers.entrySet()) {
+      ServerNode server = entry.getValue();
+    }
     return Lists.newArrayList(servers.values());
   }
 
diff --git 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ApplicationResource.java
 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ApplicationResource.java
index 12558639a..88852a093 100644
--- 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ApplicationResource.java
+++ 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ApplicationResource.java
@@ -29,6 +29,8 @@ import org.apache.hbase.thirdparty.javax.ws.rs.Path;
 import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
 import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
 import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import org.apache.uniffle.common.web.resource.BaseResource;
 import org.apache.uniffle.common.web.resource.Response;
@@ -39,7 +41,7 @@ import org.apache.uniffle.coordinator.web.vo.UserAppNumVO;
 
 @Produces({MediaType.APPLICATION_JSON})
 public class ApplicationResource extends BaseResource {
-
+  private static final Logger LOG = 
LoggerFactory.getLogger(ApplicationResource.class);
   @Context protected ServletContext servletContext;
 
   @GET
@@ -90,7 +92,9 @@ public class ApplicationResource extends BaseResource {
                       userAppIdTimestampMap.getKey(),
                       appInfo.getAppId(),
                       appInfo.getUpdateTime(),
-                      appInfo.getRegistrationTime()));
+                      appInfo.getRegistrationTime(),
+                      appInfo.getVersion(),
+                      appInfo.getGitCommitId()));
             }
           }
           // Display is inverted by the submission time of the application.
diff --git 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/CoordinatorServerResource.java
 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/CoordinatorServerResource.java
index 788c22461..47500be18 100644
--- 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/CoordinatorServerResource.java
+++ 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/CoordinatorServerResource.java
@@ -30,6 +30,7 @@ import org.apache.hbase.thirdparty.javax.ws.rs.Produces;
 import org.apache.hbase.thirdparty.javax.ws.rs.core.Context;
 import org.apache.hbase.thirdparty.javax.ws.rs.core.MediaType;
 
+import org.apache.uniffle.common.ProjectConstants;
 import org.apache.uniffle.common.util.RssUtils;
 import org.apache.uniffle.common.util.ThreadUtils;
 import org.apache.uniffle.common.web.resource.BaseResource;
@@ -80,6 +81,8 @@ public class CoordinatorServerResource extends BaseResource {
               "serverPort", 
String.valueOf(coordinatorConf.getInteger("rss.rpc.server.port", 0)));
           coordinatorServerInfo.put(
               "serverWebPort", 
String.valueOf(coordinatorConf.get(JETTY_HTTP_PORT)));
+          coordinatorServerInfo.put("version", ProjectConstants.VERSION);
+          coordinatorServerInfo.put("gitCommitId", 
ProjectConstants.getGitCommitId());
           return coordinatorServerInfo;
         });
   }
diff --git 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/web/vo/AppInfoVO.java
 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/web/vo/AppInfoVO.java
index 3d80f0e01..0c8ba9f38 100644
--- 
a/coordinator/src/main/java/org/apache/uniffle/coordinator/web/vo/AppInfoVO.java
+++ 
b/coordinator/src/main/java/org/apache/uniffle/coordinator/web/vo/AppInfoVO.java
@@ -24,12 +24,22 @@ public class AppInfoVO implements Comparable<AppInfoVO> {
   private String appId;
   private long updateTime;
   private long registrationTime;
+  private String version;
+  private String gitCommitId;
 
-  public AppInfoVO(String userName, String appId, long updateTime, long 
registrationTime) {
+  public AppInfoVO(
+      String userName,
+      String appId,
+      long updateTime,
+      long registrationTime,
+      String version,
+      String gitCommitId) {
     this.userName = userName;
     this.appId = appId;
     this.updateTime = updateTime;
     this.registrationTime = registrationTime;
+    this.version = version;
+    this.gitCommitId = gitCommitId;
   }
 
   public String getUserName() {
@@ -64,6 +74,14 @@ public class AppInfoVO implements Comparable<AppInfoVO> {
     this.registrationTime = registrationTime;
   }
 
+  public String getVersion() {
+    return version;
+  }
+
+  public String getGitCommitId() {
+    return gitCommitId;
+  }
+
   @Override
   public int compareTo(AppInfoVO appInfoVO) {
     return Long.compare(registrationTime, appInfoVO.getRegistrationTime());
diff --git 
a/coordinator/src/test/java/org/apache/uniffle/coordinator/QuotaManagerTest.java
 
b/coordinator/src/test/java/org/apache/uniffle/coordinator/QuotaManagerTest.java
index 54c0f9b47..201827ad2 100644
--- 
a/coordinator/src/test/java/org/apache/uniffle/coordinator/QuotaManagerTest.java
+++ 
b/coordinator/src/test/java/org/apache/uniffle/coordinator/QuotaManagerTest.java
@@ -226,7 +226,7 @@ public class QuotaManagerTest {
       if (appInfo != null) {
         appInfo.setUpdateTime(currentTimeMs);
       } else {
-        appInfo = new AppInfo(appId, currentTimeMs, currentTimeMs);
+        appInfo = new AppInfo(appId, currentTimeMs, currentTimeMs, "", "");
         uuidAndTime.put(appId, appInfo);
       }
     }
diff --git a/dashboard/src/main/webapp/src/pages/ApplicationPage.vue 
b/dashboard/src/main/webapp/src/pages/ApplicationPage.vue
index ac2b99392..9621dd05c 100644
--- a/dashboard/src/main/webapp/src/pages/ApplicationPage.vue
+++ b/dashboard/src/main/webapp/src/pages/ApplicationPage.vue
@@ -69,6 +69,16 @@
           :formatter="dateFormatter"
           sortable
         />
+        <el-table-column
+          prop="version"
+          label="Version"
+          min-width="180"
+        />
+        <el-table-column
+          prop="gitCommitId"
+          label="GitCommitId"
+          min-width="180"
+        />
       </el-table>
     </div>
   </div>
diff --git a/dashboard/src/main/webapp/src/pages/CoordinatorServerPage.vue 
b/dashboard/src/main/webapp/src/pages/CoordinatorServerPage.vue
index 4e9efbd2a..fb82ad740 100644
--- a/dashboard/src/main/webapp/src/pages/CoordinatorServerPage.vue
+++ b/dashboard/src/main/webapp/src/pages/CoordinatorServerPage.vue
@@ -80,6 +80,28 @@
                 <el-button type="info" 
@click="handlerStacks">Stacks</el-button>
               </div>
             </el-descriptions-item>
+            <el-descriptions-item>
+              <template #label>
+                <div class="cell-item">
+                  <el-icon :style="iconStyle">
+                    <Wallet />
+                  </el-icon>
+                  Version
+                </div>
+              </template>
+              {{ pageData.serverInfo.version}}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template #label>
+                <div class="cell-item">
+                  <el-icon :style="iconStyle">
+                    <Wallet />
+                  </el-icon>
+                  Git CommitId
+                </div>
+              </template>
+              {{ pageData.serverInfo.gitCommitId}}
+            </el-descriptions-item>
           </el-descriptions>
         </div>
       </el-collapse-item>
diff --git a/dashboard/src/main/webapp/src/pages/serverstatus/NodeListPage.vue 
b/dashboard/src/main/webapp/src/pages/serverstatus/NodeListPage.vue
index db323ab98..5f898e36b 100644
--- a/dashboard/src/main/webapp/src/pages/serverstatus/NodeListPage.vue
+++ b/dashboard/src/main/webapp/src/pages/serverstatus/NodeListPage.vue
@@ -97,6 +97,8 @@
         </template>
       </el-table-column>
       <el-table-column prop="tags" label="Tags" min-width="140" />
+      <el-table-column prop="version" label="Version" min-width="140" />
+      <el-table-column prop="gitCommitId" label="GitCommitId" min-width="140" 
/>
       <el-table-column v-if="isShowRemove" label="Operations">
         <template v-slot:default="scope">
           <el-button size="small" type="danger" 
@click="showDeleteConfirm(scope.row)">
diff --git a/pom.xml b/pom.xml
index aa5605e15..f691a96d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -904,6 +904,21 @@
           <artifactId>build-helper-maven-plugin</artifactId>
           <version>1.10</version>
         </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>templating-maven-plugin</artifactId>
+          <version>1.0.0</version>
+        </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>buildnumber-maven-plugin</artifactId>
+          <version>1.4</version>
+        </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>properties-maven-plugin</artifactId>
+          <version>1.1.0</version>
+        </plugin>
 
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
diff --git a/proto/src/main/proto/Rss.proto b/proto/src/main/proto/Rss.proto
index eb7a82220..694a95ede 100644
--- a/proto/src/main/proto/Rss.proto
+++ b/proto/src/main/proto/Rss.proto
@@ -275,6 +275,8 @@ message ShuffleServerHeartBeatRequest {
   google.protobuf.BoolValue isHealthy = 7;
   optional ServerStatus status = 8;
   map<string, StorageInfo> storageInfo = 21; // mount point to storage info 
mapping.
+  optional string version = 22;
+  optional string gitCommitId = 23;
   optional int64 startTimeMs = 24;
 }
 
@@ -392,6 +394,8 @@ message AppHeartBeatResponse {
 message ApplicationInfoRequest {
   string appId = 1;
   string user = 2;
+  optional string version = 3;
+  optional string gitCommitId = 4;
 }
 
 message ApplicationInfoResponse {

Reply via email to