Change default locale of date mappers to ENGLISH#112799
Change default locale of date mappers to ENGLISH#112799thecoop merged 14 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
|
Hi @thecoop, I've created a changelog YAML for you. Note that since this PR is labelled |
37df868 to
b2ba412
Compare
|
Pinging @elastic/es-data-management (Team:Data Management) |
| deserialized.getMetadata(), | ||
| instance.getBucketInnerInterval() | ||
| ); | ||
| assertEqualInstances(instance, modified); |
There was a problem hiding this comment.
This test can no longer pass, as the locale of the formatter changes from root to english, and that can't be easily fixed up afterwards
There was a problem hiding this comment.
I am not familiar with this test but I would wonder if we need a replacement of some sort for it. This is a question for the @elastic/es-analytical-engine I think . cc @nik9000
|
@elasticmachine update branch |
javanna
left a comment
There was a problem hiding this comment.
I pinged a couple of folks to check some specific aspects of this change. I think my only question is whether we have proper rolling upgrade tests that cover for this change, to make sure that the change in default value is applied and works properly. Not sure if you have given this some thought already.
| deserialized.getMetadata(), | ||
| instance.getBucketInnerInterval() | ||
| ); | ||
| assertEqualInstances(instance, modified); |
There was a problem hiding this comment.
I am not familiar with this test but I would wonder if we need a replacement of some sort for it. This is a question for the @elastic/es-analytical-engine I think . cc @nik9000
| configuredSettings.remove("type"); | ||
| configuredSettings.remove("meta"); | ||
| configuredSettings.remove("format"); | ||
| configuredSettings.remove("locale"); |
There was a problem hiding this comment.
@martijnvg do you know the answer to this question? Are you ok with this change?
I don't think we need to do anything specific here, as the default locale is not persisted in a 'canonical' definition, so it'll just use whatever the specified parameter default is |
martijnvg
left a comment
There was a problem hiding this comment.
The org.elasticsearch.index.mapper package side LGTM.
e0a2896 to
460576b
Compare
| String zoneId = in.readString(); | ||
| this.timeZone = ZoneId.of(zoneId); | ||
| this.formatter = DateFormatter.forPattern(formatterPattern).withZone(this.timeZone); | ||
| this.formatter = DateFormatter.forPattern(formatterPattern).withZone(this.timeZone).withLocale(locale); |
There was a problem hiding this comment.
Should we set this to DEFAULT_LOCALE rather than serialize it? It looks like you can't change it.
There was a problem hiding this comment.
It is read from the specified DateTimeFormatter, which can be changed by eg the new locale option on RangeFieldMapper
💔 Backport failed
You can use sqren/backport to manually backport by running |
English is not changing between COMPAT and CLDR locale databases, whereas ROOT is
English is not changing between COMPAT and CLDR locale databases, whereas ROOT is
This resolves #112744
Date processors are covered by #112796