-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
Add data-streams tests to restResourcesZip #130424
Conversation
Pinging @elastic/es-data-management (Team:Data Management) |
@@ -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') |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done!
Just a heads-up: you'll have some conflicts because I only added that artifact for multi-project in version 9.1, so you'll have to add the artifact yourself in the backported commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @pquentin!
* Add data-streams tests to restResourcesZip * Rename to restTests
💔 Backport failed
You can use sqren/backport to manually backport by running |
* Add data-streams tests to restResourcesZip * Rename to restTests
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
* Add data-streams tests to restResourcesZip * Rename to restTests (cherry picked from commit f99cf38) # Conflicts: # modules/data-streams/build.gradle # x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle
* Add data-streams tests to restResourcesZip * Rename to restTests (cherry picked from commit f99cf38) # Conflicts: # modules/data-streams/build.gradle # x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle
* Add data-streams tests to restResourcesZip * Rename to restTests (cherry picked from commit f99cf38) # Conflicts: # modules/data-streams/build.gradle # x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle
* Add data-streams tests to restResourcesZip * Rename to restTests (cherry picked from commit f99cf38) # Conflicts: # modules/data-streams/build.gradle # x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle
After running
./gradlew restResourcesZip
,x-pack/rest-resources-zip/build/distributions/rest-resources-zip-9.2.0-SNAPSHOT.zip
contains the new data stream tests.