You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "liqingwang (via GitHub)" <gi...@apache.org> on 2023/03/31 09:34:00 UTC
[GitHub] [dolphinscheduler] liqingwang opened a new pull request, #13841: [Bug] [Cron] Parse corn expression error
liqingwang opened a new pull request, #13841:
URL: https://github.com/apache/dolphinscheduler/pull/13841
- close #13840
--
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] alextinng commented on pull request #13841: [Bug] [Cron] Parse corn expression error
Posted by "alextinng (via GitHub)" <gi...@apache.org>.
alextinng commented on PR #13841:
URL: https://github.com/apache/dolphinscheduler/pull/13841#issuecomment-1492806666
It's true that validating a cron expression depends on wether an exception occur is not precise, however, we can still narrow the search,according to the method comment, an IllegalArgumentException is thrown if expression is wrong, so catch IllegalArgumentException rather than Exception is a better idea.
/**
* Parse string with cron expression.
*
* @param expression - cron expression, never null
* @return Cron instance, corresponding to cron expression received
* @throws java.lang.IllegalArgumentException if expression does not match cron definition
*/
public Cron parse(final String expression) {
......
}
--
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 #13841: [Bug] [Cron] Parse corn expression error
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #13841:
URL: https://github.com/apache/dolphinscheduler/pull/13841#issuecomment-1498450319
## [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?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 [#13841](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5c35e9e) into [dev](https://codecov.io/gh/apache/dolphinscheduler/commit/8f3a23dae5c4cf1fda239d7c35bcc57c76236f1d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8f3a23d) will **decrease** coverage by `0.22%`.
> The diff coverage is `11.68%`.
> :exclamation: Current head 5c35e9e differs from pull request most recent head 3944085. Consider uploading reports for the commit 3944085 to get more accurate results
```diff
@@ Coverage Diff @@
## dev #13841 +/- ##
============================================
- Coverage 39.14% 38.92% -0.22%
+ Complexity 4467 4454 -13
============================================
Files 1155 1157 +2
Lines 42288 42371 +83
Branches 4761 4773 +12
============================================
- Hits 16553 16494 -59
- Misses 23924 24061 +137
- Partials 1811 1816 +5
```
| [Impacted Files](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...org/apache/dolphinscheduler/alert/AlertServer.java](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hbGVydC9kb2xwaGluc2NoZWR1bGVyLWFsZXJ0LXNlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZG9scGhpbnNjaGVkdWxlci9hbGVydC9BbGVydFNlcnZlci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...hinscheduler/alert/metrics/AlertServerMetrics.java](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hbGVydC9kb2xwaGluc2NoZWR1bGVyLWFsZXJ0LXNlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZG9scGhpbnNjaGVkdWxlci9hbGVydC9tZXRyaWNzL0FsZXJ0U2VydmVyTWV0cmljcy5qYXZh) | `0.00% <ø> (ø)` | |
| [...phinscheduler/alert/plugin/AlertPluginManager.java](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hbGVydC9kb2xwaGluc2NoZWR1bGVyLWFsZXJ0LXNlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZG9scGhpbnNjaGVkdWxlci9hbGVydC9wbHVnaW4vQWxlcnRQbHVnaW5NYW5hZ2VyLmphdmE=) | `2.43% <0.00%> (ø)` | |
| [...inscheduler/alert/registry/AlertHeartbeatTask.java](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hbGVydC9kb2xwaGluc2NoZWR1bGVyLWFsZXJ0LXNlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZG9scGhpbnNjaGVkdWxlci9hbGVydC9yZWdpc3RyeS9BbGVydEhlYXJ0YmVhdFRhc2suamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...nscheduler/alert/registry/AlertRegistryClient.java](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hbGVydC9kb2xwaGluc2NoZWR1bGVyLWFsZXJ0LXNlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZG9scGhpbnNjaGVkdWxlci9hbGVydC9yZWdpc3RyeS9BbGVydFJlZ2lzdHJ5Q2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...phinscheduler/alert/rpc/AlertRequestProcessor.java](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hbGVydC9kb2xwaGluc2NoZWR1bGVyLWFsZXJ0LXNlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZG9scGhpbnNjaGVkdWxlci9hbGVydC9ycGMvQWxlcnRSZXF1ZXN0UHJvY2Vzc29yLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...che/dolphinscheduler/alert/rpc/AlertRpcServer.java](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hbGVydC9kb2xwaGluc2NoZWR1bGVyLWFsZXJ0LXNlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZG9scGhpbnNjaGVkdWxlci9hbGVydC9ycGMvQWxlcnRScGNTZXJ2ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...er/api/service/impl/MetricsCleanUpServiceImpl.java](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvaW1wbC9NZXRyaWNzQ2xlYW5VcFNlcnZpY2VJbXBsLmphdmE=) | `14.28% <0.00%> (ø)` | |
| [...api/service/impl/ProcessDefinitionServiceImpl.java](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?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=) | `35.09% <0.00%> (ø)` | |
| [...e/dolphinscheduler/common/constants/Constants.java](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL2NvbnN0YW50cy9Db25zdGFudHMuamF2YQ==) | `75.00% <ø> (ø)` | |
| ... and [44 more](https://codecov.io/gh/apache/dolphinscheduler/pull/13841?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
... and [2 files with indirect coverage changes](https://codecov.io/gh/apache/dolphinscheduler/pull/13841/indirect-changes?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 #13841: [Bug] [Cron] Parse corn expression error
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13841:
URL: https://github.com/apache/dolphinscheduler/pull/13841#issuecomment-1498452790
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=13841)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13841&metric=new_coverage&view=list) [50.0% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13841&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13841&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13841&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 #13841: [Bug] [Cron] Parse corn expression error
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13841:
URL: https://github.com/apache/dolphinscheduler/pull/13841#issuecomment-1498446160
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=13841)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=13841&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13841&metric=new_coverage&view=list) [50.0% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13841&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13841&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=13841&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] caishunfeng merged pull request #13841: [Bug] [Cron] Parse corn expression error
Posted by "caishunfeng (via GitHub)" <gi...@apache.org>.
caishunfeng merged PR #13841:
URL: https://github.com/apache/dolphinscheduler/pull/13841
--
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] liqingwang commented on pull request #13841: [Bug] [Cron] Parse corn expression error
Posted by "liqingwang (via GitHub)" <gi...@apache.org>.
liqingwang commented on PR #13841:
URL: https://github.com/apache/dolphinscheduler/pull/13841#issuecomment-1493703841
> It's true that validating a cron expression depends on wether an exception occur is not precise, however, we can still narrow the search,according to the method comment, an IllegalArgumentException is thrown if expression is wrong, so catch IllegalArgumentException rather than Exception is a better idea.
>
> ```
> /**
> * Parse string with cron expression.
> *
> * @param expression - cron expression, never null
> * @return Cron instance, corresponding to cron expression received
> * @throws java.lang.IllegalArgumentException if expression does not match cron definition
> */
> public Cron parse(final String expression) {
> ......
> }
> ```
Thanks for your advice, updated
--
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