Closed TerryLam2010 closed 3 days ago
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅
[!NOTE] Currently processing new changes in this PR. This may take a few minutes, please wait...
📥 Commits
Reviewing files that changed from the base of the PR and between 929b440b502d13bafd81edba76c6b76bbbe80dcc and 5a4507bf39aff28f6517b52ad0c087ca5b8ef072.📒 Files selected for processing (1)
* `apollo-client/src/main/java/com/ctrip/framework/apollo/spring/spi/DefaultApolloConfigRegistrarHelper.java` (5 hunks)________________________________________ < C*deR*bb*t: The uncensored bug hunter. > ---------------------------------------- \ \ (\__/) (•ㅅ•) / づ
The recent updates to the Apollo Client introduce an appId
parameter across multiple classes and methods. This enhancement improves configuration management by allowing retrieval and handling of configurations tailored to specific applications, facilitating greater flexibility and organization in multi-application environments. Additionally, the CHANGES.md
file reflects a version update from 2.3.0 to 2.4.0, with a significant reduction in detailed entries.
Files/Groups | Changes Summary |
---|---|
ConfigService.java , DefaultConfigManager.java , RemoteConfigLongPollService.java , DefaultConfigFactoryManager.java , PropertySourcesProcessor.java |
Added appId parameter to methods, enhancing multi-application configuration management. |
AbstractSpringIntegrationTest.java , ConfigServiceTest.java , RemoteConfigLongPollServiceTest.java , PropertySourcesProcessorTest.java |
Updated test cases to reflect changes in method signatures and improve clarity in testing configurations. |
AbstractConfig.java , AbstractConfigFile.java , AbstractConfigRepository.java , DefaultConfig.java , LocalFileConfigRepository.java , RemoteConfigRepository.java , SimpleConfig.java , YamlConfigFile.java |
Modified constructors and methods to include appId , improving configuration handling across various classes. |
MockConfig.java , MockConfigFile.java , MockConfigFactory.java , MockConfigUtil.java |
Updated constructors and methods to incorporate appId , ensuring consistency in configuration handling. |
ConfigUtil.java |
Added new methods for retrieving local cache directories and access keys based on appId . |
CHANGES.md |
Updated milestone link and removed detailed entries for version 2.4.0. |
sequenceDiagram
participant Client as Client
participant ConfigService as ConfigService
participant ConfigManager as ConfigManager
participant ConfigRepository as ConfigRepository
Client->>ConfigService: getConfig(appId, namespace)
ConfigService->>ConfigManager: getConfig(appId, namespace)
ConfigManager->>ConfigRepository: fetchConfig(appId, namespace)
ConfigRepository-->>ConfigManager: return Config
ConfigManager-->>ConfigService: return Config
ConfigService-->>Client: return Config
sequenceDiagram
participant ConfigRepository as ConfigRepository
participant RemoteConfigLongPollService as RemoteConfigLongPollService
participant Client as Client
ConfigRepository->>RemoteConfigLongPollService: submit(appId, namespace)
RemoteConfigLongPollService->>Client: notify(appId, namespace, changes)
Client-->>ConfigRepository: onRepositoryChange(appId, namespace, newProperties)
🐰 In fields of green, I hop with glee,
New app IDs bloom, oh what a spree!
Configs now dance, tailored with care,
Multi-app magic fills the air!
With each little change, our dreams take flight,
A brighter tomorrow, oh what a delight! 🌼
[!TIP]
You can customize the tone of the review comments and chat replies.
Set the `tone_instructions` setting in your project's settings in CodeRabbit to customize the tone of the review comments and chat replies. For example, you can set the tone to `Act like a strict teacher`, `Act like a pirate` and more.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Thanks, it may take some time to reivew. In the meantime, could you please sign the CLA following the instructions provided by the CLA Assistant Lite bot?
I have read the CLA Document and I hereby sign the CLA
@TerryLam2010 It seems you committed the code with zhantian.lin@watsons.com.cn
, which isn't associated with your GitHub account.
The monitor metric #74 maybe changed if support multiple appId @Rawven
I have changed the Email for submitting code to 36256759+TerryLam2010@users.noreply.github.com, and changed the name to TerryLam2010. Have not submitted open source request merge before,help me please....
I have changed the Email for submitting code to 36256759+TerryLam2010@users.noreply.github.com, and changed the name to TerryLam2010. Have not submitted open source request merge before,help me please....
emm...You may first backup the local repo and try the following:
1. git checkout main
2. git checkout -b 20240703-apollo-multiple-appid-new
3. git merge --squash 20240703-apollo-multiple-appid
4. git commit -m "some commit message"
5. git push origin 20240703-apollo-multiple-appid-new:20240703-apollo-multiple-appid
I have changed the Email for submitting code to 36256759+TerryLam2010@users.noreply.github.com, and changed the name to TerryLam2010. Have not submitted open source request merge before,help me please....
emm...You may first backup the local repo and try the following:
1. git checkout main 2. git checkout -b 20240703-apollo-multiple-appid-new 3. git merge --squash 20240703-apollo-multiple-appid 4. git commit -m "some commit message" 5. git push origin 20240703-apollo-multiple-appid-new:20240703-apollo-multiple-appid
I noticed the CLA check failed again, and it seems the original commits are back. Is there some mistaken operation on the branch?
Jason, my unit tests pass perfectly when I run them locally, but fail when I run them on GitHub.
@TerryLam2010 As this pull request is quite large and already takes a lot of time in reviewing. I suggest scheduling an online meeting for a thorough, quick review. If that works for you, please email me at nobodyiam@gmail.com to arrange a suitable time.
What's the purpose of this PR
add multiple appId pull into config see https://github.com/apolloconfig/apollo-java/issues/66
Which issue(s) this PR fixes:
Fixes #
Follow this checklist to help us incorporate your contribution quickly and easily:
Summary by CodeRabbit
New Features
appId
parameter across various configuration classes, allowing configuration queries and changes to be associated with a specific application ID.getAccessKeySecret(String appId)
to manage access keys based on application IDs.appId
.MultipleConfig
annotation to support multiple application IDs.Changes in APIs
appId
.ApolloConfigChangeListener
annotation to includeappId
attribute.EnableApolloConfig
annotation to includemultipleConfigs
attribute for handling multiple configurations.Refactor
appId
.These changes enhance the ability to manage and query configurations on a per-application basis, improving flexibility and granularity in configuration management.