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/04/20 07:51:51 UTC
[GitHub] [dolphinscheduler] naziD opened a new pull request, #9622: BugFix: serialize the task definition failed
naziD opened a new pull request, #9622:
URL: https://github.com/apache/dolphinscheduler/pull/9622
Fix: #9608
--
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 #9622: [Bug-9608] Serialize the task definition failed
Posted by GitBox <gi...@apache.org>.
caishunfeng merged PR #9622:
URL: https://github.com/apache/dolphinscheduler/pull/9622
--
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 #9622: [Bug-9608] Serialize the task definition failed
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #9622:
URL: https://github.com/apache/dolphinscheduler/pull/9622#issuecomment-1104666500
# [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/9622?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 [#9622](https://codecov.io/gh/apache/dolphinscheduler/pull/9622?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e5d5f70) into [dev](https://codecov.io/gh/apache/dolphinscheduler/commit/9d11be447a2b830c944ac86e085168cca601facd?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d11be4) will **decrease** coverage by `0.04%`.
> The diff coverage is `66.66%`.
```diff
@@ Coverage Diff @@
## dev #9622 +/- ##
============================================
- Coverage 39.96% 39.92% -0.05%
- Complexity 4437 4462 +25
============================================
Files 832 835 +3
Lines 33351 33541 +190
Branches 3683 3707 +24
============================================
+ Hits 13328 13390 +62
- Misses 18792 18906 +114
- Partials 1231 1245 +14
```
| [Impacted Files](https://codecov.io/gh/apache/dolphinscheduler/pull/9622?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...he/dolphinscheduler/dao/entity/TaskDefinition.java](https://codecov.io/gh/apache/dolphinscheduler/pull/9622/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-ZG9scGhpbnNjaGVkdWxlci1kYW8vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvZGFvL2VudGl0eS9UYXNrRGVmaW5pdGlvbi5qYXZh) | `73.10% <66.66%> (+8.76%)` | :arrow_up: |
| [...lphinscheduler/api/controller/UsersController.java](https://codecov.io/gh/apache/dolphinscheduler/pull/9622/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-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvVXNlcnNDb250cm9sbGVyLmphdmE=) | `59.25% <0.00%> (-2.28%)` | :arrow_down: |
| [...er/api/controller/ProcessDefinitionController.java](https://codecov.io/gh/apache/dolphinscheduler/pull/9622/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-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvUHJvY2Vzc0RlZmluaXRpb25Db250cm9sbGVyLmphdmE=) | `45.34% <0.00%> (-2.22%)` | :arrow_down: |
| [...dolphinscheduler/remote/future/ResponseFuture.java](https://codecov.io/gh/apache/dolphinscheduler/pull/9622/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-ZG9scGhpbnNjaGVkdWxlci1yZW1vdGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvcmVtb3RlL2Z1dHVyZS9SZXNwb25zZUZ1dHVyZS5qYXZh) | `81.96% <0.00%> (-1.64%)` | :arrow_down: |
| [...api/service/impl/ProcessDefinitionServiceImpl.java](https://codecov.io/gh/apache/dolphinscheduler/pull/9622/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-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvaW1wbC9Qcm9jZXNzRGVmaW5pdGlvblNlcnZpY2VJbXBsLmphdmE=) | `31.07% <0.00%> (-0.67%)` | :arrow_down: |
| [...i/service/impl/ProcessTaskRelationServiceImpl.java](https://codecov.io/gh/apache/dolphinscheduler/pull/9622/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-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvaW1wbC9Qcm9jZXNzVGFza1JlbGF0aW9uU2VydmljZUltcGwuamF2YQ==) | `21.03% <0.00%> (-0.64%)` | :arrow_down: |
| [...scheduler/api/service/impl/ProjectServiceImpl.java](https://codecov.io/gh/apache/dolphinscheduler/pull/9622/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-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvaW1wbC9Qcm9qZWN0U2VydmljZUltcGwuamF2YQ==) | `77.12% <0.00%> (-0.54%)` | :arrow_down: |
| [...cheduler/api/service/impl/ExecutorServiceImpl.java](https://codecov.io/gh/apache/dolphinscheduler/pull/9622/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-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvaW1wbC9FeGVjdXRvclNlcnZpY2VJbXBsLmphdmE=) | `40.62% <0.00%> (-0.26%)` | :arrow_down: |
| [.../org/apache/dolphinscheduler/api/enums/Status.java](https://codecov.io/gh/apache/dolphinscheduler/pull/9622/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-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2VudW1zL1N0YXR1cy5qYXZh) | `100.00% <0.00%> (ø)` | |
| [...ache/dolphinscheduler/dao/entity/K8sNamespace.java](https://codecov.io/gh/apache/dolphinscheduler/pull/9622/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-ZG9scGhpbnNjaGVkdWxlci1kYW8vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvZGFvL2VudGl0eS9LOHNOYW1lc3BhY2UuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| ... and [13 more](https://codecov.io/gh/apache/dolphinscheduler/pull/9622/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) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/9622?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/9622?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9d11be4...e5d5f70](https://codecov.io/gh/apache/dolphinscheduler/pull/9622?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] naziD commented on a diff in pull request #9622: BugFix: serialize the task definition failed
Posted by GitBox <gi...@apache.org>.
naziD commented on code in PR #9622:
URL: https://github.com/apache/dolphinscheduler/pull/9622#discussion_r854736647
##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskDefinition.java:
##########
@@ -309,9 +309,18 @@ public void setTaskParamMap(Map<String, String> taskParamMap) {
public Map<String, String> getTaskParamMap() {
if (taskParamMap == null && StringUtils.isNotEmpty(taskParams)) {
JsonNode localParams = JSONUtils.parseObject(taskParams).findValue("localParams");
- if (localParams != null) {
+
+ //If a jsonNode is null, not only use !=null, but also it should use the isNull method to be estimated.
+ if (localParams != null && !localParams.isNull()) {
List<Property> propList = JSONUtils.toList(localParams.toString(), Property.class);
- taskParamMap = propList.stream().collect(Collectors.toMap(Property::getProp, Property::getValue));
+
+ if (CollectionUtils.isNotEmpty(propList)) {
+ taskParamMap = new HashMap<>();
+ // Don't use java 8 stream to convert map, because the value will probably null,and it will cause the NullPointException.
Review Comment:
> I think this comment is unnecessary. It should be removed.
It's done
--
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] SbloodyS commented on a diff in pull request #9622: BugFix: serialize the task definition failed
Posted by GitBox <gi...@apache.org>.
SbloodyS commented on code in PR #9622:
URL: https://github.com/apache/dolphinscheduler/pull/9622#discussion_r853971064
##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskDefinition.java:
##########
@@ -309,9 +309,18 @@ public void setTaskParamMap(Map<String, String> taskParamMap) {
public Map<String, String> getTaskParamMap() {
if (taskParamMap == null && StringUtils.isNotEmpty(taskParams)) {
JsonNode localParams = JSONUtils.parseObject(taskParams).findValue("localParams");
- if (localParams != null) {
+
+ //If a jsonNode is null, not only use !=null, but also it should use the isNull method to be estimated.
+ if (localParams != null && !localParams.isNull()) {
List<Property> propList = JSONUtils.toList(localParams.toString(), Property.class);
- taskParamMap = propList.stream().collect(Collectors.toMap(Property::getProp, Property::getValue));
+
+ if (CollectionUtils.isNotEmpty(propList)) {
+ taskParamMap = new HashMap<>();
+ // Don't use java 8 stream to convert map, because the value will probably null,and it will cause the NullPointException.
Review Comment:
I think this comment is unnecessary. It should be removed.
--
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 #9622: [Bug-9608] Serialize the task definition failed
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #9622:
URL: https://github.com/apache/dolphinscheduler/pull/9622#issuecomment-1104669647
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=9622)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=9622&metric=new_coverage&view=list) [84.6% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=9622&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=9622&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=9622&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] sonarcloud[bot] commented on pull request #9622: BugFix: serialize the task definition failed
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #9622:
URL: https://github.com/apache/dolphinscheduler/pull/9622#issuecomment-1103636598
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=9622)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=9622&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=9622&metric=new_coverage&view=list) [39.3% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=9622&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=9622&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=9622&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] naziD commented on a diff in pull request #9622: BugFix: serialize the task definition failed
Posted by GitBox <gi...@apache.org>.
naziD commented on code in PR #9622:
URL: https://github.com/apache/dolphinscheduler/pull/9622#discussion_r854735259
##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskDefinition.java:
##########
@@ -309,9 +309,18 @@ public void setTaskParamMap(Map<String, String> taskParamMap) {
public Map<String, String> getTaskParamMap() {
if (taskParamMap == null && StringUtils.isNotEmpty(taskParams)) {
JsonNode localParams = JSONUtils.parseObject(taskParams).findValue("localParams");
- if (localParams != null) {
+
+ //If a jsonNode is null, not only use !=null, but also it should use the isNull method to be estimated.
+ if (localParams != null && !localParams.isNull()) {
List<Property> propList = JSONUtils.toList(localParams.toString(), Property.class);
- taskParamMap = propList.stream().collect(Collectors.toMap(Property::getProp, Property::getValue));
+
+ if (CollectionUtils.isNotEmpty(propList)) {
+ taskParamMap = new HashMap<>();
+ // Don't use java 8 stream to convert map, because the value will probably null,and it will cause the NullPointException.
Review Comment:
>
It should be emphasized that the latter deployer don't use stream to convert the map . The key reason of this issue is caused by 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
[GitHub] [dolphinscheduler] caishunfeng commented on pull request #9622: [Bug-9608] Serialize the task definition failed
Posted by GitBox <gi...@apache.org>.
caishunfeng commented on PR #9622:
URL: https://github.com/apache/dolphinscheduler/pull/9622#issuecomment-1104674730
Thanks for your contribution @naziD
--
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