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

wenjun pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 457dafe3cc [Fix-17137][CLUSTER-MANAGE] Fix update time not effective 
(#17138)
457dafe3cc is described below

commit 457dafe3cc6cdf6b86e98f53590801757338bb45
Author: 小可耐 <[email protected]>
AuthorDate: Thu Apr 17 21:26:24 2025 +0800

    [Fix-17137][CLUSTER-MANAGE] Fix update time not effective (#17138)
---
 .../apache/dolphinscheduler/api/service/impl/ClusterServiceImpl.java    | 2 ++
 .../apache/dolphinscheduler/api/service/impl/ClusterServiceTest.java    | 1 +
 2 files changed, 3 insertions(+)

diff --git 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceImpl.java
 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceImpl.java
index bf4e3ac4d6..ab65a7cb53 100644
--- 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceImpl.java
+++ 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceImpl.java
@@ -25,6 +25,7 @@ import org.apache.dolphinscheduler.api.service.ClusterService;
 import org.apache.dolphinscheduler.api.utils.PageInfo;
 import org.apache.dolphinscheduler.common.constants.Constants;
 import org.apache.dolphinscheduler.common.utils.CodeGenerateUtils;
+import org.apache.dolphinscheduler.common.utils.DateUtils;
 import org.apache.dolphinscheduler.dao.entity.Cluster;
 import org.apache.dolphinscheduler.dao.entity.K8sNamespace;
 import org.apache.dolphinscheduler.dao.entity.User;
@@ -265,6 +266,7 @@ public class ClusterServiceImpl extends BaseServiceImpl 
implements ClusterServic
         clusterExist.setConfig(config);
         clusterExist.setName(name);
         clusterExist.setDescription(desc);
+        clusterExist.setUpdateTime(DateUtils.getCurrentDate());
         clusterMapper.updateById(clusterExist);
         return clusterExist;
     }
diff --git 
a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceTest.java
 
b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceTest.java
index 5733c2d480..addc8626a7 100644
--- 
a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceTest.java
+++ 
b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceTest.java
@@ -139,6 +139,7 @@ public class ClusterServiceTest {
         when(clusterMapper.queryByClusterCode(1L)).thenReturn(getCluster());
         Cluster cluster = clusterService.updateClusterByCode(adminUser, 1L, 
"testName", getConfig(), "test");
         assertNotNull(cluster);
+        assertNotNull(cluster.getUpdateTime());
     }
 
     @Test

Reply via email to