fix just consumers unregister serviceInstance
What is the purpose of the change
1、fix just consumers unregister serviceInstance
Brief changelog
1、set ServiceInstanceHostPortCustomizer Prioritized 2、add ServiceInstanceConsumerHostPortCustomizer fix just consumers unregister serviceInstance
Verifying this change
Start the consumer application, and the host and port will be registered
Checklist
- [x] 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.
Kindly incorporate additional contextual information to the purpose. Additionally, please include some test examples for comprehensive coverage.
@chickenlj PTAL
Kindly incorporate additional contextual information to the purpose. Additionally, please include some test examples for comprehensive coverage.
The original interface level can support querying all consumers corresponding to the provider interface. After forcing the application level, we are unable to obtain real-time subscription data for consumers. By registering the serviceInstance of the consumer, the admin can obtain the corresponding serviceInstance, thereby obtaining real-time subscription data.
Kindly incorporate additional contextual information to the purpose. Additionally, please include some test examples for comprehensive coverage.
Obtaining all consumers information of the provider interface can better manage internal interfaces. For example, providing a reference for an offline interface. I think this is the original advantage compared to the Spring Cloud system.
add unit test
Please fix failed test cases.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
2cf54f7) 70.37% compared to head (a9cf89a) 70.33%. Report is 6 commits behind head on 3.2.
:exclamation: Current head a9cf89a differs from pull request most recent head 95469d1. Consider uploading reports for the commit 95469d1 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## 3.2 #13685 +/- ##
==========================================
- Coverage 70.37% 70.33% -0.05%
==========================================
Files 1606 1607 +1
Lines 70032 70062 +30
Branches 10104 10110 +6
==========================================
- Hits 49287 49280 -7
- Misses 16108 16145 +37
Partials 4637 4637
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Quality Gate passed
The SonarCloud Quality Gate passed, but some issues were introduced.
2 New issues
0 Security Hotspots
73.6% Coverage on New Code
0.0% Duplication on New Code
Thanks for the contribution. Could you please explain in what scenario we would need this?
Thanks for the contribution. Please explain in what scenario we would need this.
Thanks for the contribution. Could you please explain in what scenario we would need this?
Prerequisite: dubbo.application.register-mode=instance
For example, when we want to know in admin which business consumers a certain provider interface has. If only the consumer application is not registered, the admin will not be able to access all the data of business consumers.
Quality Gate passed
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
9.8% Coverage on New Code
0.0% Duplication on New Code