You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "chickenlj (GitHub)" <gi...@apache.org> on 2019/01/14 14:00:41 UTC

[GitHub] [incubator-dubbo] chickenlj opened pull request #3229: guarantee interoperability with 2.6.x and lower versions

## What is the purpose of the change

Guarantee interoperability with 2.6.x http protocol

## Brief changelog

* Add compatibility classes for HttpProtocol and RmiProtocol
* Send corresponding right packaged RemoteInvocation based on provider versions.

## Verifying this change



Follow this checklist to help us incorporate your contribution quickly and easily:

- [x] Make sure there is a [GITHUB_issue](https://github.com/apache/incubator-dubbo/issues) 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.
- [ ] Format the pull request title like `[Dubbo-XXX] Fix UnknownException when host config not exist #XXX`. 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.
- [ ] 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 integration-test in [test module](https://github.com/apache/incubator-dubbo/tree/master/dubbo-test).
- [ ] Run `mvn clean install -DskipTests=false` & `mvn clean test-compile failsafe:integration-test` to make sure unit-test and integration-test pass.
- [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/incubator-dubbo/wiki/Software-donation-guide).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] codecov-io commented on issue #3229: [Dubbo-3226] guarantee interoperability with 2.6.x and lower versions

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3229?src=pr&el=h1) Report
> Merging [#3229](https://codecov.io/gh/apache/incubator-dubbo/pull/3229?src=pr&el=desc) into [2.7.0-release](https://codecov.io/gh/apache/incubator-dubbo/commit/2f743547991ddf8e2b28a454f9670c0536d92297?src=pr&el=desc) will **decrease** coverage by `0.13%`.
> The diff coverage is `57.69%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/graphs/tree.svg?width=650&token=VnEIkiFQT0&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo/pull/3229?src=pr&el=tree)

```diff
@@                Coverage Diff                 @@
##             2.7.0-release   #3229      +/-   ##
==================================================
- Coverage            63.93%   63.8%   -0.14%     
  Complexity              75      75              
==================================================
  Files                  652     654       +2     
  Lines                28355   28377      +22     
  Branches              4800    4806       +6     
==================================================
- Hits                 18130   18107      -23     
- Misses                7953    7991      +38     
- Partials              2272    2279       +7
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3229?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...c/main/java/org/apache/dubbo/common/Constants.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vQ29uc3RhbnRzLmphdmE=) | `92.85% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...ba/dubbo/rpc/protocol/rmi/RmiRemoteInvocation.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1ybWkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9ycGMvcHJvdG9jb2wvcm1pL1JtaVJlbW90ZUludm9jYXRpb24uamF2YQ==) | `0% <0%> (ø)` | `0 <0> (?)` | |
| [.../dubbo/rpc/protocol/http/HttpRemoteInvocation.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1odHRwL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vcnBjL3Byb3RvY29sL2h0dHAvSHR0cFJlbW90ZUludm9jYXRpb24uamF2YQ==) | `0% <0%> (ø)` | `0 <0> (?)` | |
| [...org/apache/dubbo/rpc/protocol/rmi/RmiProtocol.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1ybWkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9wcm90b2NvbC9ybWkvUm1pUHJvdG9jb2wuamF2YQ==) | `51.21% <0%> (-5.2%)` | `0 <0> (ø)` | |
| [...src/main/java/org/apache/dubbo/common/Version.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vVmVyc2lvbi5qYXZh) | `57.6% <100%> (+7.6%)` | `0 <0> (ø)` | :arrow_down: |
| [...g/apache/dubbo/config/AbstractInterfaceConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9BYnN0cmFjdEludGVyZmFjZUNvbmZpZy5qYXZh) | `72.18% <100%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...apache/dubbo/rpc/cluster/support/ClusterUtils.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvc3VwcG9ydC9DbHVzdGVyVXRpbHMuamF2YQ==) | `70.49% <100%> (+2.07%)` | `0 <0> (ø)` | :arrow_down: |
| [...g/apache/dubbo/rpc/protocol/http/HttpProtocol.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1odHRwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvcHJvdG9jb2wvaHR0cC9IdHRwUHJvdG9jb2wuamF2YQ==) | `67.85% <20%> (-3.4%)` | `0 <0> (ø)` | |
| [...he/dubbo/rpc/protocol/rmi/RmiRemoteInvocation.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1ybWkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9wcm90b2NvbC9ybWkvUm1pUmVtb3RlSW52b2NhdGlvbi5qYXZh) | `0% <0%> (-100%)` | `0% <0%> (ø)` | |
| [...che/dubbo/remoting/transport/mina/MinaChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbWluYS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcmVtb3RpbmcvdHJhbnNwb3J0L21pbmEvTWluYUNoYW5uZWwuamF2YQ==) | `43.42% <0%> (-10.53%)` | `0% <0%> (ø)` | |
| ... and [16 more](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3229?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/incubator-dubbo/pull/3229?src=pr&el=footer). Last update [2f74354...7dfdae5](https://codecov.io/gh/apache/incubator-dubbo/pull/3229?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] chickenlj commented on pull request #3229: guarantee interoperability with 2.6.x and lower versions

Posted by "chickenlj (GitHub)" <gi...@apache.org>.
Good point, anyone can add the 'release' key.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] cvictory commented on pull request #3229: [Dubbo-3226] guarantee interoperability with 2.6.x and lower versions

Posted by "cvictory (GitHub)" <gi...@apache.org>.
it have been done.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] cvictory commented on pull request #3229: guarantee interoperability with 2.6.x and lower versions

Posted by "cvictory (GitHub)" <gi...@apache.org>.
why to remove?

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] cvictory commented on pull request #3229: [Dubbo-3226] guarantee interoperability with 2.6.x and lower versions

Posted by "cvictory (GitHub)" <gi...@apache.org>.
If you use 
```
if (StringUtils.isNotEmpty(remoteRelease)) {
                map.put(Constants.RELEASE_KEY, remoteRelease);
            }else {
           map.remove(Constants.RELEASE_KEY);
}
```
It will be better ? 

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] chickenlj commented on pull request #3229: guarantee interoperability with 2.6.x and lower versions

Posted by "chickenlj (GitHub)" <gi...@apache.org>.
The consumer side will have a 'release' key when it's using v2.7.0, if we allow the override we will lose the real release value of the provider.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] cvictory commented on pull request #3229: guarantee interoperability with 2.6.x and lower versions

Posted by "cvictory (GitHub)" <gi...@apache.org>.
There is no unit test ?

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] cvictory commented on pull request #3229: [Dubbo-3226] guarantee interoperability with 2.6.x and lower versions

Posted by "cvictory (GitHub)" <gi...@apache.org>.
pls judge the snapshot version

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] cvictory closed pull request #3229: [Dubbo-3226] guarantee interoperability with 2.6.x and lower versions

Posted by "cvictory (GitHub)" <gi...@apache.org>.
[ pull request closed by cvictory ]

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] codecov-io commented on issue #3229: guarantee interoperability with 2.6.x and lower versions

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3229?src=pr&el=h1) Report
> Merging [#3229](https://codecov.io/gh/apache/incubator-dubbo/pull/3229?src=pr&el=desc) into [2.7.0-release](https://codecov.io/gh/apache/incubator-dubbo/commit/2f743547991ddf8e2b28a454f9670c0536d92297?src=pr&el=desc) will **decrease** coverage by `0.09%`.
> The diff coverage is `42.1%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/graphs/tree.svg?width=650&token=VnEIkiFQT0&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo/pull/3229?src=pr&el=tree)

```diff
@@                Coverage Diff                 @@
##             2.7.0-release    #3229     +/-   ##
==================================================
- Coverage            63.93%   63.84%   -0.1%     
  Complexity              75       75             
==================================================
  Files                  652      654      +2     
  Lines                28355    28371     +16     
  Branches              4800     4804      +4     
==================================================
- Hits                 18130    18114     -16     
- Misses                7953     7983     +30     
- Partials              2272     2274      +2
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3229?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...c/main/java/org/apache/dubbo/common/Constants.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vQ29uc3RhbnRzLmphdmE=) | `92.85% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...ba/dubbo/rpc/protocol/rmi/RmiRemoteInvocation.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1ybWkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9ycGMvcHJvdG9jb2wvcm1pL1JtaVJlbW90ZUludm9jYXRpb24uamF2YQ==) | `0% <0%> (ø)` | `0 <0> (?)` | |
| [.../dubbo/rpc/protocol/http/HttpRemoteInvocation.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1odHRwL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vcnBjL3Byb3RvY29sL2h0dHAvSHR0cFJlbW90ZUludm9jYXRpb24uamF2YQ==) | `0% <0%> (ø)` | `0 <0> (?)` | |
| [...org/apache/dubbo/rpc/protocol/rmi/RmiProtocol.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1ybWkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9wcm90b2NvbC9ybWkvUm1pUHJvdG9jb2wuamF2YQ==) | `51.21% <0%> (-5.2%)` | `0 <0> (ø)` | |
| [...src/main/java/org/apache/dubbo/common/Version.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vVmVyc2lvbi5qYXZh) | `52.32% <100%> (+2.32%)` | `0 <0> (ø)` | :arrow_down: |
| [...g/apache/dubbo/config/AbstractInterfaceConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9BYnN0cmFjdEludGVyZmFjZUNvbmZpZy5qYXZh) | `72.18% <100%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...apache/dubbo/rpc/cluster/support/ClusterUtils.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvc3VwcG9ydC9DbHVzdGVyVXRpbHMuamF2YQ==) | `70.49% <100%> (+2.07%)` | `0 <0> (ø)` | :arrow_down: |
| [...g/apache/dubbo/rpc/protocol/http/HttpProtocol.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1odHRwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9ycGMvcHJvdG9jb2wvaHR0cC9IdHRwUHJvdG9jb2wuamF2YQ==) | `67.85% <20%> (-3.4%)` | `0 <0> (ø)` | |
| [...he/dubbo/rpc/protocol/rmi/RmiRemoteInvocation.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1ybWkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9wcm90b2NvbC9ybWkvUm1pUmVtb3RlSW52b2NhdGlvbi5qYXZh) | `0% <0%> (-100%)` | `0% <0%> (ø)` | |
| [.../remoting/transport/netty4/NettyClientHandler.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5Q2xpZW50SGFuZGxlci5qYXZh) | `77.77% <0%> (-8.34%)` | `0% <0%> (ø)` | |
| ... and [10 more](https://codecov.io/gh/apache/incubator-dubbo/pull/3229/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3229?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/incubator-dubbo/pull/3229?src=pr&el=footer). Last update [2f74354...9ad0494](https://codecov.io/gh/apache/incubator-dubbo/pull/3229?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] chickenlj commented on pull request #3229: guarantee interoperability with 2.6.x and lower versions

Posted by "chickenlj (GitHub)" <gi...@apache.org>.
done

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] chickenlj commented on pull request #3229: guarantee interoperability with 2.6.x and lower versions

Posted by "chickenlj (GitHub)" <gi...@apache.org>.
I have added UT to `isFramework263OrHigher ` and `isFramework270OrHigher `, but for `createRemoteInvocation ` it's a little hard to add UT.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] cvictory commented on pull request #3229: guarantee interoperability with 2.6.x and lower versions

Posted by "cvictory (GitHub)" <gi...@apache.org>.
It is not enough to judge empty.
You should also judge the value > 2.7.0

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] chickenlj commented on issue #3229: [Dubbo-3226] guarantee interoperability with 2.6.x and lower versions

Posted by "chickenlj (GitHub)" <gi...@apache.org>.
#3226 

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3229 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org