Skip to content

Commit 1593c06

Browse files
authored
Add blog links to locale deprecation warnings (elastic#113474) (elastic#113534)
1 parent 20d56d0 commit 1593c06

File tree

7 files changed

+36
-34
lines changed

7 files changed

+36
-34
lines changed

modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/30_date_processor.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
setup:
22
- requires:
3-
test_runner_features: allowed_warnings
3+
test_runner_features: allowed_warnings_regex
44
---
55
teardown:
66
- do:
@@ -100,8 +100,8 @@ teardown:
100100
"Test date processor with no timezone configured":
101101

102102
- do:
103-
allowed_warnings:
104-
- 'Date format [dd/MMM/yyyy:H:m:s Z] contains textual field specifiers that could change in JDK 23'
103+
allowed_warnings_regex:
104+
- 'Date format \[dd/MMM/yyyy:H:m:s Z] contains textual field specifiers that could change in JDK 23.*'
105105
ingest.put_pipeline:
106106
id: "my_pipeline"
107107
# sample formats from beats, featuring mongodb, icinga, apache
@@ -170,8 +170,8 @@ teardown:
170170
- match: { acknowledged: true }
171171

172172
- do:
173-
allowed_warnings:
174-
- 'Date format [dd/MMM/yyyy:H:m:s Z] contains textual field specifiers that could change in JDK 23'
173+
allowed_warnings_regex:
174+
- 'Date format \[dd/MMM/yyyy:H:m:s Z] contains textual field specifiers that could change in JDK 23.*'
175175
index:
176176
index: test
177177
id: "1"
@@ -211,8 +211,8 @@ teardown:
211211
---
212212
"Test week based date parsing":
213213
- do:
214-
allowed_warnings:
215-
- 'Date format [YYYY-ww] contains week-date field specifiers that are changing in JDK 23'
214+
allowed_warnings_regex:
215+
- 'Date format \[YYYY-ww] contains week-date field specifiers that are changing in JDK 23.*'
216216
indices.create:
217217
index: test
218218
body:
@@ -223,8 +223,8 @@ teardown:
223223
format: YYYY-ww
224224

225225
- do:
226-
allowed_warnings:
227-
- 'Date format [YYYY-ww] contains week-date field specifiers that are changing in JDK 23'
226+
allowed_warnings_regex:
227+
- 'Date format \[YYYY-ww] contains week-date field specifiers that are changing in JDK 23.*'
228228
ingest.put_pipeline:
229229
id: "my_pipeline"
230230
body: >

qa/smoke-test-ingest-with-all-dependencies/src/yamlRestTest/resources/rest-api-spec/test/ingest/20_combine_processors.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
setup:
22
- requires:
3-
test_runner_features: allowed_warnings
3+
test_runner_features: allowed_warnings_regex
44
---
55
"Test with date processor":
66
- do:
7-
allowed_warnings:
8-
- 'Date format [dd/MMM/yyyy:HH:mm:ss xx] contains textual field specifiers that could change in JDK 23'
7+
allowed_warnings_regex:
8+
- 'Date format \[dd/MMM/yyyy:HH:mm:ss xx] contains textual field specifiers that could change in JDK 23.*'
99
ingest.put_pipeline:
1010
id: "_id"
1111
body: >
@@ -46,8 +46,8 @@ setup:
4646
- match: { acknowledged: true }
4747

4848
- do:
49-
allowed_warnings:
50-
- 'Date format [dd/MMM/yyyy:HH:mm:ss xx] contains textual field specifiers that could change in JDK 23'
49+
allowed_warnings_regex:
50+
- 'Date format \[dd/MMM/yyyy:HH:mm:ss xx] contains textual field specifiers that could change in JDK 23.*'
5151
index:
5252
index: test
5353
id: "1"
@@ -77,8 +77,8 @@ setup:
7777
---
7878
"Test with date processor and ECS-v1":
7979
- do:
80-
allowed_warnings:
81-
- 'Date format [dd/MMM/yyyy:HH:mm:ss xx] contains textual field specifiers that could change in JDK 23'
80+
allowed_warnings_regex:
81+
- 'Date format \[dd/MMM/yyyy:HH:mm:ss xx] contains textual field specifiers that could change in JDK 23.*'
8282
ingest.put_pipeline:
8383
id: "_id"
8484
body: >
@@ -108,8 +108,8 @@ setup:
108108
- match: { acknowledged: true }
109109

110110
- do:
111-
allowed_warnings:
112-
- 'Date format [dd/MMM/yyyy:HH:mm:ss xx] contains textual field specifiers that could change in JDK 23'
111+
allowed_warnings_regex:
112+
- 'Date format \[dd/MMM/yyyy:HH:mm:ss xx] contains textual field specifiers that could change in JDK 23.*'
113113
index:
114114
index: test
115115
id: "1"

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/180_locale_dependent_mapping.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
setup:
22
- requires:
3-
test_runner_features: allowed_warnings
3+
test_runner_features: allowed_warnings_regex
44
---
55
"Test Index and Search locale dependent mappings / dates":
66
- do:
7-
allowed_warnings:
8-
- 'Date format [E, d MMM yyyy HH:mm:ss Z] contains textual field specifiers that could change in JDK 23'
7+
allowed_warnings_regex:
8+
- 'Date format \[E, d MMM yyyy HH:mm:ss Z] contains textual field specifiers that could change in JDK 23.*'
99
indices.create:
1010
index: test_index
1111
body:

server/src/main/java/org/elasticsearch/common/time/DateUtils.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,15 +404,17 @@ static void checkTextualDateFormats(String format) {
404404
deprecationLogger.warn(
405405
DeprecationCategory.PARSING,
406406
"cldr_date_formats_" + format,
407-
"Date format [{}] contains textual field specifiers that could change in JDK 23",
407+
"Date format [{}] contains textual field specifiers that could change in JDK 23."
408+
+ " For more information, see https://ela.st/jdk-23-locales",
408409
format
409410
);
410411
}
411412
if (CONTAINS_WEEK_DATE_SPECIFIERS.test(format)) {
412413
deprecationLogger.warn(
413414
DeprecationCategory.PARSING,
414415
"cldr_week_dates_" + format,
415-
"Date format [{}] contains week-date field specifiers that are changing in JDK 23",
416+
"Date format [{}] contains week-date field specifiers that are changing in JDK 23."
417+
+ " For more information, see https://ela.st/jdk-23-locales",
416418
format
417419
);
418420
}

x-pack/plugin/esql/qa/testFixtures/src/main/resources/date.csv-spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ dateFormatLocale
481481
from employees | where emp_no == 10049 or emp_no == 10050 | sort emp_no
482482
| eval birth_month = date_format("MMMM", birth_date) | keep emp_no, birth_date, birth_month;
483483
ignoreOrder:true
484-
warningRegex:Date format \[MMMM] contains textual field specifiers that could change in JDK 23
484+
warningRegex:Date format \[MMMM] contains textual field specifiers that could change in JDK 23.*
485485

486486
emp_no:integer | birth_date:datetime | birth_month:keyword
487487
10049 | null | null

x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/70_locale.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ setup:
2828
"Date format with default locale":
2929
- do:
3030
allowed_warnings_regex:
31-
- "No limit defined, adding default limit of \\[.*\\]"
32-
- "Date format \\[MMMM] contains textual field specifiers that could change in JDK 23"
31+
- 'No limit defined, adding default limit of \[.*]'
32+
- 'Date format \[MMMM] contains textual field specifiers that could change in JDK 23.*'
3333
esql.query:
3434
body:
3535
query: 'FROM events | eval fixed_format = date_format("MMMM", @timestamp), variable_format = date_format(format, @timestamp) | sort @timestamp | keep @timestamp, fixed_format, variable_format'
@@ -51,7 +51,7 @@ setup:
5151
- do:
5252
allowed_warnings_regex:
5353
- "No limit defined, adding default limit of \\[.*\\]"
54-
- "Date format \\[MMMM] contains textual field specifiers that could change in JDK 23"
54+
- "Date format \\[MMMM] contains textual field specifiers that could change in JDK 23.*"
5555
esql.query:
5656
body:
5757
query: 'FROM events | eval fixed_format = date_format("MMMM", @timestamp), variable_format = date_format(format, @timestamp) | sort @timestamp | keep @timestamp, fixed_format, variable_format'

x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/security/authz/13_index_datemath.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
setup:
33
- requires:
4-
test_runner_features: allowed_warnings
4+
test_runner_features: allowed_warnings_regex
55
- skip:
66
features: headers
77

@@ -56,8 +56,8 @@ teardown:
5656
}
5757
5858
- do:
59-
allowed_warnings:
60-
- 'Date format [YYYY.MM] contains week-date field specifiers that are changing in JDK 23'
59+
allowed_warnings_regex:
60+
- 'Date format \[YYYY\.MM] contains week-date field specifiers that are changing in JDK 23.*'
6161
headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user
6262
bulk:
6363
body:
@@ -93,8 +93,8 @@ teardown:
9393
}
9494
9595
- do:
96-
allowed_warnings:
97-
- 'Date format [YYYY.MM] contains week-date field specifiers that are changing in JDK 23'
96+
allowed_warnings_regex:
97+
- 'Date format \[YYYY\.MM] contains week-date field specifiers that are changing in JDK 23.*'
9898
headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user
9999
bulk:
100100
body:
@@ -121,8 +121,8 @@ teardown:
121121
---
122122
"Test bulk indexing with datemath when only some are allowed":
123123
- do:
124-
allowed_warnings:
125-
- 'Date format [YYYY] contains week-date field specifiers that are changing in JDK 23'
124+
allowed_warnings_regex:
125+
- 'Date format \[YYYY] contains week-date field specifiers that are changing in JDK 23.*'
126126
headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user
127127
bulk:
128128
body:

0 commit comments

Comments
 (0)