You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "LiJie20190102 (via GitHub)" <gi...@apache.org> on 2023/04/06 06:02:37 UTC
[GitHub] [dolphinscheduler] LiJie20190102 opened a new pull request, #13878: [Fix-13596][Task Instance] Throw an error message to tell the user that the file cannot be found instead of NPE during task execution
LiJie20190102 opened a new pull request, #13878:
URL: https://github.com/apache/dolphinscheduler/pull/13878
…at the file cannot be found instead of NPE during task execution
<!--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
Throw an error message to tell the user that the file cannot be found instead of NPE during task execution.
fix: https://github.com/apache/dolphinscheduler/issues/13596
## Brief change log
modify: org.apache.dolphinscheduler.service.process.ProcessServiceImpl#updateTaskDefinitionResources
modify: org.apache.dolphinscheduler.service.process.ProcessServiceImpl#updateResourceInfo
## Verify this pull request
<!--*(Please pick either of the following options)*-->
This pull request is code cleanup without any test coverage.
*(or)*
This pull request is already covered by existing tests, such as *(please describe tests)*.
(or)
This change added tests and can be verified as follows:
if contains mainJar field:

if contains resourceList information:

(or)
If your pull request contain incompatible change, you should also add it to `docs/docs/en/guide/upgrede/incompatible.md`
--
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 #13878: [Fix-13596][Task Instance] Throw an error message to tell the user that the file cannot be found instead of NPE during task execution
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13878:
URL: https://github.com/apache/dolphinscheduler/pull/13878#issuecomment-1498560694
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=13878)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=BUG) [3 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=VULNERABILITY) [9 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=CODE_SMELL) [674 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13878&metric=new_coverage&view=list) [30.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13878&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13878&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13878&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 #13878: [Fix-13596][Task Instance] Throw an error message to tell the user that the file cannot be found instead of NPE during task execution
Posted by "rickchengx (via GitHub)" <gi...@apache.org>.
rickchengx commented on code in PR #13878:
URL: https://github.com/apache/dolphinscheduler/pull/13878#discussion_r1160381486
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java:
##########
@@ -1810,6 +1808,10 @@ private ResourceInfo updateResourceInfo(ResourceInfo res) {
resourceInfo = new ResourceInfo();
// get resource from database, only one resource should be returned
Resource resource = getResourceById(resourceId);
+ if (Objects.isNull(resource)) {
Review Comment:
Hi, @LiJie20190102 , May I ask is there any other place that needs to check if the resource is null like 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] sonarcloud[bot] commented on pull request #13878: [Fix-13596][Task Instance] Throw an error message to tell the user that the file cannot be found instead of NPE during task execution
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13878:
URL: https://github.com/apache/dolphinscheduler/pull/13878#issuecomment-1498561076
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=13878)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=BUG) [3 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=VULNERABILITY) [9 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=CODE_SMELL) [674 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13878&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13878&metric=new_coverage&view=list) [30.1% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13878&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13878&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13878&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] codecov-commenter commented on pull request #13878: [Fix-13596][Task Instance] Throw an error message to tell the user that the file cannot be found instead of NPE during task execution
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #13878:
URL: https://github.com/apache/dolphinscheduler/pull/13878#issuecomment-1498552982
## [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/13878?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> :exclamation: No coverage uploaded for pull request base (`3.1.6-prepare@daabcda`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#section-missing-base-commit).
> The diff coverage is `n/a`.
> :exclamation: Current head 191bf19 differs from pull request most recent head 6e24531. Consider uploading reports for the commit 6e24531 to get more accurate results
```diff
@@ Coverage Diff @@
## 3.1.6-prepare #13878 +/- ##
================================================
Coverage ? 38.14%
Complexity ? 3963
================================================
Files ? 999
Lines ? 36827
Branches ? 4248
================================================
Hits ? 14047
Misses ? 21167
Partials ? 1613
```
: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] SbloodyS merged pull request #13878: [Fix-13596][Task Instance] Throw an error message to tell the user that the file cannot be found instead of NPE during task execution
Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS merged PR #13878:
URL: https://github.com/apache/dolphinscheduler/pull/13878
--
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] github-code-scanning[bot] commented on pull request #13878: [Fix-13596][Task Instance] Throw an error message to tell the user that the file cannot be found instead of NPE during task execution
Posted by "github-code-scanning[bot] (via GitHub)" <gi...@apache.org>.
github-code-scanning[bot] commented on PR #13878:
URL: https://github.com/apache/dolphinscheduler/pull/13878#issuecomment-1498560730
You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository [Security tab](/apache/dolphinscheduler/security/code-scanning?query=pr%3A13878+tool%3ASonarCloud+is%3Aopen).
--
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] LiJie20190102 commented on pull request #13878: [Fix-13596][Task Instance] Throw an error message to tell the user that the file cannot be found instead of NPE during task execution
Posted by "LiJie20190102 (via GitHub)" <gi...@apache.org>.
LiJie20190102 commented on PR #13878:
URL: https://github.com/apache/dolphinscheduler/pull/13878#issuecomment-1498536994
Closed PR: #13683
--
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