Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,29 +81,6 @@ public void doCall() {
if (isModule == false || isXPackModule) {
addNoticeGeneration(project, extension);
}
project.afterEvaluate(p -> {
Copy link
Contributor Author

@breskeby breskeby Mar 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this was only used by internal plugins that

a) still rely on test cluster plugin,
b) extend other plugins
c) do not use default distribution

which is actually ZERO

@SuppressWarnings("unchecked")
NamedDomainObjectContainer<ElasticsearchCluster> testClusters = (NamedDomainObjectContainer<ElasticsearchCluster>) project
.getExtensions()
.getByName(TestClustersPlugin.EXTENSION_NAME);
p.getExtensions().getByType(PluginPropertiesExtension.class).getExtendedPlugins().forEach(pluginName -> {
// Auto add any dependent modules
findModulePath(project, pluginName).ifPresent(
path -> testClusters.configureEach(elasticsearchCluster -> elasticsearchCluster.module(path))
);
});
});
}

Optional<String> findModulePath(Project project, String pluginName) {
return project.getRootProject()
.getAllprojects()
.stream()
.filter(p -> GradleUtils.isModuleProject(p.getPath()))
.filter(p -> p.getPlugins().hasPlugin(PluginBuildPlugin.class))
.filter(p -> p.getExtensions().getByType(PluginPropertiesExtension.class).getName().equals(pluginName))
.findFirst()
.map(Project::getPath);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
map.put(LegacyRestTestBasePlugin.class, ":plugins:discovery-gce");
map.put(LegacyRestTestBasePlugin.class, ":plugins:mapper-annotated-text");
map.put(LegacyRestTestBasePlugin.class, ":plugins:mapper-murmur3");
map.put(LegacyRestTestBasePlugin.class, ":plugins:repository-hdfs");
map.put(LegacyRestTestBasePlugin.class, ":plugins:store-smb");
map.put(LegacyRestTestBasePlugin.class, ":qa:ccs-rolling-upgrade-remote-cluster");
map.put(LegacyRestTestBasePlugin.class, ":qa:mixed-cluster");
Expand All @@ -74,11 +73,7 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:ent-search");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:fleet");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:logstash");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:mapper-constant-keyword");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:mapper-unsigned-long");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:mapper-version");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:vector-tile");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:wildcard");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:mixed-tier-cluster");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:repository-old-versions");
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:rolling-upgrade");
Expand Down
4 changes: 4 additions & 0 deletions plugins/mapper-murmur3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ dependencies {
clusterModules project(':modules:lang-painless')
}

testClusters.configureEach {
module ":modules:lang-painless"
}

restResources {
restApi {
include '_common', 'indices', 'index', 'search'
Expand Down