Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dubbo provided by #11390

Merged
merged 20 commits into from
Feb 14, 2023
Merged

Conversation

aamingaa
Copy link
Contributor

related to #10374

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Inherited
public @interface DubboProvidedbBy {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public @interface DubboProvidedbBy {
public @interface ProvidedbBy {

@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2023

Codecov Report

Merging #11390 (5348580) into 3.2 (33d4288) will decrease coverage by 2.24%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                3.2   #11390      +/-   ##
============================================
- Coverage     69.57%   67.34%   -2.24%     
+ Complexity      133        2     -131     
============================================
  Files          1515     1508       -7     
  Lines         82438    62673   -19765     
  Branches      14756     9187    -5569     
============================================
- Hits          57359    42209   -15150     
+ Misses        20240    16317    -3923     
+ Partials       4839     4147     -692     
Impacted Files Coverage Δ
.../config/spring/reference/ReferenceBeanSupport.java
...ache/dubbo/rpc/protocol/AbstractProxyProtocol.java
...e/dubbo/reactive/ClientTripleReactorPublisher.java
...java/org/apache/dubbo/rpc/model/ConsumerModel.java
...est/AbstractAnnotatedMethodParameterProcessor.java
...nnotation/AbstractAnnotationBeanPostProcessor.java
...e/dubbo/remoting/transport/netty/NettyHandler.java
...ain/java/org/apache/dubbo/common/URLStrParser.java
...bo/rpc/cluster/router/tag/model/TagRuleParser.java
...o/registry/zookeeper/ZookeeperRegistryFactory.java
... and 3013 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Inherited
public @interface ProvidedbBy {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public @interface ProvidedbBy {
public @interface ProvidedBy {

@@ -518,9 +518,8 @@ private boolean checkMeshConfig(Map<String, String> referenceParameters) {

String providedBy = referenceParameters.get(PROVIDED_BY);
if (StringUtils.isEmpty(providedBy)) {
throw new IllegalStateException("In mesh mode, the providedBy of ReferenceConfig is must be set");
throw new IllegalStateException("In mesh mode, the providedBy or dubboProvidedBy of ReferenceConfig is must be set");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new IllegalStateException("In mesh mode, the providedBy or dubboProvidedBy of ReferenceConfig is must be set");
throw new IllegalStateException("In mesh mode, the providedBy of ReferenceConfig is must be set");

@@ -51,7 +51,6 @@ public interface ReferenceAttributes {
String PARAMETERS = "parameters";

String PROVIDED_BY = "providedBy";

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

@@ -78,6 +79,17 @@ public static void convertReferenceProps(Map<String, Object> attributes, Class d
interfaceName = defaultInterfaceClass.getName();
}
Assert.notEmptyString(interfaceName, "The interface class or name of reference was not found");
Class<?> clazz = ClassUtils.resolveClass(interfaceName, defaultInterfaceClass.getClassLoader());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Class<?> clazz = ClassUtils.resolveClass(interfaceName, defaultInterfaceClass.getClassLoader());
Class<?> clazz = getInterfaceClass();


/**
* Class-level annotation used for declaring Dubbo interface.
* @DubboProvidedbBy("dubbo-samples-xds-provider")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @DubboProvidedbBy("dubbo-samples-xds-provider")
* @ProvidedBy("dubbo-samples-xds-provider")

Copy link
Member

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarcloud
Copy link

sonarcloud bot commented Feb 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

89.3% 89.3% Coverage
0.0% 0.0% Duplication

Copy link
Member

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AlbumenJ
Copy link
Member

Please submit some related docs to dubbo-website

@AlbumenJ AlbumenJ merged commit 2b945f8 into apache:3.2 Feb 14, 2023
mytang0 added a commit to mytang0/dubbo that referenced this pull request Feb 15, 2023
* mytang0/3.2:
  Enhance service discovery update interval (apache#11223)
  Metrics code opt: redundant, modifier, magic (apache#11553)
  Perfect some code (apache#11533)
  feat: dubbo provided by (apache#11390)
mytang0 added a commit to mytang0/dubbo that referenced this pull request Feb 16, 2023
* mytang0/3.2: (33 commits)
  Fix conflict
  Update codecov config (apache#11580)
  Set timeout value to string (apache#11565)
  Skip mapping retry if metadata config is invalid (apache#11323)
  Fix stackoverflow in SerializeSecurityConfigurator (apache#11561)
  Revert clear response operation of timeoutfilter (apache#11562)
  Fix hessian2 serializable check (apache#11573)
  feat: fix oom (apache#11571)
  Enhance service discovery update interval (apache#11223)
  Metrics code opt: redundant, modifier, magic (apache#11553)
  Perfect some code (apache#11533)
  feat: dubbo provided by (apache#11390)
  Enhance serializable check option (apache#11460)
  Fix config absent when refresh (apache#11505)
  Enhance json util check (apache#11501)
  Fix the bug in LFUCache#put() method (apache#11538)
  Bump maven-assembly-plugin from 3.1.0 to 3.4.2 (apache#11547)
  Bump consul-api from 1.4.2 to 1.4.5 (apache#11545)
  Bump maven-core from 3.8.7 to 3.9.0 (apache#11546)
  Bump bytebuddy.version from 1.12.22 to 1.13.0 (apache#11548)
  ...

# Conflicts:
#	dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants