elasticsearch/x-pack/qa/multi-project/core-rest-tests-with-multip.../build.gradle

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

124 lines
5.1 KiB
Groovy
Raw Normal View History

apply plugin: 'elasticsearch.internal-yaml-rest-test'
import org.elasticsearch.gradle.util.GradleUtils
dependencies {
testImplementation project(':x-pack:qa')
testImplementation project(':x-pack:qa:multi-project:yaml-test-framework')
clusterModules project(':modules:mapper-extras')
clusterModules project(':modules:rank-eval')
clusterModules project(':modules:ingest-common')
clusterModules project(':modules:reindex')
clusterModules project(':modules:analysis-common')
clusterModules project(':modules:health-shards-availability')
clusterModules project(':modules:data-streams')
clusterModules project(':modules:multi-project')
clusterModules project(xpackModule('stack'))
clusterModules project(xpackModule('ilm'))
clusterModules project(xpackModule('mapper-constant-keyword'))
clusterModules project(xpackModule('wildcard'))
restTestConfig project(path: ':modules:data-streams', configuration: "basicRestSpecs")
}
// let the yamlRestTests see the classpath of test
GradleUtils.extendSourceSet(project, "test", "yamlRestTest", tasks.named("yamlRestTest"))
restResources {
restTests {
includeCore '*'
}
}
tasks.named("yamlRestTest").configure {
ArrayList<String> blacklist = [
/* These tests don't work on multi-project yet - we need to go through each of them and make them work */
'^cat.aliases/10_basic/*',
'^cat.indices/*/*',
'^cat.recovery/*/*',
'^cat.segments/*/*',
'^cat.snapshots/*/*',
'^cluster.allocation_explain/10_basic/Cluster shard allocation explanation test with a closed index', // closed index
'^cluster.desired_balance/10_basic/*',
'^cluster.health/10_basic/cluster health with closed index', // closed index
'^cluster.health/30_indices_options/cluster health with expand_wildcards', // closed index
Make ClusterBlocks compatible with multi-project (MP-1859) This PR adds a project layer to ClusterBlocks so that it works with multiple projects. Previously the index level blocks are tracked with a map of "index-name to set-of-blocks". This is changed to be a map of "project-id to project-level-blocks", where project-level-blocks currently contains just the index level blocks. This structure is expandable in that if we want to support project-wide blocks (as opposed to cluster-wide blocks), they can be added to the project-level-blocks. One alternative that has been considered but decided against is to update the map of "index-name to set-of-blocks" to "index-object/uuid to set-of-blocks". This has a few issues: (1) ClusterBlocks has no references to Metadata so it cannot serve a request for index blocks given an index name (bwc); (2) Similarly, when deserializing from an old node, which provides only index names, there is no easy way to lookup for the associated index UUID; (3) The structure is rather rigid and cannot be easily expanded for project-level blocks if they become a thing; (4) No easy way to get all indices blocks for a project. I chose to keep all existing ClusterBlocks methods that take index name as argument to avoid too many cascading changes. I marked all of them as deprecated for removal so that they can be easily spotted, replaced and removed in subsequent PRs. That said, there are still test failures where cascading changes are necessary. Relates: ES-10162
2024-12-13 12:59:07 +08:00
'^cluster.state/20_filtering/*', // add index blocks needs to be project aware
'^cluster.state/30_expand_wildcards/*',
'^cluster.stats/*/*',
'^data_stream/lifecycle/*/*',
'^data_stream/10_basic/Create data stream with failure store',
'^data_stream/10_basic/Delete data stream with failure store',
'^data_stream/10_basic/Get data stream and check DSL and ILM information',
'^data_stream/20_unsupported_apis/*',
'^data_stream/40_supported_apis/*',
'^data_stream/80_resolve_index_data_streams/*',
'^data_stream/90_reindex/*',
'^data_stream/100_delete_by_query/*',
'^data_stream/110_update_by_query/*',
'^data_stream/130_migrate_to_data_stream/*',
'^data_stream/140_data_stream_aliases/*',
'^data_stream/150_tsdb/*',
'^data_stream/170_modify_data_stream/*',
'^data_stream/180_simulate_existing_data_stream/*',
'^data_stream/190_failure_store_redirection/*',
'^data_stream/200_rollover_failure_store/*',
'^health/10_basic/*',
'^health/40_diagnosis/*',
'^indices.blocks/*/*',
'^indices.clear_cache/*/*',
'^indices.clone/*/*',
'^indices.get/*/*',
'^indices.get_alias/10_basic/Get alias against closed indices',
'^indices.get_mapping/50_wildcard_expansion/*', // index close does not work
'^indices.open/*/*',
'^indices.open/*/*/*',
'^indices.put_settings/10_basic/Test preserve_existing settings', // index close does not work
'^indices.recovery/*/*',
'^indices.resolve_cluster/*/*',
'^indices.resolve_cluster/*/*/*',
'^indices.resolve_index/*/*',
'^indices.segments/*/*',
'^indices.shard_stores/*/*',
'^indices.shrink/*/*',
'^indices.simulate_index_template/*/*',
'^indices.simulate_template/*/*',
'^indices.sort/10_basic/*',
'^indices.split/*/*',
'^indices.stats/15_open_closed_state/*',
'^indices.stats/20_translog/*',
'^indices.stats/30_segments/*',
'^indices.stats/60_field_usage/*',
'^migration/*/*',
'^search/80_indices_options/Closed index',
'^search/380_sort_segments_on_timestamp/Test that index segments are NOT sorted on timestamp field when @timestamp field is dynamically added',
'^search.highlight/10_unified/*',
'^search.vectors/41_knn_search_bbq_hnsw/*',
'^search.vectors/41_knn_search_byte_quantized/*',
'^search.vectors/41_knn_search_half_byte_quantized/*',
'^search.vectors/42_knn_search_bbq_flat/*',
'^search.vectors/50_dense_vector_field_usage/*',
'^search.vectors/60_dense_vector_dynamic_mapping/*',
'^search.vectors/70_dense_vector_telemetry/*',
'^search.vectors/180_update_dense_vector_type/*',
'^simulate.ingest/*/*',
'^snapshot.clone/*/*',
'^snapshot.create/*/*',
'^snapshot.delete/*/*',
'^snapshot.get/*/*',
'^snapshot.get_repository/20_repository_uuid/*',
'^snapshot.restore/*/*',
'^snapshot.status/*/*',
'^synonyms/*/*',
'^tsdb/10_settings/*',
'^tsdb/30_snapshot/*',
'^tsdb/80_index_resize/*',
// The following tests are muted because the functionality that they are testing is not available in a multi-project setup
// The node removal prevalidation is only available for a Stateful deployment.
'^cluster.prevalidate_node_removal/*/*'
];
if (buildParams.isSnapshotBuild() == false) {
blacklist += [];
}
systemProperty 'tests.rest.blacklist', blacklist.join(',')
}