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

[Dubbo-3266] Change DynamicConfiguration definition to better adapt to Apollo's namespace storage model. #3271

Merged
merged 16 commits into from
May 20, 2019

Conversation

chickenlj
Copy link
Contributor

@chickenlj chickenlj commented Jan 18, 2019

What is the purpose of the change

#3266

  1. Separate the retrieving of start up configurations from that of governance rules.
  2. To better adapt to Apollo's namespace model.

Brief changelog

  • Add getConfigFile() api for DynamicConfiguration and the corresponding implementation in ZookeeperDynamicConfiguraiton and ApolloDynamicConfiguration
  • Small optimization on ConfigCenterConfig

Verifying this change

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

  • 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.
  • 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.
  • 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.

1. separate the retrieving of start up configurations from that of governance rules.
2. better adapt to Apollo's namespace model.
@chickenlj chickenlj changed the title Add new getConfigFile api to DynamicConfiguration to [Dubbo-3266] Change DynamicConfiguration definition to better adapt to Apollo's namespace storage model. Jan 18, 2019
@codecov-io
Copy link

codecov-io commented Jan 18, 2019

Codecov Report

Merging #3271 into master will increase coverage by 0.03%.
The diff coverage is 25%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3271      +/-   ##
============================================
+ Coverage     62.69%   62.73%   +0.03%     
- Complexity      544      545       +1     
============================================
  Files           762      762              
  Lines         32758    32752       -6     
  Branches       5165     5162       -3     
============================================
+ Hits          20538    20546       +8     
+ Misses         9861     9848      -13     
+ Partials       2359     2358       -1
Impacted Files Coverage Δ Complexity Δ
...che/dubbo/config/builders/ConfigCenterBuilder.java 100% <ø> (ø) 0 <0> (ø) ⬇️
...figcenter/support/nop/NopDynamicConfiguration.java 71.42% <0%> (-11.91%) 0 <0> (ø)
...onfigcenter/consul/ConsulDynamicConfiguration.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...gcenter/support/etcd/EtcdDynamicConfiguration.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...g/apache/dubbo/config/AbstractInterfaceConfig.java 72% <0%> (ø) 0 <0> (ø) ⬇️
...ter/support/apollo/ApolloDynamicConfiguration.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...g/apache/dubbo/config/spring/ConfigCenterBean.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...enter/support/nacos/NacosDynamicConfiguration.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...pport/zookeeper/ZookeeperDynamicConfiguration.java 84% <100%> (+0.66%) 7 <1> (+1) ⬆️
...va/org/apache/dubbo/config/ConfigCenterConfig.java 76.56% <100%> (-1.05%) 0 <0> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfb6077...9244c9c. Read the comment docs.

@khanimteyaz
Copy link
Contributor

@chickenlj do let me know if you planning to address the given few feedback in this PR. Otherthan given few minor comment (if looks valid to you). This PR looks good to me.

@chickenlj
Copy link
Contributor Author

@chickenlj do let me know if you planning to address the given few feedback in this PR. Otherthan given few minor comment (if looks valid to you). This PR looks good to me.

@khanimteyaz Sure, I am working on it considering @beiwei30's and your feedbacks.

@chickenlj chickenlj changed the base branch from 2.7.0-release to master January 22, 2019 09:48
# Conflicts:
#	dubbo-configcenter/dubbo-configcenter-zookeeper/src/test/java/org/apache/dubbo/configcenter/support/zookeeper/ZookeeperDynamicConfigurationTest.java
@chickenlj
Copy link
Contributor Author

@beiwei30 @khanimteyaz Please help review the latest commits

Copy link
Contributor

@khanimteyaz khanimteyaz left a comment

Choose a reason for hiding this comment

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

LGTM.

@chickenlj chickenlj added this to the 2.7.2 milestone Mar 22, 2019
# Conflicts:
#	dubbo-configcenter/dubbo-configcenter-zookeeper/src/main/java/org/apache/dubbo/configcenter/support/zookeeper/ZookeeperDynamicConfiguration.java
Copy link
Contributor

@cvictory cvictory left a comment

Choose a reason for hiding this comment

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

LGTM

# Conflicts:
#	dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java
#	dubbo-configcenter/dubbo-configcenter-apollo/src/main/java/org/apache/dubbo/configcenter/support/apollo/ApolloDynamicConfiguration.java
#	dubbo-configcenter/dubbo-configcenter-nacos/src/main/java/org/apache/dubbo/configcenter/support/nacos/NacosDynamicConfiguration.java
@cvictory cvictory merged commit 23903ba into apache:master May 20, 2019
@chickenlj chickenlj deleted the configcenter-apollo-refactor branch May 29, 2019 01:42
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.

5 participants