Merge branch '2021' into 2021-lane-router

pull/1785/head
Haotian Zhang 3 months ago committed by GitHub
commit 47ac009541
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -17,4 +17,5 @@
- [fix: fix parsing ConfigurationProperties value with RefreshScope.](https://github.com/Tencent/spring-cloud-tencent/pull/1781)
- [refactor: optimize performance.](https://github.com/Tencent/spring-cloud-tencent/pull/1782)
- [fix: fix NacosDiscoveryRegistryAutoConfiguration and PolarisAuthAutoConfiguration still initiation when polaris disabled.](https://github.com/Tencent/spring-cloud-tencent/pull/1783)
- [fix: fix cb rule no update bug.](https://github.com/Tencent/spring-cloud-tencent/pull/1786)
- [feat: support traffic gray lane router](https://github.com/Tencent/spring-cloud-tencent/pull/1785)

@ -64,9 +64,9 @@ public class ConfigurationModifier implements PolarisConfigurationConfigModifier
@Override
public void modify(ConfigurationImpl configuration) {
configuration.getGlobal().getAPI().setReportEnable(false);
configuration.getGlobal().getStatReporter().setEnable(false);
configuration.getConsumer().getOutlierDetection().setWhen(OutlierDetectionConfig.When.never);
configuration.getConsumer().getCircuitBreaker().setEnable(false);
if (!polarisContextProperties.getEnabled() || !polarisConfigProperties.isEnabled()) {
return;

@ -275,9 +275,11 @@ public class PolarisConfigDataLocationResolver implements
if (!bootstrapContext.isRegistered(SDKContext.class)) {
SDKContext sdkContext = sdkContext(resolverContext,
polarisConfigProperties, polarisCryptoConfigProperties, polarisContextProperties);
// not init reporter when creating config data temp SDK context.
if (sdkContext.getConfig() instanceof ConfigurationImpl) {
// not init reporter when creating config data temp SDK context.
((ConfigurationImpl) sdkContext.getConfig()).getGlobal().getStatReporter().setEnable(false);
// not init circuit breaker when creating config data temp SDK context.
((ConfigurationImpl) sdkContext.getConfig()).getConsumer().getCircuitBreaker().setEnable(false);
}
sdkContext.init();
PolarisConfigSDKContextManager.setConfigSDKContext(sdkContext);

Loading…
Cancel
Save