You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "wustlz (via GitHub)" <gi...@apache.org> on 2024/03/06 03:47:40 UTC
[PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
wustlz opened a new pull request, #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677
<!--Thanks very much for contributing to Apache DolphinScheduler, we are happy that you want to help us improve DolphinScheduler! -->
## Purpose of the pull request
Fix the NullPointerException when "start param to overwrite global param"
## Brief change log
Add a "containsKey" judgement when "start param to overwrite global param"
## Verify this pull request
This pull request is code cleanup without any test coverage.
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#issuecomment-1994106147
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677) **Quality Gate failed**
Failed conditions
 [B Maintainability Rating on New Code](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677) (required ≥ A)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#issuecomment-1999246865
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15677&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15677&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=15677&resolved=false&inNewCodePeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15677&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15677&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677)
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "wustlz (via GitHub)" <gi...@apache.org>.
wustlz closed pull request #15677: Fix the NullPointerException when "start param to overwrite global param"
URL: https://github.com/apache/dolphinscheduler/pull/15677
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#issuecomment-1996285020
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15677&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15677&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=15677&resolved=false&inNewCodePeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15677&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15677&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677)
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "rickchengx (via GitHub)" <gi...@apache.org>.
rickchengx commented on PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#issuecomment-1980127798
@wustlz please rebase your PR and link this to an issue
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on code in PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#discussion_r1515591013
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java:
##########
@@ -601,9 +601,11 @@ public void setGlobalParamIfCommanded(ProcessDefinition processDefinition, Map<S
if (MapUtils.isNotEmpty(startParamMap) && globalMap != null) {
// start param to overwrite global param
for (Map.Entry<String, String> param : globalMap.entrySet()) {
- String val = startParamMap.get(param.getKey()).getValue();
- if (val != null) {
- param.setValue(val);
+ if (startParamMap.containsKey(param.getKey())) {
+ String val = startParamMap.get(param.getKey()).getValue();
+ if (val != null) {
+ param.setValue(val);
+ }
Review Comment:
Thanks for your PR, please add UT for this case.
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "wustlz (via GitHub)" <gi...@apache.org>.
wustlz commented on PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#issuecomment-1990953622
> @wustlz overall LGTM, please Run 'mvn spotless:apply' to fix the code style
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "wustlz (via GitHub)" <gi...@apache.org>.
wustlz commented on code in PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#discussion_r1520799603
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java:
##########
@@ -601,9 +601,11 @@ public void setGlobalParamIfCommanded(ProcessDefinition processDefinition, Map<S
if (MapUtils.isNotEmpty(startParamMap) && globalMap != null) {
// start param to overwrite global param
for (Map.Entry<String, String> param : globalMap.entrySet()) {
- String val = startParamMap.get(param.getKey()).getValue();
- if (val != null) {
- param.setValue(val);
+ if (startParamMap.containsKey(param.getKey())) {
+ String val = startParamMap.get(param.getKey()).getValue();
+ if (val != null) {
+ param.setValue(val);
+ }
Review Comment:
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "wustlz (via GitHub)" <gi...@apache.org>.
wustlz commented on PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#issuecomment-1980190926
> @wustlz please rebase your PR and link this to an issue
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on code in PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#discussion_r1515591013
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java:
##########
@@ -601,9 +601,11 @@ public void setGlobalParamIfCommanded(ProcessDefinition processDefinition, Map<S
if (MapUtils.isNotEmpty(startParamMap) && globalMap != null) {
// start param to overwrite global param
for (Map.Entry<String, String> param : globalMap.entrySet()) {
- String val = startParamMap.get(param.getKey()).getValue();
- if (val != null) {
- param.setValue(val);
+ if (startParamMap.containsKey(param.getKey())) {
+ String val = startParamMap.get(param.getKey()).getValue();
+ if (val != null) {
+ param.setValue(val);
+ }
Review Comment:
Please add UT for this case.
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#issuecomment-1996284449
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15677&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15677&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=15677&resolved=false&inNewCodePeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15677&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15677&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677)
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#issuecomment-1999245162
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15677&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15677&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=15677&resolved=false&inNewCodePeriod=true)
 [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15677&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15677&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677)
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#issuecomment-1994103847
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677) **Quality Gate failed**
Failed conditions
 [B Maintainability Rating on New Code](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677) (required ≥ A)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15677)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677#issuecomment-1996279943
## [Codecov](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15677?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `80.00000%` with `1 lines` in your changes are missing coverage. Please review.
> Project coverage is 39.06%. Comparing base [(`738da1c`)](https://app.codecov.io/gh/apache/dolphinscheduler/commit/738da1cda3731543cdec61c249a051fbc99da929?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`532355d`)](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15677?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> :exclamation: Current head 532355d differs from pull request most recent head b7d1c73. Consider uploading reports for the commit b7d1c73 to get more accurate results
| [Files](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15677?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...nscheduler/service/process/ProcessServiceImpl.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15677?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZG9scGhpbnNjaGVkdWxlci1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kb2xwaGluc2NoZWR1bGVyL3NlcnZpY2UvcHJvY2Vzcy9Qcm9jZXNzU2VydmljZUltcGwuamF2YQ==) | 80.00% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15677?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## dev #15677 +/- ##
=========================================
Coverage 39.05% 39.06%
- Complexity 4845 4848 +3
=========================================
Files 1316 1316
Lines 45011 44977 -34
Branches 4818 4795 -23
=========================================
- Hits 17581 17571 -10
+ Misses 25524 25497 -27
- Partials 1906 1909 +3
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15677?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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
Re: [PR] Fix the NullPointerException when "start param to overwrite global param" [dolphinscheduler]
Posted by "rickchengx (via GitHub)" <gi...@apache.org>.
rickchengx merged PR #15677:
URL: https://github.com/apache/dolphinscheduler/pull/15677
--
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