-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[type:feat]The sync-data-http method adapts to the namespace transformation #5598
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
@Override | ||
protected void afterAppAuthChanged(final List<AppAuthData> changed, final DataEventTypeEnum eventType) { | ||
scheduler.execute(new DataChangeTask(ConfigGroupEnum.APP_AUTH)); | ||
scheduler.execute(new DataChangeTask(ConfigGroupEnum.APP_AUTH, "")); |
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.
why empty string?
I think http long pull just add shenyu-bootstrap<shenyu.namespaceId> as prefix for plugin,selector,rule,metadata and so on. |
* @return the configuration data | ||
*/ | ||
public ConfigData<?> fetchConfig(final ConfigGroupEnum groupKey) { | ||
public ConfigData<?> fetchConfig(final ConfigGroupEnum groupKey, final String namespaceId) { | ||
//todo:[Namespace] Currently, only plugin data is compatible with namespace, while other data is waiting for modification |
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.
why not remove this?
@@ -166,19 +177,20 @@ public void onPluginChanged(final List<PluginData> changed, final DataEventTypeE | |||
if (CollectionUtils.isEmpty(changed)) { | |||
return; | |||
} | |||
this.updatePluginCache(); | |||
this.afterPluginChanged(changed, eventType); | |||
Optional<String> namespaceId = changed.stream().map(PluginData::getNamespaceId).findFirst(); |
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.
you should judge Optional.isEmpty??
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.
avoid npe
shenyu-admin/src/test/java/org/apache/shenyu/admin/controller/ConfigControllerTest.java
Outdated
Show resolved
Hide resolved
...yu-admin/src/test/java/org/apache/shenyu/admin/listener/AbstractDataChangedListenerTest.java
Outdated
Show resolved
Hide resolved
# Conflicts: # shenyu-admin/src/main/java/org/apache/shenyu/admin/config/HttpLongPollingSyncConfiguration.java # shenyu-admin/src/test/java/org/apache/shenyu/admin/listener/AbstractDataChangedListenerTest.java
@@ -70,7 +70,9 @@ public class ShenyuConfig { | |||
private SpringCloudCacheConfig springCloudCache = new SpringCloudCacheConfig(); | |||
|
|||
private AlertConfig alert = new AlertConfig(); | |||
|
|||
|
|||
private String namespaceId = ""; |
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 set empty string
Make sure that:
./mvnw clean install -Dmaven.javadoc.skip=true
.