From be23cdbc39124130e320652ac4d392e08511711e Mon Sep 17 00:00:00 2001 From: Lorenzo Dematte Date: Mon, 25 Aug 2025 17:36:46 +0200 Subject: [PATCH 1/2] Move away from DistributionType.DEFAULT --- x-pack/plugin/downsample/qa/rest/build.gradle | 15 +++++++++------ .../xpack/downsample/DownsampleRestIT.java | 10 ++++++++-- .../downsample/DownsampleWithBasicRestIT.java | 10 ++++++++-- .../downsample/DownsampleWithSecurityRestIT.java | 4 ++-- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/x-pack/plugin/downsample/qa/rest/build.gradle b/x-pack/plugin/downsample/qa/rest/build.gradle index 4384010b06ad5..23bd9c94fb2f7 100644 --- a/x-pack/plugin/downsample/qa/rest/build.gradle +++ b/x-pack/plugin/downsample/qa/rest/build.gradle @@ -12,6 +12,15 @@ apply plugin: 'elasticsearch.internal-test-artifact' dependencies { testImplementation project(path: ':test:test-clusters') yamlRestTestImplementation project(path: xpackModule('rollup')) + + clusterModules project(path: xpackModule('downsample')) + clusterModules project(path: xpackModule('analytics')) + clusterModules project(path: xpackModule('ilm')) + clusterModules project(':modules:lang-painless') + clusterModules project(':modules:mapper-extras') + clusterModules project(':modules:data-streams') + clusterModules project(':modules:aggregations') + clusterModules project(':modules:ingest-common') } restResources { @@ -24,12 +33,6 @@ artifacts { restXpackTests(new File(projectDir, "src/yamlRestTest/resources/rest-api-spec/test")) } -tasks.named('yamlRestTest') { - usesDefaultDistribution("to be triaged") -} -tasks.named('yamlRestCompatTest') { - usesDefaultDistribution("to be triaged") -} if (buildParams.inFipsJvm){ // This test cluster is using a BASIC license and FIPS 140 mode is not supported in BASIC tasks.named("yamlRestTest").configure{enabled = false } diff --git a/x-pack/plugin/downsample/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleRestIT.java b/x-pack/plugin/downsample/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleRestIT.java index dfef469a27812..88f5e8af4b9b4 100644 --- a/x-pack/plugin/downsample/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleRestIT.java +++ b/x-pack/plugin/downsample/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleRestIT.java @@ -10,7 +10,6 @@ import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import org.elasticsearch.test.cluster.ElasticsearchCluster; -import org.elasticsearch.test.cluster.local.distribution.DistributionType; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; import org.junit.ClassRule; @@ -19,7 +18,14 @@ public class DownsampleRestIT extends ESClientYamlSuiteTestCase { @ClassRule public static ElasticsearchCluster cluster = ElasticsearchCluster.local() - .distribution(DistributionType.DEFAULT) + .module("x-pack-downsample") + .module("x-pack-ilm") + .module("lang-painless") + .module("aggregations") // for auto_date_histogram + .module("mapper-extras") // for scaled_float + .module("x-pack-analytics") // for histogram + .module("data-streams") // for time series + .module("ingest-common") .setting("xpack.license.self_generated.type", "trial") .setting("xpack.security.enabled", "false") .build(); diff --git a/x-pack/plugin/downsample/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleWithBasicRestIT.java b/x-pack/plugin/downsample/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleWithBasicRestIT.java index d9a44ab1508d6..fe8b9a7f1192f 100644 --- a/x-pack/plugin/downsample/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleWithBasicRestIT.java +++ b/x-pack/plugin/downsample/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleWithBasicRestIT.java @@ -10,7 +10,6 @@ import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import org.elasticsearch.test.cluster.ElasticsearchCluster; -import org.elasticsearch.test.cluster.local.distribution.DistributionType; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; import org.junit.ClassRule; @@ -19,7 +18,14 @@ public class DownsampleWithBasicRestIT extends ESClientYamlSuiteTestCase { @ClassRule public static ElasticsearchCluster cluster = ElasticsearchCluster.local() - .distribution(DistributionType.DEFAULT) + .module("x-pack-downsample") + .module("x-pack-ilm") + .module("lang-painless") + .module("aggregations") // for auto_date_histogram + .module("mapper-extras") // for scaled_float + .module("x-pack-analytics") // for histogram + .module("data-streams") // for time series + .module("ingest-common") .setting("xpack.security.enabled", "false") .build(); diff --git a/x-pack/plugin/downsample/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleWithSecurityRestIT.java b/x-pack/plugin/downsample/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleWithSecurityRestIT.java index afde47b377400..117d24e8060bb 100644 --- a/x-pack/plugin/downsample/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleWithSecurityRestIT.java +++ b/x-pack/plugin/downsample/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleWithSecurityRestIT.java @@ -13,7 +13,6 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.cluster.ElasticsearchCluster; -import org.elasticsearch.test.cluster.local.distribution.DistributionType; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; import org.junit.ClassRule; @@ -25,7 +24,8 @@ public class DownsampleWithSecurityRestIT extends ESClientYamlSuiteTestCase { @ClassRule public static ElasticsearchCluster cluster = ElasticsearchCluster.local() - .distribution(DistributionType.DEFAULT) + .module("x-pack-downsample") + .module("x-pack-analytics") // for histogram .setting("xpack.license.self_generated.type", "trial") .setting("xpack.security.enabled", "true") .user(USERNAME, PASSWORD) From efef6efc0874f0a4f0012f1a98ae34e71f6257f4 Mon Sep 17 00:00:00 2001 From: Lorenzo Dematte Date: Wed, 27 Aug 2025 09:39:15 +0200 Subject: [PATCH 2/2] Fix gradle project dependency syntax --- x-pack/plugin/downsample/build.gradle | 6 +++--- x-pack/plugin/downsample/qa/rest/build.gradle | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/x-pack/plugin/downsample/build.gradle b/x-pack/plugin/downsample/build.gradle index b823f1cd2e266..bfb481e6f7c74 100644 --- a/x-pack/plugin/downsample/build.gradle +++ b/x-pack/plugin/downsample/build.gradle @@ -12,10 +12,10 @@ base { } dependencies { - compileOnly project(path: xpackModule('core')) + compileOnly project(xpackModule('core')) testImplementation project(':modules:data-streams') - testImplementation project(path: xpackModule('ilm')) - compileOnly project(path: xpackModule('mapper-aggregate-metric')) + testImplementation project(xpackModule('ilm')) + compileOnly project(xpackModule('mapper-aggregate-metric')) testImplementation(testArtifact(project(xpackModule('core')))) testImplementation project(xpackModule('ccr')) testImplementation project(xpackModule('esql')) diff --git a/x-pack/plugin/downsample/qa/rest/build.gradle b/x-pack/plugin/downsample/qa/rest/build.gradle index 23bd9c94fb2f7..9ba8c7bfe31d1 100644 --- a/x-pack/plugin/downsample/qa/rest/build.gradle +++ b/x-pack/plugin/downsample/qa/rest/build.gradle @@ -10,12 +10,12 @@ apply plugin: 'elasticsearch.yaml-rest-compat-test' apply plugin: 'elasticsearch.internal-test-artifact' dependencies { - testImplementation project(path: ':test:test-clusters') - yamlRestTestImplementation project(path: xpackModule('rollup')) + testImplementation project(':test:test-clusters') + yamlRestTestImplementation project(xpackModule('rollup')) - clusterModules project(path: xpackModule('downsample')) - clusterModules project(path: xpackModule('analytics')) - clusterModules project(path: xpackModule('ilm')) + clusterModules project(xpackModule('downsample')) + clusterModules project(xpackModule('analytics')) + clusterModules project(xpackModule('ilm')) clusterModules project(':modules:lang-painless') clusterModules project(':modules:mapper-extras') clusterModules project(':modules:data-streams')