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

Implement deprecation info API for joda-java migration #42010

Closed
pgomulka opened this issue May 9, 2019 · 2 comments
Closed

Implement deprecation info API for joda-java migration #42010

pgomulka opened this issue May 9, 2019 · 2 comments
Labels
:Core/Infra/Core Core issues without another label v6.8.1 v7.3.0

Comments

@pgomulka
Copy link
Contributor

pgomulka commented May 9, 2019

There is currently no warning for joda-java pattern incompatibilities.
We should warn users who migrate from 6.x to 7 that their pattern might no longer work in 7 unless they update their mappings.
Pattern can be used in:

  • index mapping
  • pipeline processors: date processor and date index name processor

Incompatible pattern specifiers:

  • Y year-of-era in joda should be updated to y year-of-era in java.time. Y means week-based-year in java.time
  • y year in joda, should be updated to u year in java.time. The difference between year and year-of-era is that year can have values <0 for years before the era.
  • x week-yearin joda should be updated toYin java.time.x` means zone-offset in java.time.
  • C century is no longer supported in java.time
  • Z time zone offset/id has the same meaning in java.time as it had previously in joda. However it will fail when parsing Z in a date. For instance 2019-05-09T14:24:00.000Z (in Zulu/UTC time) will fail parsing. X could be used instead and correctly parse this date.
  • z time zone text - Will print Z for Zulu given UTC timezone. Previously joda was printing UTC for utc timezone.
@pgomulka pgomulka added :Core/Infra/Core Core issues without another label v8.0.0 labels May 9, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@pgomulka pgomulka added 7x and removed v8.0.0 7x labels May 9, 2019
pgomulka added a commit that referenced this issue May 29, 2019
Implement deprecation checks for joda-java.time incompatible patterns. The checks scan through indicies and pipelines looking for date fields in mappings and processors which might fail in 7.0 where java.time is used.

relates #42010
pgomulka added a commit that referenced this issue Jun 5, 2019
 Some clusters might have been already migrated to version 7 without being warned about the joda-java migration changes.
Deprecation api on that version will give them guidance on what patterns need to be changed.
relates. This change is using the same logic like in 6.8 that is: verifying the pattern is from the incompatible set ('y'-Y', 'C', 'Z' etc), not from predifined set, not prefixed with 8. AND was also created in 6.x. Mappings created in 7.x are considered migrated and should not generate warnings

There is no pipeline check (present on 6.8) as it is impossible to verify when the pipeline was created, and therefore to make sure the format is depracated or not
#42010
@pgomulka
Copy link
Contributor Author

pgomulka commented Jun 6, 2019

closed by #42659 (7.x) and #41956 (6.8)

@pgomulka pgomulka closed this as completed Jun 6, 2019
@pgomulka pgomulka self-assigned this Jun 6, 2019
pgomulka added a commit that referenced this issue Jun 10, 2019
)

Some clusters might have been already migrated to version 7 without being warned about the joda-java migration changes.
Deprecation api on that version will give them guidance on what patterns need to be changed.
relates. This change is using the same logic like in 6.8 that is: verifying the pattern is from the incompatible set ('y'-Y', 'C', 'Z' etc), not from predefined set, not prefixed with 8. AND was also created in 6.x. Mappings created in 7.x are considered migrated and should not generate warnings

There is no pipeline check (present on 6.8) as it is impossible to verify when the pipeline was created, and therefore to make sure the format is deprecated or not

backport#42659
closes #42010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label v6.8.1 v7.3.0
Projects
None yet
Development

No branches or pull requests

3 participants