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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]