Skip to content
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

[7.x] Optimize which Rest resources are used by the Rest tests. (#53299) #53766

Merged
merged 1 commit into from
Mar 19, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions modules/aggs-matrix-stats/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ esplugin {
classname 'org.elasticsearch.search.aggregations.matrix.MatrixAggregationPlugin'
hasClientJar = true
}

restResources {
restApi {
includeCore '_common', 'indices', 'cluster', 'index', 'search', 'nodes'
}
}
6 changes: 6 additions & 0 deletions modules/analysis-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ esplugin {
extendedPlugins = ['lang-painless']
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'cluster', 'search', 'nodes', 'bulk', 'termvectors', 'explain', 'count'
}
}

dependencies {
compileOnly project(':modules:lang-painless')
}
6 changes: 6 additions & 0 deletions modules/ingest-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ dependencies {
compile project(':libs:elasticsearch-dissect')
}

restResources {
restApi {
includeCore '_common', 'ingest', 'cluster', 'indices', 'index', 'bulk', 'nodes', 'get', 'update', 'cat', 'mget'
}
}

testClusters.integTest {
// Needed in order to test ingest pipeline templating:
// (this is because the integTest node is not using default distribution, but only the minimal number of required modules)
Expand Down
6 changes: 6 additions & 0 deletions modules/ingest-geoip/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ dependencies {
testCompile 'org.elasticsearch:geolite2-databases:20191119'
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'cluster', 'nodes', 'get', 'ingest'
}
}

task copyDefaultGeoIp2DatabaseFiles(type: Copy) {
from { zipTree(configurations.testCompile.files.find { it.name.contains('geolite2-databases') }) }
into "${project.buildDir}/ingest-geoip"
Expand Down
6 changes: 6 additions & 0 deletions modules/ingest-user-agent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ esplugin {
classname 'org.elasticsearch.ingest.useragent.IngestUserAgentPlugin'
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'cluster', 'nodes', 'get', 'ingest'
}
}

testClusters.integTest {
extraConfigFile 'ingest-user-agent/test-regexes.yml', file('src/test/test-regexes.yml')
}
5 changes: 5 additions & 0 deletions modules/lang-expression/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ dependencies {
compile 'org.ow2.asm:asm-commons:5.0.4'
compile 'org.ow2.asm:asm-tree:5.0.4'
}
restResources {
restApi {
includeCore '_common', 'indices', 'index', 'cluster', 'nodes', 'search'
}
}

dependencyLicenses {
mapping from: /lucene-.*/, to: 'lucene'
Expand Down
6 changes: 6 additions & 0 deletions modules/lang-mustache/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ dependencies {
compile "com.github.spullara.mustache.java:compiler:0.9.6"
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes', 'indices', 'index', 'bulk',
'put_script', 'render_search_template', 'search_template', 'msearch_template', 'lang_mustache'
}
}
7 changes: 7 additions & 0 deletions modules/lang-painless/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ dependencyLicenses {
mapping from: /asm-.*/, to: 'asm'
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes', 'indices', 'index', 'search', 'get', 'bulk', 'update',
'scripts_painless_execute', 'put_script', 'delete_script'
}
}

test {
// in WhenThingsGoWrongTests we intentionally generate an out of memory error, this prevents the heap from being dumped to disk
jvmArgs '-XX:-OmitStackTraceInFastThrow', '-XX:-HeapDumpOnOutOfMemoryError'
Expand Down
6 changes: 6 additions & 0 deletions modules/mapper-extras/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ esplugin {
classname 'org.elasticsearch.index.mapper.MapperExtrasPlugin'
hasClientJar = true
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes', 'indices', 'index', 'search', 'get'
}
}
6 changes: 6 additions & 0 deletions modules/parent-join/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ esplugin {
classname 'org.elasticsearch.join.ParentJoinPlugin'
hasClientJar = true
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes', 'indices', 'index', 'search'
}
}
5 changes: 5 additions & 0 deletions modules/percolator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ dependencies {
testCompile project(path: ':modules:parent-join', configuration: 'runtime')
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'search', 'msearch'
}
}
dependencyLicenses {
// Don't check the client's license. We know it.
dependencies = project.configurations.runtime.fileCollection {
Expand Down
6 changes: 6 additions & 0 deletions modules/rank-eval/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ esplugin {
hasClientJar = true
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'rank_eval'
}
}

testClusters.integTest {
// Modules who's integration is explicitly tested in integration tests
module file(project(':modules:lang-mustache').tasks.bundlePlugin.archiveFile)
Expand Down
7 changes: 7 additions & 0 deletions modules/reindex/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ dependencies {
testCompile project(path: ':modules:parent-join', configuration: 'runtime')
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes', 'indices', 'index', 'get', 'search', 'mget', 'count',
'update_by_query', 'delete_by_query', 'reindex_rethrottle', 'tasks', 'reindex', 'put_script'
}
}

thirdPartyAudit.ignoreMissingClasses(
// Commons logging
'javax.servlet.ServletContextEvent',
Expand Down
8 changes: 7 additions & 1 deletion modules/repository-url/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ esplugin {
classname 'org.elasticsearch.plugin.repository.url.URLRepositoryPlugin'
}

// This directory is shared between two URL repositories and one FS repository in YAML integration tests
restResources {
restApi {
includeCore '_common', 'cluster', 'nodes', 'indices', 'index', 'bulk', 'count', 'snapshot'
}
}

// This directory is shared between two URL repositories and one FS repository in YAML integration tests
File repositoryDir = new File(project.buildDir, "shared-repository")

/** A task to start the URLFixture which exposes the repositoryDir over HTTP **/
Expand Down
6 changes: 6 additions & 0 deletions modules/transport-netty4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ dependencies {
compile "io.netty:netty-transport:${versions.netty}"
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes'
}
}

dependencyLicenses {
mapping from: /netty-.*/, to: 'netty'
}
Expand Down
6 changes: 6 additions & 0 deletions plugins/analysis-icu/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ dependencies {
compile "com.ibm.icu:icu4j:${versions.icu4j}"
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'search'
}
}

dependencyLicenses {
mapping from: /lucene-.*/, to: 'lucene'
}
Expand Down
6 changes: 6 additions & 0 deletions plugins/analysis-kuromoji/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ dependencies {
compile "org.apache.lucene:lucene-analyzers-kuromoji:${versions.lucene}"
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'search'
}
}

dependencyLicenses {
mapping from: /lucene-.*/, to: 'lucene'
}
Expand Down
5 changes: 5 additions & 0 deletions plugins/analysis-nori/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ dependencies {
compile "org.apache.lucene:lucene-analyzers-nori:${versions.lucene}"
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'search'
}
}
dependencyLicenses {
mapping from: /lucene-.*/, to: 'lucene'
}
Expand Down
6 changes: 6 additions & 0 deletions plugins/analysis-phonetic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ dependencies {
compile "commons-codec:commons-codec:${versions.commonscodec}"
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'search'
}
}

dependencyLicenses {
mapping from: /lucene-.*/, to: 'lucene'
}
6 changes: 6 additions & 0 deletions plugins/analysis-smartcn/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ dependencies {
compile "org.apache.lucene:lucene-analyzers-smartcn:${versions.lucene}"
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'search'
}
}

dependencyLicenses {
mapping from: /lucene-.*/, to: 'lucene'
}
Expand Down
6 changes: 6 additions & 0 deletions plugins/analysis-stempel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ dependencies {
compile "org.apache.lucene:lucene-analyzers-stempel:${versions.lucene}"
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'search'
}
}

dependencyLicenses {
mapping from: /lucene-.*/, to: 'lucene'
}
6 changes: 6 additions & 0 deletions plugins/analysis-ukrainian/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ dependencies {
compile "ua.net.nlp:morfologik-ukrainian-search:3.7.5"
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'search'
}
}

dependencyLicenses {
mapping from: /lucene-.*/, to: 'lucene'
mapping from: /morfologik-.*/, to: 'lucene'
Expand Down
5 changes: 5 additions & 0 deletions plugins/discovery-azure-classic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ dependencies {
compile 'javax.xml.bind:jaxb-api:2.2.2'
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes'
}
}
// needed to be consistent with ssl host checking
String host = InetAddress.getLoopbackAddress().getHostAddress()

Expand Down
6 changes: 6 additions & 0 deletions plugins/discovery-ec2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ dependencies {
compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes'
}
}

dependencyLicenses {
mapping from: /aws-java-sdk-.*/, to: 'aws-java-sdk'
mapping from: /jackson-.*/, to: 'jackson'
Expand Down
6 changes: 6 additions & 0 deletions plugins/discovery-ec2/qa/amazon-ec2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ dependencies {
testCompile project(path: ':plugins:discovery-ec2', configuration: 'runtime')
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes'
}
}

final int ec2NumberOfNodes = 3

Map<String, Object> expansions = [
Expand Down
6 changes: 6 additions & 0 deletions plugins/discovery-gce/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ dependencies {
compile "commons-codec:commons-codec:${versions.commonscodec}"
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes'
}
}

dependencyLicenses {
mapping from: /google-.*/, to: 'google'
}
Expand Down
6 changes: 6 additions & 0 deletions plugins/discovery-gce/qa/gce/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ dependencies {
testCompile project(path: ':plugins:discovery-gce', configuration: 'runtime')
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes'
}
}

/** A task to start the GCEFixture which emulates a GCE service **/
task gceFixture(type: AntFixture) {
dependsOn compileTestJava
Expand Down
6 changes: 6 additions & 0 deletions plugins/ingest-attachment/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ dependencies {
compile 'org.apache.commons:commons-lang3:3.9'
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes', 'ingest', 'index', 'get'
}
}

dependencyLicenses {
mapping from: /apache-mime4j-.*/, to: 'apache-mime4j'
}
Expand Down
6 changes: 6 additions & 0 deletions plugins/mapper-annotated-text/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ esplugin {
description 'The Mapper Annotated_text plugin adds support for text fields with markup used to inject annotation tokens into the index.'
classname 'org.elasticsearch.plugin.mapper.AnnotatedTextPlugin'
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'search'
}
}
6 changes: 6 additions & 0 deletions plugins/mapper-murmur3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ esplugin {
description 'The Mapper Murmur3 plugin allows to compute hashes of a field\'s values at index-time and to store them in the index.'
classname 'org.elasticsearch.plugin.mapper.MapperMurmur3Plugin'
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'search'
}
}
6 changes: 6 additions & 0 deletions plugins/mapper-size/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ esplugin {
description 'The Mapper Size plugin allows document to record their uncompressed size at index time.'
classname 'org.elasticsearch.plugin.mapper.MapperSizePlugin'
}

restResources {
restApi {
includeCore '_common', 'indices', 'index', 'get'
}
}
6 changes: 6 additions & 0 deletions plugins/repository-azure/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ dependencies {
testCompile project(':test:fixtures:azure-fixture')
}

restResources {
restApi {
includeCore '_common', 'cluster', 'nodes'
}
}

dependencyLicenses {
mapping from: /azure-.*/, to: 'azure'
mapping from: /jackson-.*/, to: 'jackson'
Expand Down
Loading