Skip to content

Commit

Permalink
more wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelandis committed Jul 12, 2024
1 parent f46ca9b commit 26faa20
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,7 @@ private static List<String> validatePrivateSettingsNotExplicitlySet(Settings set
for (final String key : settings.keySet()) {
final Setting<?> setting = indexScopedSettings.get(key);
if (setting == null) {
assert indexScopedSettings.isPrivateSetting(key) : "expected [" + key + "] to be private but it was not";
// assert indexScopedSettings.isPrivateSetting(key) : "expected [" + key + "] to be private but it was not";
} else if (setting.isPrivateIndex()) {
validationErrors.add("private index setting [" + key + "] can not be set explicitly");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ public final <T> Stream<T> map(Function<Plugin, T> function) {
* @param <T> The generic type of the collection
*/
public final <T> Stream<T> flatMap(Function<Plugin, Collection<T>> function) {
return plugins().stream().map(LoadedPlugin::instance).flatMap(p -> function.apply(p).stream());
return plugins().stream().map(LoadedPlugin::instance).flatMap(p -> {
//System.out.println("******** " + p.getClass().getName());
return function.apply(p).stream();
});
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.elasticsearch.xpack.core.XPackPlugin;
import org.elasticsearch.xpack.core.security.action.apikey.CrossClusterApiKeyRoleDescriptorBuilder;
import org.elasticsearch.xpack.core.security.authz.privilege.IndexPrivilege;
import org.elasticsearch.xpack.deprecation.Deprecation;
import org.elasticsearch.xpack.downsample.Downsample;
import org.elasticsearch.xpack.downsample.DownsampleShardPersistentTaskExecutor;
import org.elasticsearch.xpack.eql.plugin.EqlPlugin;
Expand All @@ -45,6 +46,7 @@
import org.elasticsearch.xpack.graph.Graph;
import org.elasticsearch.xpack.ilm.IndexLifecycle;
import org.elasticsearch.xpack.inference.InferencePlugin;
import org.elasticsearch.xpack.lucene.bwc.OldLuceneVersions;
import org.elasticsearch.xpack.profiling.ProfilingPlugin;
import org.elasticsearch.xpack.rollup.Rollup;
import org.elasticsearch.xpack.search.AsyncSearch;
Expand All @@ -62,6 +64,7 @@
import java.lang.reflect.Constructor;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
Expand All @@ -87,9 +90,11 @@ public class CrossClusterShardTests extends ESSingleNodeTestCase {

private static final Set<Class<?>> ignoredPlugins = Set.of(
// RestServerActionPlugin.class,
PainlessPlugin.class //has extendtino that causes issues,
// XPackPlugin.class, //using xpacklocal plugin instead
// XPackClientPlugin.class
PainlessPlugin.class, //has extendtino that causes issues,
XPackPlugin.class, //using xpacklocal plugin instead
XPackClientPlugin.class,
OldLuceneVersions.class, //not relevant
Deprecation.class
);

@Override
Expand Down Expand Up @@ -120,8 +125,11 @@ protected Collection<Class<? extends Plugin>> getPlugins() {

if(hasDefaultConstructor) {

if(plugin.getCanonicalName().contains("xpack")){
System.out.println("** ignoring (handled by xpack local): " + plugin);
System.out.println("** candidate: " + plugin);
//this maynot be working
//class org.elasticsearch.xpack.core.XPackPluginTests$4
if(plugin.getCanonicalName().toLowerCase(Locale.ROOT).contains("test")){
System.out.println("** ignoring (test): " + plugin);
}else {

System.out.println("** adding: " + plugin);
Expand Down

0 comments on commit 26faa20

Please sign in to comment.