-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Settings: Combining affix setting with group settings results in namespace issues #28047
Copy link
Copy link
Closed
Labels
Description
Description of the problem including expected versus actual behavior:
When combining an affix setting with a group setting, the affix setting does not correctly find the namespaces anymore due to a non-working regex in Setting.AffixKey, when any setting inside that group setting is supplied
Steps to reproduce:
public void testAffixNamespacesWithGroupSetting() {
final Setting.AffixSetting<Settings> affixSetting =
Setting.affixKeySetting("prefix.","suffix",
(key) -> Setting.groupSetting(key + ".", Setting.Property.Dynamic, Setting.Property.NodeScope));
// works
assertThat(affixSetting.getNamespaces(Settings.builder().put("prefix.infix.suffix", "anything").build()), hasSize(1));
// breaks, has size 0
assertThat(affixSetting.getNamespaces(Settings.builder().put("prefix.infix.suffix.anything", "anything").build()), hasSize(1));
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.