Skip to content

Commit 67a5424

Browse files
committed
Deprecate Behavioral Analytics CRUD APIs
1 parent 04422cd commit 67a5424

File tree

47 files changed

+424
-116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+424
-116
lines changed

rest-api-spec/src/main/resources/rest-api-spec/api/search_application.delete_behavioral_analytics.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
},
77
"stability": "experimental",
88
"visibility": "public",
9+
"deprecated": {
10+
"version": "9.0.0",
11+
"description": "Behavioral Analytics has been deprecated and will be removed in a future release."
12+
},
913
"headers": {
1014
"accept": [
1115
"application/json"

rest-api-spec/src/main/resources/rest-api-spec/api/search_application.get_behavioral_analytics.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
},
77
"stability": "experimental",
88
"visibility": "public",
9+
"deprecated": {
10+
"version": "9.0.0",
11+
"description": "Behavioral Analytics has been deprecated and will be removed in a future release."
12+
},
913
"headers": {
1014
"accept": [
1115
"application/json"
@@ -24,10 +28,10 @@
2428
"methods": [
2529
"GET"
2630
],
27-
"parts":{
28-
"name":{
29-
"type":"list",
30-
"description":"A comma-separated list of analytics collections to limit the returned information"
31+
"parts": {
32+
"name": {
33+
"type": "list",
34+
"description": "A comma-separated list of analytics collections to limit the returned information"
3135
}
3236
}
3337
}

rest-api-spec/src/main/resources/rest-api-spec/api/search_application.post_behavioral_analytics_event.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
},
77
"stability": "experimental",
88
"visibility": "public",
9+
"deprecated": {
10+
"version": "9.0.0",
11+
"description": "Behavioral Analytics has been deprecated and will be removed in a future release."
12+
},
913
"headers": {
1014
"accept": [
1115
"application/json"

rest-api-spec/src/main/resources/rest-api-spec/api/search_application.put_behavioral_analytics.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
"description": "Creates a behavioral analytics collection."
66
},
77
"stability": "experimental",
8+
"deprecated": {
9+
"version": "9.0.0",
10+
"description": "Behavioral Analytics has been deprecated and will be removed in a future release."
11+
},
812
"visibility": "public",
913
"headers": {
1014
"accept": [

x-pack/plugin/build.gradle

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -84,32 +84,36 @@ tasks.named("precommit").configure {
8484
dependsOn 'enforceYamlTestConvention', 'enforceApiSpecsConvention'
8585
}
8686

87-
tasks.named("yamlRestCompatTestTransform").configure({ task ->
88-
task.skipTest("esql/60_usage/Basic ESQL usage output (telemetry)", "The telemetry output changed. We dropped a column. That's safe.")
89-
task.skipTest("inference/inference_crud/Test get all", "Assertions on number of inference models break due to default configs")
90-
task.skipTest("esql/60_usage/Basic ESQL usage output (telemetry) snapshot version", "The number of functions is constantly increasing")
91-
task.skipTest("esql/60_usage/Basic ESQL usage output (telemetry) non-snapshot version", "The number of functions is constantly increasing")
92-
task.skipTest("esql/80_text/reverse text", "The output type changed from TEXT to KEYWORD.")
93-
task.skipTest("esql/80_text/values function", "The output type changed from TEXT to KEYWORD.")
94-
task.skipTest("privileges/11_builtin/Test get builtin privileges" ,"unnecessary to test compatibility")
95-
task.skipTest("esql/61_enrich_ip/Invalid IP strings", "We switched from exceptions to null+warnings for ENRICH runtime errors")
96-
task.skipTest("esql/180_match_operator/match with non text field", "Match operator can now be used on non-text fields")
97-
task.skipTest("esql/180_match_operator/match with functions", "Error message changed")
98-
task.skipTest("esql/40_unsupported_types/semantic_text declared in mapping", "The semantic text field format changed")
99-
task.skipTest("esql/190_lookup_join/Alias as lookup index", "LOOKUP JOIN does not support index aliases for now")
100-
task.skipTest("esql/190_lookup_join/alias-repeated-alias", "LOOKUP JOIN does not support index aliases for now")
101-
task.skipTest("esql/190_lookup_join/alias-repeated-index", "LOOKUP JOIN does not support index aliases for now")
102-
task.skipTest("esql/190_lookup_join/alias-pattern-multiple", "LOOKUP JOIN does not support index aliases for now")
103-
task.skipTest("esql/190_lookup_join/alias-pattern-single", "LOOKUP JOIN does not support index aliases for now")
104-
task.skipTest("esql/180_match_operator/match with disjunctions", "Disjunctions in full text functions work now")
105-
// Expected deprecation warning to compat yaml tests:
106-
task.addAllowedWarningRegex(".*rollup functionality will be removed in Elasticsearch.*")
107-
task.skipTest("esql/40_tsdb/from doc with aggregate_metric_double", "TODO: support for subset of metric fields")
108-
task.skipTest("esql/40_tsdb/stats on aggregate_metric_double", "TODO: support for subset of metric fields")
109-
task.skipTest("esql/40_tsdb/from index pattern unsupported counter", "TODO: support for subset of metric fields")
110-
task.skipTest("esql/40_unsupported_types/unsupported", "TODO: support for subset of metric fields")
111-
task.skipTest("esql/40_unsupported_types/unsupported with sort", "TODO: support for subset of metric fields")
112-
})
87+
tasks.named("yamlRestCompatTestTransform").configure(
88+
{ task ->
89+
task.skipTest("esql/60_usage/Basic ESQL usage output (telemetry)", "The telemetry output changed. We dropped a column. That's safe.")
90+
task.skipTest("inference/inference_crud/Test get all", "Assertions on number of inference models break due to default configs")
91+
task.skipTest("esql/60_usage/Basic ESQL usage output (telemetry) snapshot version", "The number of functions is constantly increasing")
92+
task.skipTest("esql/60_usage/Basic ESQL usage output (telemetry) non-snapshot version", "The number of functions is constantly increasing")
93+
task.skipTest("esql/80_text/reverse text", "The output type changed from TEXT to KEYWORD.")
94+
task.skipTest("esql/80_text/values function", "The output type changed from TEXT to KEYWORD.")
95+
task.skipTest("privileges/11_builtin/Test get builtin privileges", "unnecessary to test compatibility")
96+
task.skipTest("esql/61_enrich_ip/Invalid IP strings", "We switched from exceptions to null+warnings for ENRICH runtime errors")
97+
task.skipTest("esql/180_match_operator/match with non text field", "Match operator can now be used on non-text fields")
98+
task.skipTest("esql/180_match_operator/match with functions", "Error message changed")
99+
task.skipTest("esql/40_unsupported_types/semantic_text declared in mapping", "The semantic text field format changed")
100+
task.skipTest("esql/190_lookup_join/Alias as lookup index", "LOOKUP JOIN does not support index aliases for now")
101+
task.skipTest("esql/190_lookup_join/alias-repeated-alias", "LOOKUP JOIN does not support index aliases for now")
102+
task.skipTest("esql/190_lookup_join/alias-repeated-index", "LOOKUP JOIN does not support index aliases for now")
103+
task.skipTest("esql/190_lookup_join/alias-pattern-multiple", "LOOKUP JOIN does not support index aliases for now")
104+
task.skipTest("esql/190_lookup_join/alias-pattern-single", "LOOKUP JOIN does not support index aliases for now")
105+
task.skipTest("esql/180_match_operator/match with disjunctions", "Disjunctions in full text functions work now")
106+
// Expected deprecation warning to compat yaml tests:
107+
task.addAllowedWarningRegex(".*rollup functionality will be removed in Elasticsearch.*")
108+
task.skipTest("esql/40_tsdb/from doc with aggregate_metric_double", "TODO: support for subset of metric fields")
109+
task.skipTest("esql/40_tsdb/stats on aggregate_metric_double", "TODO: support for subset of metric fields")
110+
task.skipTest("esql/40_tsdb/from index pattern unsupported counter", "TODO: support for subset of metric fields")
111+
task.skipTest("esql/40_unsupported_types/unsupported", "TODO: support for subset of metric fields")
112+
task.skipTest("esql/40_unsupported_types/unsupported with sort", "TODO: support for subset of metric fields")
113+
// Behavioral Analytics deprecated in 9.0
114+
task.addAllowedWarning("Behavioral Analytics is deprecated and will be removed in a future release.")
115+
}
116+
)
113117

114118
tasks.named('yamlRestCompatTest').configure {
115119
systemProperty 'es.queryable_built_in_roles_enabled', 'false'

x-pack/plugin/ent-search/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/entsearch/20_usage.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ teardown:
2727

2828
---
2929
"xpack usage includes Enterprise Search":
30+
- requires:
31+
test_runner_features: [ allowed_warnings ]
3032

3133
- do:
3234
xpack.usage: { }
@@ -79,6 +81,8 @@ teardown:
7981
query: "{{query_string}}"
8082

8183
- do:
84+
allowed_warnings:
85+
- "Behavioral Analytics is deprecated and will be removed in a future release."
8286
search_application.put_behavioral_analytics:
8387
name: test-analytics-collection
8488

@@ -113,6 +117,8 @@ teardown:
113117
}
114118

115119
- do:
120+
allowed_warnings:
121+
- "Behavioral Analytics is deprecated and will be removed in a future release."
116122
search_application.delete_behavioral_analytics:
117123
name: test-analytics-collection
118124

x-pack/plugin/ent-search/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/entsearch/analytics/10_behavioral_analytics_list.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,55 @@
11
setup:
2+
- requires:
3+
test_runner_features: [ allowed_warnings ]
24
- do:
5+
allowed_warnings:
6+
- "Behavioral Analytics is deprecated and will be removed in a future release."
37
search_application.put_behavioral_analytics:
48
name: my-test-analytics-collection
59

610
- do:
11+
allowed_warnings:
12+
- "Behavioral Analytics is deprecated and will be removed in a future release."
713
search_application.put_behavioral_analytics:
814
name: my-test-analytics-collection2
915

1016
---
1117
teardown:
18+
- requires:
19+
test_runner_features: [ allowed_warnings ]
1220
- do:
21+
allowed_warnings:
22+
- "Behavioral Analytics is deprecated and will be removed in a future release."
1323
search_application.delete_behavioral_analytics:
1424
name: my-test-analytics-collection
1525

1626
- do:
27+
allowed_warnings:
28+
- "Behavioral Analytics is deprecated and will be removed in a future release."
1729
search_application.delete_behavioral_analytics:
1830
name: my-test-analytics-collection2
1931

2032
---
2133
"Get Analytics Collection for a particular collection":
2234
- do:
35+
allowed_warnings:
36+
- "Behavioral Analytics is deprecated and will be removed in a future release."
2337
search_application.get_behavioral_analytics:
2438
name: my-test-analytics-collection
2539

2640
- match: {
27-
"my-test-analytics-collection": {
28-
event_data_stream: {
29-
name: "behavioral_analytics-events-my-test-analytics-collection"
30-
}
41+
"my-test-analytics-collection": {
42+
event_data_stream: {
43+
name: "behavioral_analytics-events-my-test-analytics-collection"
3144
}
3245
}
46+
}
3347

3448
---
3549
"Get Analytics Collection list":
3650
- do:
51+
allowed_warnings:
52+
- "Behavioral Analytics is deprecated and will be removed in a future release."
3753
search_application.get_behavioral_analytics:
3854
name:
3955

@@ -56,6 +72,8 @@ teardown:
5672
"Get Analytics Collection - Resource does not exist":
5773
- do:
5874
catch: "missing"
75+
allowed_warnings:
76+
- "Behavioral Analytics is deprecated and will be removed in a future release."
5977
search_application.get_behavioral_analytics:
6078
name: test-nonexistent-analytics-collection
6179

x-pack/plugin/ent-search/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/entsearch/analytics/20_behavioral_analytics_put.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
teardown:
2+
- requires:
3+
test_runner_features: [ allowed_warnings ]
24
- do:
5+
allowed_warnings:
6+
- "Behavioral Analytics is deprecated and will be removed in a future release."
37
search_application.delete_behavioral_analytics:
48
name: test-analytics-collection
59

610
---
711
"Create Analytics Collection":
12+
- requires:
13+
test_runner_features: [ allowed_warnings ]
814
- do:
15+
allowed_warnings:
16+
- "Behavioral Analytics is deprecated and will be removed in a future release."
917
search_application.put_behavioral_analytics:
1018
name: test-analytics-collection
1119

@@ -14,14 +22,20 @@ teardown:
1422

1523
---
1624
"Create Analytics Collection - analytics collection already exists":
25+
- requires:
26+
test_runner_features: [ allowed_warnings ]
1727
- do:
28+
allowed_warnings:
29+
- "Behavioral Analytics is deprecated and will be removed in a future release."
1830
search_application.put_behavioral_analytics:
1931
name: test-analytics-collection
2032

2133
- match: { acknowledged: true }
2234

2335
- do:
2436
catch: bad_request
37+
allowed_warnings:
38+
- "Behavioral Analytics is deprecated and will be removed in a future release."
2539
search_application.put_behavioral_analytics:
2640
name: test-analytics-collection
2741

Original file line numberDiff line numberDiff line change
@@ -1,32 +1,50 @@
11
setup:
2+
- requires:
3+
test_runner_features: [ allowed_warnings ]
24
- do:
5+
allowed_warnings:
6+
- "Behavioral Analytics is deprecated and will be removed in a future release."
37
search_application.put_behavioral_analytics:
48
name: my-test-analytics-collection
59

610
---
711
teardown:
12+
- requires:
13+
test_runner_features: [ allowed_warnings ]
814
- do:
15+
allowed_warnings:
16+
- "Behavioral Analytics is deprecated and will be removed in a future release."
917
search_application.delete_behavioral_analytics:
1018
name: my-test-analytics-collection
1119
ignore: 404
1220

1321
---
1422
"Delete Analytics Collection":
23+
- requires:
24+
test_runner_features: [ allowed_warnings ]
1525
- do:
26+
allowed_warnings:
27+
- "Behavioral Analytics is deprecated and will be removed in a future release."
1628
search_application.delete_behavioral_analytics:
1729
name: my-test-analytics-collection
1830

1931
- match: { acknowledged: true }
2032

2133
- do:
2234
catch: "missing"
35+
allowed_warnings:
36+
- "Behavioral Analytics is deprecated and will be removed in a future release."
2337
search_application.get_behavioral_analytics:
2438
name: my-test-analytics-collection
2539

2640
---
2741
"Delete Analytics Collection - Analytics Collection does not exist":
42+
- requires:
43+
test_runner_features: [ allowed_warnings ]
2844
- do:
2945
catch: "missing"
46+
allowed_warnings:
47+
- "Behavioral Analytics is deprecated and will be removed in a future release."
3048
search_application.delete_behavioral_analytics:
3149
name: test-nonexistent-analytics-collection
3250

0 commit comments

Comments
 (0)