-
Notifications
You must be signed in to change notification settings - Fork 828
[SCB-2892]add dynamic config for etcd #4595
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
Conversation
… through etcd service registration, and add a demo to test etcd - Implement the method of finding all instances of EtcdDiscovery - Implement the registered instance information of EtcdRegistration to etcd - Implement silent exception information printing, see MuteExceptionUtil for details
- Complete the registration of etcd by the service consumer, and then the consumer can make API calls to the service provider and pass all test cases.
- add code style - add linelint style - run spotbugs - run ratcheck - update docker config
…related components - Refactor the findServiceInstances method and use SingletonManager to manage watchers - Optimize the output format of exception information in log records - Update the Etcd image version in the test environment - Removed redundant information in README.md - Added SingletonManager class for managing singleton objects
…ance discovery mechanism - Add authentication information configuration in EtcdDiscovery - Implement remote-based observers to monitor changes in service instances - Use SingletonManager to store and manage instance information - Update Docker Compose configuration to allow unauthenticated access - Modify the sayHello method in ProviderController to return the service address
- Removed environment variable acquisition logic - Modify the return value to the request parameter name
-Remove SingletonManager class and use ConcurrentHashMapEx instead - Modify the ETCD_DISCOVERY_ROOT path and unify the registration center path format - Optimize the implementation of findServiceInstances and findServices methods - Add watchMap for storing watch clients
…related dependencies - Refactored the EtcdDiscovery class and removed unnecessary variables and methods - Optimized the acquisition and monitoring logic of service instances - Updated protobuf version to 3.25.3 - Removed unnecessary protobuf-java dependency in demo project
- Added EtcdClient class to implement etcd client function - Add EtcdConfig class to handle etcd configuration parameters - Implement the EtcdDynamicPropertiesSource class to support dynamic configuration -Added MuteExceptionUtil tool class to handle exceptions - Update application.yml file to add etcd configuration - Modify the pom.xml file to add etcd related dependencies
…annotations on the executeFunction method of the MuteExceptionUtil class in the config-etcd and registry-etcd modules.
demo/demo-etcd/provider/pom.xml
Outdated
| <exclusions> | ||
| <exclusion> | ||
| <artifactId>commons-logging</artifactId> | ||
| <groupId>commons-logging</groupId> | ||
| </exclusion> | ||
| </exclusions> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>config-etcd</artifactId> | ||
| <exclusions> | ||
| <exclusion> | ||
| <artifactId>commons-logging</artifactId> | ||
| <groupId>commons-logging</groupId> | ||
| </exclusion> | ||
| </exclusions> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exclude commons-logging in registry-etcd & registry-config
demo/demo-etcd/test-client/pom.xml
Outdated
| <exclusions> | ||
| <exclusion> | ||
| <artifactId>commons-logging</artifactId> | ||
| <groupId>commons-logging</groupId> | ||
| </exclusion> | ||
| </exclusions> | ||
| </dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registry-local may be not dependent on commons-logging. if it is exclude in registry-local, not here.
…figuration item - add a new configuration item test1 in application.yml - Updated test cases to check correct loading of environment, application, service, version and tag configurations - Modify the path of configuration items to adapt to the new hierarchical structure
- Corrected "zookeeper" in the exception message to "etcd" to ensure that the exception information is consistent with the actual configuration source used - This modification improves the accuracy and readability of the error message and helps to quickly locate and solve the problem
| testEnvironment(); | ||
| testApplication(); | ||
| testService(); | ||
| testVersion(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test case for priority? e.g. service configuration override application configuration
…nchronous execution support - Added ConditionWaiter class for asynchronous task execution and result waiting - Modify findServices and getInstances methods to asynchronous execution - Remove redundant code and optimize code structure - Update related examples and configuration files to remove commons-logging dependency
…Client class - Added new configuration parameters in application.yml - Optimized the character encoding in the EtcdClient class, using StandardCharsets.UTF_8 instead of Charset.defaultCharset() - Updated test cases and added configuration parameter coverage tests
…unused Charset import package in the EtcdClient class in the config-etcd project is removed, which simplifies the code structure and improves the readability and maintainability of the code.
- Update the EtcdConfigIT test case to use specific version numbers instead of general configurations - Modify the EtcdDiscovery class to improve version information extraction logic - Optimize code structure to improve readability and performance
add dynamic config for etcd