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

3.2 consumer proxy invocation handler #11108

Merged

Conversation

suncairong163
Copy link
Contributor

What is the purpose of the change

consumer proxy invocation handler

Brief changelog

##Related issues
#10803
@AlbumenJ

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

suncr and others added 30 commits November 23, 2022 19:59
# Conflicts:
#	dubbo-rpc/dubbo-rpc-mvc/pom.xml
#	dubbo-rpc/dubbo-rpc-mvc/src/main/java/org/apache/dubbo/rpc/protocol/mvc/servlet/MvcConfigurationSupport.java
#	dubbo-rpc/dubbo-rpc-mvc/src/main/java/org/apache/dubbo/rpc/protocol/mvc/servlet/MvcRequestMappingHandlerAdapter.java
2 删除多余的resource包
2 增加netter server for http
2. 删除多余新增的remoting 调用模块
@sonarcloud
Copy link

sonarcloud bot commented Feb 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 2 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 225 Code Smells

43.4% 43.4% Coverage
0.9% 0.9% Duplication

@codecov-commenter
Copy link

Codecov Report

Merging #11108 (c20e9d9) into 3.2 (10e7162) will decrease coverage by 0.53%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                3.2   #11108      +/-   ##
============================================
- Coverage     69.73%   69.20%   -0.53%     
+ Complexity      339        2     -337     
============================================
  Files          1573     1444     -129     
  Lines         84263    61107   -23156     
  Branches      15298     9044    -6254     
============================================
- Hits          58758    42290   -16468     
+ Misses        20584    14654    -5930     
+ Partials       4921     4163     -758     
Impacted Files Coverage Δ
...g/apache/dubbo/common/json/impl/FastJson2Impl.java
...rg/apache/dubbo/common/json/impl/FastJsonImpl.java
...org/apache/dubbo/common/json/impl/JacksonImpl.java
...che/dubbo/metadata/AbstractServiceNameMapping.java
...est/AbstractAnnotatedMethodParameterProcessor.java
...data/rest/AbstractServiceRestMetadataResolver.java
...tadata/rest/AnnotatedMethodParameterProcessor.java
...rg/apache/dubbo/metadata/rest/RequestMetadata.java
...che/dubbo/metadata/rest/RestMetadataConstants.java
...apache/dubbo/metadata/rest/RestMethodMetadata.java
... and 3006 more

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

@AlbumenJ AlbumenJ merged commit 02a59e2 into apache:3.2 Feb 22, 2023
mytang0 added a commit to mytang0/dubbo that referenced this pull request Feb 22, 2023
* origin/3.2:
  Observability task: metadata center (apache#11593)
  Enhance the way to get dubbo version (apache#11574)
  Bump protobuf-java from 3.21.12 to 3.22.0 (apache#11615)
  Bump maven-surefire-plugin from 3.0.0-M8 to 3.0.0-M9 (apache#11613)
  Bump micrometer-bom from 1.10.3 to 1.10.4 (apache#11611)
  Bump libthrift from 0.17.0 to 0.18.0 (apache#11614)
  Bump maven-failsafe-plugin from 3.0.0-M8 to 3.0.0-M9 (apache#11612)
  Bump reactor-core from 3.5.2 to 3.5.3 (apache#11610)
  Bump byte-buddy from 1.13.0 to 1.14.0 (apache#11609)
  Bump maven-javadoc-plugin from 3.4.1 to 3.5.0 (apache#11608)
  Bump micrometer-tracing-bom from 1.0.1 to 1.0.2 (apache#11607)
  3.2 consumer proxy invocation handler (apache#11108)
  Update DubboReference.java (apache#11621)

# Conflicts:
#	dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestProtocol.java
#	dubbo-rpc/dubbo-rpc-rest/src/test/java/org/apache/dubbo/rpc/protocol/rest/JaxrsRestProtocolTest.java
mytang0 added a commit to mytang0/dubbo that referenced this pull request Feb 22, 2023
* origin/3.2:
  Observability task: metadata center (apache#11593)
  Enhance the way to get dubbo version (apache#11574)
  Bump protobuf-java from 3.21.12 to 3.22.0 (apache#11615)
  Bump maven-surefire-plugin from 3.0.0-M8 to 3.0.0-M9 (apache#11613)
  Bump micrometer-bom from 1.10.3 to 1.10.4 (apache#11611)
  Bump libthrift from 0.17.0 to 0.18.0 (apache#11614)
  Bump maven-failsafe-plugin from 3.0.0-M8 to 3.0.0-M9 (apache#11612)
  Bump reactor-core from 3.5.2 to 3.5.3 (apache#11610)
  Bump byte-buddy from 1.13.0 to 1.14.0 (apache#11609)
  Bump maven-javadoc-plugin from 3.4.1 to 3.5.0 (apache#11608)
  Bump micrometer-tracing-bom from 1.0.1 to 1.0.2 (apache#11607)
  3.2 consumer proxy invocation handler (apache#11108)
mytang0 added a commit to mytang0/dubbo that referenced this pull request Feb 23, 2023
* origin/3.2: (32 commits)
  dubbo-security Jackson error (apache#11622)
  sync meter to spring boot management (apache#11630)
  Rest bugfix & optimization (apache#11617)
  Observability task: metadata center (apache#11593)
  Enhance the way to get dubbo version (apache#11574)
  Bump protobuf-java from 3.21.12 to 3.22.0 (apache#11615)
  Bump maven-surefire-plugin from 3.0.0-M8 to 3.0.0-M9 (apache#11613)
  Bump micrometer-bom from 1.10.3 to 1.10.4 (apache#11611)
  Bump libthrift from 0.17.0 to 0.18.0 (apache#11614)
  Bump maven-failsafe-plugin from 3.0.0-M8 to 3.0.0-M9 (apache#11612)
  Bump reactor-core from 3.5.2 to 3.5.3 (apache#11610)
  Bump byte-buddy from 1.13.0 to 1.14.0 (apache#11609)
  Bump maven-javadoc-plugin from 3.4.1 to 3.5.0 (apache#11608)
  Bump micrometer-tracing-bom from 1.0.1 to 1.0.2 (apache#11607)
  3.2 consumer proxy invocation handler (apache#11108)
  Update DubboReference.java (apache#11621)
  Bump version to 3.1.8-SNAPSHOT
  Add Consumer Metrics (apache#11542)
  Backport of remove apache-rat-plugin. (apache#11523) (apache#11592)
  Update codecov config (apache#11582)
  ...
lcb11 pushed a commit to lcb11/dubbo that referenced this pull request Mar 31, 2023
* add dubbo mvc feign client to support mvc remote call

* add dubbo mvc dispatcher servlet

* add dubbo mvc dispatcher servlet

* add   MvcDispatcherServlet  unit test

* add dubbo mvc feign client to support mvc remote call

* add dubbo mvc dispatcher servlet

* add Dubbo mvc Provider RPCInvocation create

* mvc remove unused code

* remove mvc unused test code

* remove unused code

* BodyProviderParamParser param type modify

* modify pom dependency version

* add  dubbo-metadata-api  dependency

* 新增依赖Jakarta支持 tomcat10

* ApplicationModel load  ParamParser

* ParamParser header & param map convert

* ParamParser header & param map convert

* 1 增加mvc协议
2 删除多余的resource包

* 1 增加mvc协议
2 增加netter server for http

* 重构 NettyHttpClient NettyHttpServer

* add path parse util & requestTemplate

* add mvc consumer http-connection

* mvc change  HttpConnectionPreBuildIntercept name and add SerializeBodyIntercept extend

* 1. 迁移mvc代码到rest下,合并http统一解析逻辑
2. 删除多余新增的remoting 调用模块

* 解决报错

* 1 抽象http 调用
2 改造rest调用风格

* 修改方法命名

* 修改方法名

* 删除多余的clients

* 还原restprotocol,逻辑迁移至新分支  3.2_refactor_rest_protocol

* add provider  PathMatcher

* add   ServiceRestMetadata  PathMatcher

* add   ServiceRestMetadata  PathMatcher

* add jax_rs and mvc annotation class constants

* refactor PathMatcher name

* add annotation class

* maintain rest metadata

* maintain  jax_rs and mvc annotation

* maintain  jax_rs and mvc annotation

* remove mvc module

* remove rest mvc code to code review

* add springmvc & rest annotation api module

* add springmvc & rest annotation api module

* add pathMatcher equal  test

* remove mvc module

* rest provider RPCInvocation build

* RPCInvocation build add dubbo-metadata-api dependency

* RestMethodMetadata add method to consumer service map

* RestMethodMetadata add method to consumer service map

* rest consumer HttpInvokeInvocationHandler

* rest consumer HttpInvokeInvocationHandler

* add dubbo-metadata-api dependency

* dubbo-rpc pom fix

* 移动模块

* 删除模块引用

* consumer metadata  resolve

* RestProtocol consumer

* RestProtocol consumer

* requestConvert adaptive

* JSON serializeObject to outputStream

* JsonUtilsTest  serialize & unSerialize

* ok http client

* http client reconstruct

* rest protocol BaseConvert

* rest protocol  ParamParser reconstruct

* rest protocol  addKeepAliveHeader

* requestTemplate isBodyEmpty()

* remove unused code

* create ConsumerParseContext

* body default byte[0]

* rest http message decode

* writeTextContent &  writeJsonContent & writeFormContent

* remove mvc & rest annotation module

* remove provider code

* fix some pr advice

* Add ASF license header for  newly created files

* move RestClientFactory  code  to dubbo-remoting-http

* exact  request convert code to a factory class

* modify  request convert code

* modify dubbo-dependencies-bom

* modify dubbo-remoting-http pom

* refactor spi  resource file  name

* dubbo-metadata-api remove
dubbo-configcenter-zookeeper dependency for
 cyclic reference

* newly create file add ASF

* fix compile error

* Enhance Code

* add rest protocol ConsumerParamParser

* some fix

* rest json content-type test

* RestProtocol merge doRefer code to protocolBindingRefer

* remove restInvoker

* rest protocol add JsonFactory to support custom

* rest protocol add JsonFactory to support custom

* jaxrs rest ParamNoAnnotatedProcessor  support fix

* add rest http message encode

* add rest http message encode

* rest okHttpClient requestBody fix

* rest jaxrs form content-type support

* RestProtocol protocolBindingRefer reconstruct

* RestProtocol protocolBindingRefer reconstruct  object to invoker & Invocation

* move RequestTemplate to remoting-http

* rest unit test

* add httpclient  & url connection rest client

* Enhance invocation

* enhance

* add ParameterTypesComparator  for metadataMap

* add ASF for new file

* Fix conflict

* Fix header

* fix import

* fix import

* fix import

* fix import

* fix import

* Fix json

* revert some change

* Remove jsonfactory

* Remove jsonfactory

* Simplify rest client

* Fix protocol

* fix codec

* tmp disable test

* rest metadata resolver add  interface judge

* add rest metadata  resolve unit test & fix  AbstractServiceRestMetadataResolver

* org.apache.dubbo.metadata.rest.ParamType null exclude & add default accept header

* RestProtocolTest

refer add context path
unit test

* some fix

* ADD TODO

* RESOLVE HTTP client java.net.SocketException: socket closed

* RESOLVE HTTP client java.net.SocketException: socket closed

* add spring mvc rest protocol unit test

* rest protocol http response code deal

* rest protocol http response message

* fix some review advice

* fix some review advice

* add rest metadata  resolve unit test & fix  AbstractServiceRestMetadataResolver

* org.apache.dubbo.metadata.rest.ParamType null exclude & add default accept header

* RestProtocolTest

refer add context path
unit test

* some fix

* fix some review advice

* add spring mvc rest protocol unit test

* rest protocol http response code deal

* rest protocol http response message

* URLConnectionRestClient getMessage

* remove unused import

* import fix

* code merge

* code merge

* code merge

* code merge

* code merge

* Fix conflicts

* change  restResult InputStream to bytes protect from  fd leak

* merge code

* Fix import

* Fix import

* Fix uts

* Remove unused code

* Fix logger

* Update okhttp version

* Update okhttp version

* rest protocol  add AnotherUserRestService service ut

* rest protocol  add String & byteArray codec

* Fix version

* Fix uts

* rest protocol  add XMLCodec

* stream release

* ServiceRestMetadata port change int to Integer

* service RestMetadata service map init

* xml codec change  for xxe

* Fix import

* code style

* code style

* Fix shade

---------

Co-authored-by: suncr <suncairong@moresec.cn>
Co-authored-by: Liujunjie <42363259+LiujunjieALiling@users.noreply.github.com>
Co-authored-by: junjie3.liu <junjie3.liu@ximalaya.com>
Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
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.

6 participants