Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix handling various date formats for DateHistogram source field in continuous Rollups #385

Conversation

qreshi
Copy link
Contributor

@qreshi qreshi commented Jan 14, 2021

Issue #, if available: #374

Description of changes:
Continuous rollups encountered parse exceptions for certain date formats, this fix converts
the date field to epoch millis before calculating start and end time so that the logic is date format agnostic.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@qreshi qreshi added the bug Something isn't working label Jan 14, 2021
@codecov
Copy link

codecov bot commented Jan 14, 2021

Codecov Report

Merging #385 (6405a06) into master (ff33f16) will increase coverage by 0.22%.
The diff coverage is 75.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #385      +/-   ##
============================================
+ Coverage     76.29%   76.52%   +0.22%     
- Complexity     1454     1461       +7     
============================================
  Files           188      188              
  Lines          7332     7334       +2     
  Branches       1187     1188       +1     
============================================
+ Hits           5594     5612      +18     
+ Misses         1097     1081      -16     
  Partials        641      641              
Impacted Files Coverage Δ Complexity Δ
...ch/indexmanagement/rollup/RollupMetadataService.kt 75.24% <71.42%> (+6.09%) 34.00 <0.00> (+4.00)
...csearch/indexmanagement/rollup/util/RollupUtils.kt 80.49% <100.00%> (+2.58%) 0.00 <0.00> (ø)
...nt/indexstatemanagement/model/destination/Slack.kt 40.90% <0.00%> (-13.64%) 2.00% <0.00%> (-2.00%)
...adata/TransportUpdateManagedIndexMetaDataAction.kt 85.18% <0.00%> (-3.71%) 9.00% <0.00%> (-1.00%)
...agement/indexstatemanagement/ManagedIndexRunner.kt 55.04% <0.00%> (-0.62%) 41.00% <0.00%> (ø%)
...icsearch/indexmanagement/rollup/model/ISMRollup.kt 94.49% <0.00%> (+1.83%) 31.00% <0.00%> (+4.00%)
...nt/indexstatemanagement/model/destination/Chime.kt 54.54% <0.00%> (+13.63%) 4.00% <0.00%> (+2.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff33f16...6405a06. Read the comment docs.

@qreshi qreshi merged commit 1aa245e into opendistro-for-elasticsearch:master Jan 14, 2021
qreshi added a commit to qreshi/index-management that referenced this pull request Jan 14, 2021
…ontinuous Rollups (opendistro-for-elasticsearch#385)

* Fix date format parse errors for continuous rollups

* Fix RollupMetadataServiceTests due to recent changes

* Removed unused import in RollupMetadataService
dbbaughe pushed a commit that referenced this pull request Jan 14, 2021
…ontinuous Rollups (#385) (#386)

* Fix date format parse errors for continuous rollups

* Fix RollupMetadataServiceTests due to recent changes

* Removed unused import in RollupMetadataService
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants