You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "fuchanghai (via GitHub)" <gi...@apache.org> on 2023/07/04 11:31:18 UTC
[GitHub] [dolphinscheduler] fuchanghai commented on a diff in pull request #14448: [fix-#14447]The judgment in k8sUtils#getPodLog is not accurate
fuchanghai commented on code in PR #14448:
URL: https://github.com/apache/dolphinscheduler/pull/14448#discussion_r1251902347
##########
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:
hi @Radeity because some pods may also run in the same namespace as the pods created by DS. Therefore, the naming rules for pods may not necessarily be the same as those generated by DS.
--
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