caishunfeng commented on code in PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#discussion_r997749818


##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java:
##########
@@ -3169,10 +3169,11 @@ public String findConfigYamlByName(String clusterName) {
         if (Strings.isNullOrEmpty(clusterName)) {
             return null;
         }
-        QueryWrapper<K8s> nodeWrapper = new QueryWrapper<>();
-        nodeWrapper.eq("k8s_name", clusterName);
-        K8s k8s = k8sMapper.selectOne(nodeWrapper);
-        return k8s.getK8sConfig();
+
+        QueryWrapper<Cluster> nodeWrapper = new QueryWrapper<>();
+        nodeWrapper.eq("name", clusterName);
+        Cluster cluster = clusterMapper.selectOne(nodeWrapper);
+        return cluster.getConfig();

Review Comment:
   >As for writing a SQL rather than using QueryWrapper, maybe we could do it 
in another PR? Since QueryWrapper is also used in many other places. Maybe we 
should fix this bug first since this NPE bug will cause the user cannot submit 
k8s tasks.
   
   Hi @rickchengx do you want to do it in another pr?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to