You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/10/20 01:57:56 UTC
[GitHub] [shardingsphere-elasticjob] gzdzss opened a new pull request #1617: Fix spring namespace example for job-error-handler
gzdzss opened a new pull request #1617:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1617
Fixes #1607.
Changes proposed in this pull request:
- [ ] Spring boot starter
- [x] Spring namespace
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob] codecov-io commented on pull request #1617: Fix spring namespace example for job-error-handler
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1617:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1617#issuecomment-712561732
# [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=h1) Report
> Merging [#1617](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=desc) into [master](https://codecov.io/gh/apache/shardingsphere-elasticjob/commit/695bc2cd21b8450d79349bb07c7eaa1ba42d3493?el=desc) will **decrease** coverage by `0.05%`.
> The diff coverage is `100.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617/graphs/tree.svg?width=650&height=150&src=pr&token=8ZMVc4Yo4Z)](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1617 +/- ##
============================================
- Coverage 85.38% 85.33% -0.06%
Complexity 105 105
============================================
Files 253 253
Lines 5657 5658 +1
Branches 878 879 +1
============================================
- Hits 4830 4828 -2
- Misses 511 512 +1
- Partials 316 318 +2
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [.../namespace/job/parser/JobBeanDefinitionParser.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1zcHJpbmcvZWxhc3RpY2pvYi1saXRlLXNwcmluZy1uYW1lc3BhY2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VsYXN0aWNqb2IvbGl0ZS9zcHJpbmcvbmFtZXNwYWNlL2pvYi9wYXJzZXIvSm9iQmVhbkRlZmluaXRpb25QYXJzZXIuamF2YQ==) | `100.00% <100.00%> (ø)` | `1.00 <0.00> (ø)` | |
| [...e/shardingsphere/elasticjob/infra/env/IpUtils.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9lbnYvSXBVdGlscy5qYXZh) | `60.00% <0.00%> (-4.62%)` | `0.00% <0.00%> (ø%)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=footer). Last update [695bc2c...6498fd4](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob] terrymanu commented on a change in pull request #1617: Fix spring namespace example for job-error-handler
Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #1617:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1617#discussion_r508175558
##########
File path: elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/parser/JobBeanDefinitionParser.java
##########
@@ -82,21 +82,26 @@ private BeanDefinition createJobConfigurationBeanDefinition(final Element elemen
} else {
result.addConstructorArgValue(Arrays.asList(element.getAttribute(JobBeanDefinitionTag.JOB_LISTENER_TYPES_ATTRIBUTE).split(",")));
}
- String tracingRef = element.getAttribute(JobBeanDefinitionTag.TRACING_REF_ATTRIBUTE);
- if (Strings.isNullOrEmpty(tracingRef)) {
- result.addConstructorArgValue(Collections.emptyList());
- } else {
- Collection<BeanDefinition> extraConfigs = new ManagedList<>(1);
- extraConfigs.add(parserContext.getRegistry().getBeanDefinition(tracingRef));
- result.addConstructorArgValue(extraConfigs);
- }
+ result.addConstructorArgValue(parseExtraConfigs(new String[]{JobBeanDefinitionTag.TRACING_REF_ATTRIBUTE, JobBeanDefinitionTag.ERROR_HANDLER_CONFIG_REF_ATTRIBUTE},
+ element, parserContext));
result.addConstructorArgValue(element.getAttribute(JobBeanDefinitionTag.DESCRIPTION_ATTRIBUTE));
result.addConstructorArgValue(parsePropsElement(element, parserContext));
result.addConstructorArgValue(element.getAttribute(JobBeanDefinitionTag.DISABLED_ATTRIBUTE));
result.addConstructorArgValue(element.getAttribute(JobBeanDefinitionTag.OVERWRITE_ATTRIBUTE));
return result.getBeanDefinition();
}
+ private Collection<BeanDefinition> parseExtraConfigs(final String[] extraConfigRefs, final Element element, final ParserContext parserContext) {
+ Collection<BeanDefinition> extraConfigs = new ManagedList<>(extraConfigRefs.length);
+ for (String each : extraConfigRefs) {
+ String attribute = element.getAttribute(each);
+ if (!Strings.isNullOrEmpty(attribute)) {
+ extraConfigs.add(parserContext.getRegistry().getBeanDefinition(attribute));
+ }
+ }
+ return extraConfigs;
Review comment:
Return value should be name as `result`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob] terrymanu merged pull request #1617: Fix spring namespace example for job-error-handler
Posted by GitBox <gi...@apache.org>.
terrymanu merged pull request #1617:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1617
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob] codecov-io edited a comment on pull request #1617: Fix spring namespace example for job-error-handler
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1617:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1617#issuecomment-712561732
# [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=h1) Report
> Merging [#1617](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=desc) into [master](https://codecov.io/gh/apache/shardingsphere-elasticjob/commit/695bc2cd21b8450d79349bb07c7eaa1ba42d3493?el=desc) will **increase** coverage by `0.02%`.
> The diff coverage is `100.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617/graphs/tree.svg?width=650&height=150&src=pr&token=8ZMVc4Yo4Z)](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1617 +/- ##
============================================
+ Coverage 85.38% 85.40% +0.02%
Complexity 105 105
============================================
Files 253 253
Lines 5657 5658 +1
Branches 878 879 +1
============================================
+ Hits 4830 4832 +2
Misses 511 511
+ Partials 316 315 -1
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [.../namespace/job/parser/JobBeanDefinitionParser.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1zcHJpbmcvZWxhc3RpY2pvYi1saXRlLXNwcmluZy1uYW1lc3BhY2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VsYXN0aWNqb2IvbGl0ZS9zcHJpbmcvbmFtZXNwYWNlL2pvYi9wYXJzZXIvSm9iQmVhbkRlZmluaXRpb25QYXJzZXIuamF2YQ==) | `100.00% <100.00%> (ø)` | `1.00 <0.00> (ø)` | |
| [...ite/internal/election/ElectionListenerManager.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2xpdGUvaW50ZXJuYWwvZWxlY3Rpb24vRWxlY3Rpb25MaXN0ZW5lck1hbmFnZXIuamF2YQ==) | `96.00% <0.00%> (+4.00%)` | `0.00% <0.00%> (ø%)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=footer). Last update [695bc2c...6498fd4](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1617?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org