Commit edb577f
authored
Scripted metric aggregations: add deprecation warning and system (#32944)
property to control legacy params (#31597)
* Scripted metric aggregations: add deprecation warning and system
property to control legacy params
Scripted metric aggregation params._agg/_aggs are replaced by
state/states context variables. By default the old params are still
present, and a deprecation warning is emitted when Scripted Metric
Aggregations are used. A new system property can be used to disable the
legacy params. This functionality will be removed in a future revision.
* Fix minor style issue and docs test failure
* Disable deprecated params._agg/_aggs in tests and revise tests to use
state/states instead
* Add integration test covering deprecated scripted metrics aggs
params._agg/_aggs access
* Disable deprecated params._agg/_aggs in docs integration tests and
revise stored scripts to use state/states instead
* Revert unnecessary migrations doc change
A relevant note should be added in the changes destined for 7.0; this
PR is going to be backported to 6.x.
* Replace deprecated _agg param bwc integration test with a couple of
unit tests
* Fix compatibility test after merge
* Rename backwards compatibility system property per code review
feedback
* Tweak deprecation warning text per review feedback
buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
server/src/test/java/org/elasticsearch/search/aggregations/metrics/scrip
ted/ScriptedMetricAggregatorTests.java
/Users/colings86/dev/work/git/elasticsearch/.git/worktrees/elasticsearch
-6.x/CHERRY_PICK_HEAD
buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
server/src/main/java/org/elasticsearch/script/ScriptedMetricAggContexts.
java
server/src/main/java/org/elasticsearch/search/aggregations/metrics/scrip
ted/InternalScriptedMetric.java
server/src/main/java/org/elasticsearch/search/aggregations/metrics/scrip
ted/ScriptedMetricAggregatorFactory.java
server/src/test/java/org/elasticsearch/search/aggregations/metrics/Scrip
tedMetricIT.java
server/src/test/java/org/elasticsearch/search/aggregations/metrics/scrip
ted/InternalScriptedMetricAggStateV6CompatTests.java
server/src/test/java/org/elasticsearch/search/aggregations/metrics/scrip
ted/InternalScriptedMetricTests.java
server/src/test/java/org/elasticsearch/search/aggregations/metrics/scrip
ted/ScriptedMetricAggregatorAggStateV6CompatTests.java
server/src/test/java/org/elasticsearch/search/aggregations/metrics/scrip
ted/ScriptedMetricAggregatorTests.java1 parent c1b95ba commit edb577f
File tree
11 files changed
+502
-246
lines changed- buildSrc/src/main/groovy/org/elasticsearch/gradle
- docs
- server
- src
- main/java/org/elasticsearch
- script
- search/aggregations/metrics/scripted
- test/java/org/elasticsearch/search/aggregations/metrics
- scripted
11 files changed
+502
-246
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
798 | 798 | | |
799 | 799 | | |
800 | 800 | | |
| 801 | + | |
| 802 | + | |
801 | 803 | | |
802 | 804 | | |
803 | 805 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
393 | 396 | | |
394 | 397 | | |
395 | 398 | | |
396 | | - | |
| 399 | + | |
397 | 400 | | |
398 | 401 | | |
399 | 402 | | |
400 | 403 | | |
401 | 404 | | |
402 | | - | |
| 405 | + | |
403 | 406 | | |
404 | 407 | | |
405 | 408 | | |
406 | 409 | | |
407 | 410 | | |
408 | | - | |
| 411 | + | |
409 | 412 | | |
410 | 413 | | |
411 | 414 | | |
412 | 415 | | |
413 | 416 | | |
414 | | - | |
| 417 | + | |
415 | 418 | | |
416 | 419 | | |
417 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
34 | 55 | | |
35 | 56 | | |
36 | 57 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
88 | 96 | | |
89 | | - | |
90 | 97 | | |
91 | 98 | | |
92 | 99 | | |
| |||
0 commit comments