You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "Radeity (via GitHub)" <gi...@apache.org> on 2023/07/04 08:59:54 UTC

[GitHub] [dolphinscheduler] Radeity commented on a diff in pull request #14448: [fix-#14447]The judgment in k8sUtils#getPodLog is not accurate

Radeity commented on code in PR #14448:
URL: https://github.com/apache/dolphinscheduler/pull/14448#discussion_r1251724234


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/K8sUtils.java:
##########
@@ -96,7 +96,7 @@ public String getPodLog(String jobName, String namespace) {
             String podName = null;
             for (Pod pod : podList) {
                 podName = pod.getMetadata().getName();
-                if (jobName.equals(podName.substring(0, pod.getMetadata().getName().lastIndexOf("-")))) {
+                if (podName.contains("-") && jobName.equals(podName.substring(0, podName.lastIndexOf("-")))) {

Review Comment:
   May I ask why you add this judgement which seems more strict, can you give an example about it?



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org