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

[Rest Api Compatibility] Enable tests after types and cat api fixed #75179

Merged
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
19 changes: 13 additions & 6 deletions modules/analysis-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,18 @@ dependencies {
compileOnly project(':modules:lang-painless')
}

def v7compatibilityNotSupportedTests = {
return [
//marked as not needing compatible api
'indices.analyze/10_analyze/htmlStrip_deprecated', // Cleanup versioned deprecations in analysis #41560
'analysis-common/40_token_filters/delimited_payload_filter_error', //Remove preconfigured delimited_payload_filter #43686
'analysis-common/20_analyzers/standard_html_strip' // Cleanup versioned deprecations in analysis #41560
]
}

tasks.named("yamlRestCompatTest").configure {
systemProperty 'tests.rest.blacklist', [
'search.query/50_queries_with_synonyms/Test common terms query with stacked tokens',
'indices.analyze/10_analyze/htmlStrip_deprecated',
'analysis-common/40_token_filters/delimited_payload_filter_error',
'analysis-common/20_analyzers/standard_html_strip'
].join(',')
systemProperty 'tests.rest.blacklist', ([
'search.query/50_queries_with_synonyms/Test common terms query with stacked tokens', // #42654 - not sure, remove `common` query
Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is more tests that could be fixed by having #42654 available under compatible api.
@jimczi this item is marked as not_sure. Do you have any views on implementing compatible api for it?

]+ v7compatibilityNotSupportedTests())
.join(',')
}
10 changes: 3 additions & 7 deletions modules/ingest-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ tasks.named("thirdPartyAudit").configure {
)
}

tasks.named("yamlRestCompatTest").configure {
systemProperty 'tests.rest.blacklist', [
'ingest/80_foreach/Test foreach Processor',
'ingest/230_change_target_index/Test Change Target Index with Explicit Pipeline',
'ingest/230_change_target_index/Test Change Target Index with Default Pipeline'
].join(',')
}
tasks.named("transformV7RestTests").configure({ task ->
task.addAllowedWarningRegex("\\[types removal\\].*")
})
9 changes: 3 additions & 6 deletions modules/ingest-user-agent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ testClusters.all {
extraConfigFile 'ingest-user-agent/test-regexes.yml', file('src/test/test-regexes.yml')
}

tasks.named("yamlRestCompatTest").configure {
systemProperty 'tests.rest.blacklist', [
'ingest-useragent/30_custom_regex/Test user agent processor with custom regex file',
'ingest-useragent/20_useragent_processor/Test user agent processor with parameters'
].join(',')
}
tasks.named("transformV7RestTests").configure({ task ->
task.addAllowedWarningRegex("setting \\[ecs\\] is deprecated as ECS format is the default and only option")
Copy link
Contributor Author

@pgomulka pgomulka Jul 9, 2021

Choose a reason for hiding this comment

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

})
9 changes: 3 additions & 6 deletions modules/lang-mustache/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ restResources {
}
}

tasks.named("yamlRestCompatTest").configure {
systemProperty 'tests.rest.blacklist', [
'lang_mustache/60_typed_keys/Multisearch template with typed_keys parameter',
'lang_mustache/60_typed_keys/Search template with typed_keys parameter'
].join(',')
}
tasks.named("transformV7RestTests").configure({ task ->
task.addAllowedWarningRegex("\\[types removal\\].*")
})
7 changes: 0 additions & 7 deletions modules/repository-url/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,3 @@ testClusters.all {
}, PropertyNormalization.IGNORE_VALUE
}

tasks.named("yamlRestCompatTest").configure {
systemProperty 'tests.rest.blacklist', [
'repository_url/10_basic/Get a non existing snapshot',
'repository_url/10_basic/Restore with repository-url using http://',
'repository_url/10_basic/Restore with repository-url using file://'
].join(',')
}
10 changes: 7 additions & 3 deletions plugins/analysis-icu/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,15 @@ restResources {
tasks.named("dependencyLicenses").configure {
mapping from: /lucene-.*/, to: 'lucene'
}
def v7compatibilityNotSupportedTests = {
return [
//marked as not needing compatible api
'analysis_icu/10_basic/Normalization with deprecated unicodeSetFilter' // Cleanup versioned deprecations in analysis #41560
]
}

tasks.named("yamlRestCompatTest").configure {
systemProperty 'tests.rest.blacklist', [
'analysis_icu/10_basic/Normalization with deprecated unicodeSetFilter'
].join(',')
systemProperty 'tests.rest.blacklist', v7compatibilityNotSupportedTests().join(',')
}

tasks.named('splitPackagesAudit').configure {
Expand Down
18 changes: 11 additions & 7 deletions rest-api-spec/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,36 +71,40 @@ def v7compatibilityNotSupportedTests = {
'indices.stats/20_translog/Translog stats on closed indices without soft-deletes',

// upgrade api will only get a dummy endpoint returning an exception suggesting to use _reindex
'indices.upgrade/*/*'
'indices.upgrade/*/*',

'search.aggregation/20_terms/*profiler*', // The profiler results aren't backwards compatible.
'search.aggregation/370_doc_count_field/Test filters agg with doc_count', // Uses profiler for assertions which is not backwards compatible

'indices.create/10_basic/Create index without soft deletes', //Make soft-deletes mandatory in 8.0 #51122 - settings changes are note supported in Rest Api compatibility


'field_caps/30_filter/Field caps with index filter', //behaviour change after #63692 4digits dates are parsed as epoch and in quotes as year
]
}
tasks.named("yamlRestCompatTest").configure {
onlyIf {
// Skip these tests on Windows since the blacklist exceeds Windows CLI limits
OS.current() != OS.WINDOWS
}

systemProperty 'tests.rest.blacklist', ([
'cluster.voting_config_exclusions/10_basic/Throw exception when adding voting config exclusion and specifying both node_ids and node_names',
'cluster.voting_config_exclusions/10_basic/Throw exception when adding voting config exclusion without specifying nodes',
'field_caps/30_filter/Field caps with index filter',
'indices.create/10_basic/Create index without soft deletes',
'indices.flush/10_basic/Index synced flush rest test',
'indices.forcemerge/10_basic/Check deprecation warning when incompatible only_expunge_deletes and max_num_segments values are both set',
'indices.open/10_basic/?wait_for_active_shards default is deprecated',
'indices.open/10_basic/?wait_for_active_shards=index-setting',
// not fixing this in #70966
'indices.put_template/11_basic_with_types/Put template with empty mappings',
'search.aggregation/200_top_hits_metric/top_hits aggregation with sequence numbers',
'search.aggregation/20_terms/*profiler*', // The profiler results aren't backwards compatible.
'search.aggregation/51_filter_with_types/Filter aggs with terms lookup and ensure it\'s cached',
'search.aggregation/370_doc_count_field/Test filters agg with doc_count', // Uses profiler for assertions which is not backwards compatible
'search/150_rewrite_on_coordinator/Ensure that we fetch the document only once', //terms_lookup
Copy link
Contributor Author

Choose a reason for hiding this comment

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

already fixed, added back here by mistake due to merge conflict

'search/260_parameter_validation/test size=-1 is deprecated', //size=-1 change
'search/310_match_bool_prefix/multi_match multiple fields with cutoff_frequency throws exception', //cutoff_frequency
'search/340_type_query/type query', // type_query - probably should behave like match_all
] + v7compatibilityNotSupportedTests())
] + v7compatibilityNotSupportedTests())
.join(',')

}

tasks.named("transformV7RestTests").configure({ task ->
Expand Down
13 changes: 0 additions & 13 deletions x-pack/plugin/watcher/qa/rest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,3 @@ tasks.named("transformV7RestTests").configure({ task ->

})

tasks.named("yamlRestCompatTest").configure {
systemProperty 'tests.rest.blacklist', [
'mustache/25_array_compare/Basic array_compare watch',
'mustache/30_search_input/Test search input mustache integration (using request body and rest_total_hits_as_int)',
'mustache/30_search_input/Test search input mustache integration (using request body)',
'mustache/30_search_input/Test search input mustache integration (using request template and rest_total_hits_as_int)',
'mustache/30_search_input/Test search input mustache integration (using request template)',
'mustache/40_search_transform/Test search transform mustache integration (using request body)',
'mustache/40_search_transform/Test search transform mustache integration (using request template)',
].join(',')
}