-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature-13763][K8S Task] collect real-time log #14379
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #14379 +/- ##
============================================
- Coverage 38.50% 38.48% -0.03%
- Complexity 4562 4564 +2
============================================
Files 1260 1260
Lines 43791 43828 +37
Branches 4829 4832 +3
============================================
+ Hits 16861 16866 +5
- Misses 25057 25089 +32
Partials 1873 1873
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hi, @caishunfeng , would you like to help review this PR? |
HI @Radeity , good job!
Maybe some fault tolerance work is needed here. For example, before getting pod logs, check the status of the current task pod? |
Hi @Gallardot, thanks very much for your comment and test!
Agree with you. I will add the status check to handle different pod status :D |
return null; | ||
} | ||
Pod driver = driverPod.get(0); | ||
Pod pod = podList.get(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if there will be multiple Pods. Maybe you should filter the latest pods based on when they were created?
When getting the pod list, maybe add jobname as a label filter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if there will be multiple Pods. Maybe you should filter the latest pods based on when they were created?
You are right, one job can launch multiple pods. For this scenario, I think it's better support to read logs from different pods in future PR, rather read from the latest one, WDYT?
When getting the pod list, maybe add jobname as a label filter?
The label value here is taskAppId
which can behave like a unique identifier of one job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. After the current PR merge, we create a new issue to track the issue
Hi, @Gallardot , I have added a check only for PENDING pod, do you have some other suggestions here? Lines 195 to 199 in 2f9d915
|
I think we can also add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
...c/main/java/org/apache/dolphinscheduler/plugin/task/api/am/KubernetesApplicationManager.java
Show resolved
Hide resolved
...c/main/java/org/apache/dolphinscheduler/plugin/task/api/am/KubernetesApplicationManager.java
Show resolved
Hide resolved
Hi, @Gallardot , I've made some changes based on your suggestions, please help review :D |
...k-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java
Show resolved
Hide resolved
...c/main/java/org/apache/dolphinscheduler/plugin/task/api/am/KubernetesApplicationManager.java
Show resolved
Hide resolved
Hi, @caishunfeng @SbloodyS , would you guys like to help double check? |
re-run the failed ci to find due to code bug or flaky test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
seems it still when I re run the CI, could you please take a look @Radeity |
SonarCloud Quality Gate failed.
|
* [Improvement-13763][K8S Task] collect real-time log * fix codesmell * get pod watcher until pod is ready * fix codesmell * specify container name & loop waiting pod creation * sleep when pod is not initialized --------- Co-authored-by: Jay Chung <zhongjiajie955@gmail.com>
* [Improvement-13763][K8S Task] collect real-time log * fix codesmell * get pod watcher until pod is ready * fix codesmell * specify container name & loop waiting pod creation * sleep when pod is not initialized --------- Co-authored-by: Jay Chung <zhongjiajie955@gmail.com> (cherry picked from commit 04800a4)
Purpose of the pull request
Brief change log
Verify this pull request