Skip to content

Add data-streams tests to restResourcesZip #130424

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

Merged
merged 4 commits into from
Jul 3, 2025
Merged
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
1 change: 1 addition & 0 deletions x-pack/rest-resources-zip/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies {
freeTests project(path: ':rest-api-spec', configuration: 'restTests')
freeTests project(path: ':modules:aggregations', configuration: 'restTests')
freeTests project(path: ':modules:analysis-common', configuration: 'restTests')
freeTests project(path: ':modules:data-streams', configuration: 'basicRestSpecs')
Copy link
Contributor

Choose a reason for hiding this comment

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

I only exposed these YAML tests in 1fd8a8b for the multi-project work, and these changes are temporary - in the future we'll run these tests in MP mode directly, instead of including them in a dedicated MP suite. Therefore, I'm inclined to say we shouldn't have this line here. However, that does beg the question of whether these tests are currently included or not. Do you know if there's a way we can determine whether that's the case? TBH, I'm not really sure what this rest-resources-zip is used for exactly. A lot of modules seem to be missing here.

Copy link
Member Author

Choose a reason for hiding this comment

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

rest-resources-zip is only used for https://github.com/elastic/elasticsearch-specification validation where we run a subset of YAML tests separately from the Elasticsearch YAML test runner. I'm adding modules and plugins one by one because each new one adds a lot of work on our side.

Is there a better way to add data stream YAML tests to rest-resources-zip?

Copy link
Member

Choose a reason for hiding this comment

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

I believe rest-resources-zip is used for testing the elasticsearch-specification project.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, thanks both!

Is there a better way to add data stream YAML tests to rest-resources-zip?

This looks like the way to me. I think I'd be inclined to rename the artifact to restTests for consistency with the other artifacts you've added. That would look something like this:

diff --git a/modules/data-streams/build.gradle b/modules/data-streams/build.gradle
index b5fcae8115c..51bb04185cf 100644
--- a/modules/data-streams/build.gradle
+++ b/modules/data-streams/build.gradle
@@ -87,7 +87,7 @@ tasks.named("yamlRestCompatTestTransform").configure({ task ->
 })
 
 configurations {
-  basicRestSpecs {
+  restTests {
     attributes {
       attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, ArtifactTypeDefinition.DIRECTORY_TYPE)
     }
@@ -95,5 +95,5 @@ configurations {
 }
 
 artifacts {
-  basicRestSpecs(new File(projectDir, "src/yamlRestTest/resources/rest-api-spec/test"))
+  restTests(new File(projectDir, "src/yamlRestTest/resources/rest-api-spec/test"))
 }
diff --git a/x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle b/x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle
index 2d33cccb00b..80602818356 100644
--- a/x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle
+++ b/x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle
@@ -28,7 +28,7 @@ dependencies {
   clusterModules project(xpackModule('mapper-constant-keyword'))
   clusterModules project(xpackModule('wildcard'))
   clusterModules project(':test:external-modules:test-multi-project')
-  restTestConfig project(path: ':modules:data-streams', configuration: "basicRestSpecs")
+  restTestConfig project(path: ':modules:data-streams', configuration: "restTests")
   restTestConfig project(path: ':modules:ingest-common', configuration: "basicRestSpecs")
   restTestConfig project(path: ':modules:reindex', configuration: "basicRestSpecs")
   restTestConfig project(path: ':modules:streams', configuration: "basicRestSpecs")

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, done!

freeTests project(path: ':modules:ingest-geoip', configuration: 'restTests')
compatApis project(path: ':rest-api-spec', configuration: 'restCompatSpecs')
compatApis project(path: ':x-pack:plugin', configuration: 'restCompatSpecs')
Expand Down