You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/10/13 09:10:11 UTC

[GitHub] [dolphinscheduler] rickchengx opened a new pull request, #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

rickchengx opened a new pull request, #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358

   <!--Thanks very much for contributing to Apache DolphinScheduler. Please review https://dolphinscheduler.apache.org/en-us/community/development/pull-request.html before opening a pull request.-->
   
   ## Purpose of the pull request
   
   * close: #12356 
   * bug version: 3.1.0, dev
   
   <!--(For example: This pull request adds checkstyle plugin).-->
   
   ## Brief change log
   
   get the k8s config from table `t_ds_cluster` instead of `t_ds_k8s`
   
   ## Verify this pull request
   
   the k8s task can be submitted successfully
   
   <img width="1118" alt="截屏2022-10-13 16 58 07" src="https://user-images.githubusercontent.com/38122586/195554651-9ecea98f-481b-4b76-abe8-76360ff6d89d.png">
   
   <img width="347" alt="截屏2022-10-13 17 02 15" src="https://user-images.githubusercontent.com/38122586/195554700-fd5e5323-a20d-4b82-9c30-019e0e41cd6c.png">
   
   
   


-- 
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


[GitHub] [dolphinscheduler] codecov-commenter commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1277325740

   # [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/12358?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#12358](https://codecov.io/gh/apache/dolphinscheduler/pull/12358?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fd02d20) into [dev](https://codecov.io/gh/apache/dolphinscheduler/commit/22103f975ebe3d3697c9173013356cab8548a1c6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (22103f9) will **decrease** coverage by `0.00%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head fd02d20 differs from pull request most recent head d5c5bd9. Consider uploading reports for the commit d5c5bd9 to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##                dev   #12358      +/-   ##
   ============================================
   - Coverage     38.92%   38.91%   -0.01%     
   - Complexity     4174     4175       +1     
   ============================================
     Files          1040     1040              
     Lines         38797    38757      -40     
     Branches       4462     4445      -17     
   ============================================
   - Hits          15102    15083      -19     
   + Misses        21926    21906      -20     
   + Partials       1769     1768       -1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dolphinscheduler/pull/12358?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...nscheduler/service/process/ProcessServiceImpl.java](https://codecov.io/gh/apache/dolphinscheduler/pull/12358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kb2xwaGluc2NoZWR1bGVyL3NlcnZpY2UvcHJvY2Vzcy9Qcm9jZXNzU2VydmljZUltcGwuamF2YQ==) | `31.90% <0.00%> (-0.05%)` | :arrow_down: |
   | [...eduler/api/dto/schedule/ScheduleCreateRequest.java](https://codecov.io/gh/apache/dolphinscheduler/pull/12358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2R0by9zY2hlZHVsZS9TY2hlZHVsZUNyZWF0ZVJlcXVlc3QuamF2YQ==) | `83.33% <0.00%> (-2.39%)` | :arrow_down: |
   | [...hinscheduler/service/storage/impl/HadoopUtils.java](https://codecov.io/gh/apache/dolphinscheduler/pull/12358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kb2xwaGluc2NoZWR1bGVyL3NlcnZpY2Uvc3RvcmFnZS9pbXBsL0hhZG9vcFV0aWxzLmphdmE=) | `15.94% <0.00%> (-0.73%)` | :arrow_down: |
   | [...he/dolphinscheduler/plugin/task/java/JavaTask.java](https://codecov.io/gh/apache/dolphinscheduler/pull/12358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci10YXNrLXBsdWdpbi9kb2xwaGluc2NoZWR1bGVyLXRhc2stamF2YS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZG9scGhpbnNjaGVkdWxlci9wbHVnaW4vdGFzay9qYXZhL0phdmFUYXNrLmphdmE=) | `58.50% <0.00%> (-0.69%)` | :arrow_down: |
   | [...lphinscheduler/api/dto/task/TaskCreateRequest.java](https://codecov.io/gh/apache/dolphinscheduler/pull/12358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2R0by90YXNrL1Rhc2tDcmVhdGVSZXF1ZXN0LmphdmE=) | `83.33% <0.00%> (-0.54%)` | :arrow_down: |
   | [.../apache/dolphinscheduler/common/utils/OSUtils.java](https://codecov.io/gh/apache/dolphinscheduler/pull/12358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3V0aWxzL09TVXRpbHMuamF2YQ==) | `33.93% <0.00%> (-0.40%)` | :arrow_down: |
   | [...uler/api/service/impl/DataAnalysisServiceImpl.java](https://codecov.io/gh/apache/dolphinscheduler/pull/12358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvaW1wbC9EYXRhQW5hbHlzaXNTZXJ2aWNlSW1wbC5qYXZh) | `81.66% <0.00%> (-0.31%)` | :arrow_down: |
   | [...heduler/api/service/impl/ResourcesServiceImpl.java](https://codecov.io/gh/apache/dolphinscheduler/pull/12358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvaW1wbC9SZXNvdXJjZXNTZXJ2aWNlSW1wbC5qYXZh) | `51.94% <0.00%> (-0.21%)` | :arrow_down: |
   | [...pache/dolphinscheduler/common/utils/DateUtils.java](https://codecov.io/gh/apache/dolphinscheduler/pull/12358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL3V0aWxzL0RhdGVVdGlscy5qYXZh) | `73.78% <0.00%> (-0.16%)` | :arrow_down: |
   | [...inscheduler/api/service/impl/UsersServiceImpl.java](https://codecov.io/gh/apache/dolphinscheduler/pull/12358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvaW1wbC9Vc2Vyc1NlcnZpY2VJbXBsLmphdmE=) | `70.55% <0.00%> (-0.05%)` | :arrow_down: |
   | ... and [17 more](https://codecov.io/gh/apache/dolphinscheduler/pull/12358/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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


[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1280198896

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=12358)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=CODE_SMELL)
   
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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


[GitHub] [dolphinscheduler] rickchengx commented on a diff in pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
rickchengx commented on code in PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#discussion_r996558897


##########
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:
   > It's better to write a sql rather than use `QueryWrapper`, and when the cluster is null here we might better return null rather than NPE?
   
   Hi, @ruanwenjun , thanks for the comment.
   
   1. I've changed `return cluster.getConfig();` to `return cluster == null ? null : cluster.getConfig();` to avoid the potential NPE.
   2. 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. 



-- 
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


[GitHub] [dolphinscheduler] ruanwenjun commented on a diff in pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on code in PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#discussion_r996388494


##########
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:
   It's better to write a sql rather than use `QueryWrapper`, and when the cluster is null here we might better return null rather than NPE?



-- 
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


[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1277339699

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=12358)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=CODE_SMELL)
   
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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


[GitHub] [dolphinscheduler] rickchengx commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
rickchengx commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1280166886

   > ![k8s](https://user-images.githubusercontent.com/100667564/195826044-f6c98363-014a-43e4-ae4b-b95f26a215d8.jpg)
   > 
   > It seems that the version iteration will load the k8s configuration from t_ds_k8s to t_ds_k8s_namespace and t_ds_cluster, but it has not been done yet
   
   Hi, @pandong2011 thanks for the comment.
   
   Actually, I dont quite understand the meaning of this doc...
   
   Do you know what is the usage of `t_ds_k8s`? During my test, it keeps empty.
   


-- 
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


[GitHub] [dolphinscheduler] rickchengx commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
rickchengx commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1278565568

   Hi, @kezhenxu94 , would you please help review this?


-- 
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


[GitHub] [dolphinscheduler] rickchengx commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
rickchengx commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1278750817

   > Hi. Did you check that t_ds_k8s is not used?
   
   Hi, @kezhenxu94 , thanks for the comment.
   
   * step 1: create cluster
   <img width="1456" alt="截屏2022-10-13 16 03 56" src="https://user-images.githubusercontent.com/38122586/195538282-f36e1fbd-fb2e-4867-8741-7913d2c4f4d4.png">
   
   * step 2: create k8s namespace
   <img width="1453" alt="截屏2022-10-13 16 04 01" src="https://user-images.githubusercontent.com/38122586/195538294-6107919b-24c1-4e5a-80d6-e0ab85bb38da.png">
   
   After my check, `t_ds_cluster` is inserted when creating cluster (step 1) and `t_ds_k8s_namespace` is inserted when creating k8s namespace (step 2).
   
   And `t_ds_k8s` is empty (this is also the reason of null exception because it tries to get config from an empty table).
   
   
   Furthermore, the k8s cluster info (including `k8s config`) is inserted to the table `t_ds_cluster` (not `t_ds_k8s`) as below:
   
   https://github.com/apache/dolphinscheduler/blob/1e792186d0b1e660dc2299b46827a46c59d393f6/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ClusterServiceImpl.java#L122-L126
   
   
   
   
   
   


-- 
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


[GitHub] [dolphinscheduler] rickchengx commented on a diff in pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
rickchengx commented on code in PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#discussion_r996558897


##########
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:
   > It's better to write a sql rather than use `QueryWrapper`, and when the cluster is null here we might better return null rather than NPE?
   
   Hi, @ruanwenjun , thanks for the comment.
   
   1. I've changed `return cluster.getConfig();` to `return cluster == null ? null : cluster.getConfig();` to avoid the potential NPE.
   2. 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. And this NPE bug will cause the user cannot submit k8s tasks. 



-- 
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


[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1280198590

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=12358)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=CODE_SMELL)
   
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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


[GitHub] [dolphinscheduler] danielfree commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
danielfree commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1283728295

   hi @caishunfeng @rickchengx  i also found out this bug and fixed it, need to point out that this pr's solution won't work because `cluster.getConfig();` result is not a valid kubeconfig yaml(it's the json string stored in that table), you have to use this:  `ClusterConfUtils.getK8sConfig(cluster.getConfig());` 
   
   the current change only succeeds to submit the task, but the kubeconfig is not valid so the ds-worker won't submit the job successfully.
   
   @rickchengx maybe you can submit a new pr for the change.


-- 
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


[GitHub] [dolphinscheduler] pandong2011 commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
pandong2011 commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1280265484

   > > ![k8s](https://user-images.githubusercontent.com/100667564/195826044-f6c98363-014a-43e4-ae4b-b95f26a215d8.jpg)
   > > It seems that the version iteration will load the k8s configuration from t_ds_k8s to t_ds_k8s_namespace and t_ds_cluster, but it has not been done yet
   > 
   > Hi, @pandong2011 thanks for the comment.
   > 
   > Actually, I dont quite understand the meaning of this doc...
   > 
   > Do you know what is the usage of `t_ds_k8s`? During my test, it keeps empty.
   
   It should be the configuration table of k8s, but I can't find any entry to write data into it. Combined with the documentation I found, this table should be deprecated in the future
   


-- 
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


[GitHub] [dolphinscheduler] caishunfeng merged pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
caishunfeng merged PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358


-- 
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


[GitHub] [dolphinscheduler] pandong2011 commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
pandong2011 commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1281065352

   > > > > ![k8s](https://user-images.githubusercontent.com/100667564/195826044-f6c98363-014a-43e4-ae4b-b95f26a215d8.jpg)
   > > > > It seems that the version iteration will load the k8s configuration from t_ds_k8s to t_ds_k8s_namespace and t_ds_cluster, but it has not been done yet
   > > > 
   > > > 
   > > > Hi, @pandong2011 thanks for the comment.
   > > > Actually, I dont quite understand the meaning of this doc...
   > > > Do you know what is the usage of `t_ds_k8s`? During my test, it keeps empty.
   > > 
   > > 
   > > It should be the configuration table of k8s, but I can't find any entry to write data into it. Combined with the documentation I found, this table should be deprecated in the future
   > 
   > It seems that the config of k8s cluster (E.g., `cluster_name` and `k8s_config`) is inserted to the table `t_ds_cluster` rather than `t_ds_k8s`
   
   Now yes, but the beginning should be to t_ds_k8s table to write data, do not know from which version to write data to t_ds_cluster table, but the query did not change, leaving a paragraph of vague text description


-- 
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


[GitHub] [dolphinscheduler] caishunfeng commented on a diff in pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

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

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


[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1277345559

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=12358)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=12358&resolved=false&types=CODE_SMELL)
   
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=12358&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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


[GitHub] [dolphinscheduler] pandong2011 commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
pandong2011 commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1278816967

   ![k8s](https://user-images.githubusercontent.com/100667564/195826044-f6c98363-014a-43e4-ae4b-b95f26a215d8.jpg)
   
   It seems that the version iteration will load the k8s configuration from t_ds_k8s to t_ds_k8s_namespace and t_ds_cluster, but it has not been done yet
   


-- 
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


[GitHub] [dolphinscheduler] kezhenxu94 commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1278650324

   Hi. Did you check that t_ds_k8s is not used?


-- 
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


[GitHub] [dolphinscheduler] rickchengx commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
rickchengx commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1280483560

   > > > ![k8s](https://user-images.githubusercontent.com/100667564/195826044-f6c98363-014a-43e4-ae4b-b95f26a215d8.jpg)
   > > > It seems that the version iteration will load the k8s configuration from t_ds_k8s to t_ds_k8s_namespace and t_ds_cluster, but it has not been done yet
   > > 
   > > 
   > > Hi, @pandong2011 thanks for the comment.
   > > Actually, I dont quite understand the meaning of this doc...
   > > Do you know what is the usage of `t_ds_k8s`? During my test, it keeps empty.
   > 
   > It should be the configuration table of k8s, but I can't find any entry to write data into it. Combined with the documentation I found, this table should be deprecated in the future
   
   It seems that the config of k8s cluster (E.g., `cluster_name` and `k8s_config`) is inserted to the table `t_ds_cluster` rather than `t_ds_k8s`


-- 
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


[GitHub] [dolphinscheduler] caishunfeng commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
caishunfeng commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1281854858

   > Now yes, but the beginning should be to t_ds_k8s table to write data, do not know from which version to write data to t_ds_cluster table, but the query did not change, leaving a paragraph of vague text description
   
   The k8s task plugin is just exist in 3.1.0, and the `t_ds_k8s` seems the old design, which was replaced with `t_ds_cluster`.


-- 
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


[GitHub] [dolphinscheduler] rickchengx commented on pull request #12358: [Fix-12356][k8s] fix the null exception when submitting k8s task plugin

Posted by GitBox <gi...@apache.org>.
rickchengx commented on PR #12358:
URL: https://github.com/apache/dolphinscheduler/pull/12358#issuecomment-1284094098

   
   > hi @caishunfeng @rickchengx i also found out this bug and fixed it, need to point out that this pr's solution won't work because `cluster.getConfig();` result is not a valid kubeconfig yaml(it's the json string stored in that table), you have to use this: `ClusterConfUtils.getK8sConfig(cluster.getConfig());`
   > 
   > the current change only succeeds to submit the task, but the kubeconfig is not valid so the ds-worker won't submit the job to k8s cluster successfully.
   > 
   > @rickchengx maybe you can submit a new pr for the change.
   
   Hi, @danielfree , thanks for the comment. I'll look into 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