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

Adds rollup metadata service that deals with initializing and crud operations #337

Merged
merged 4 commits into from
Nov 18, 2020

Conversation

dbbaughe
Copy link
Contributor

…erations for the a rollup metadata

Issue #, if available:

Description of changes:

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

@codecov
Copy link

codecov bot commented Nov 17, 2020

Codecov Report

Merging #337 (32fc6ca) into master (7764bae) will decrease coverage by 0.06%.
The diff coverage is 46.23%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #337      +/-   ##
============================================
- Coverage     71.37%   71.30%   -0.07%     
- Complexity     1195     1219      +24     
============================================
  Files           181      181              
  Lines          6249     6448     +199     
  Branches        954      984      +30     
============================================
+ Hits           4460     4598     +138     
- Misses         1314     1361      +47     
- Partials        475      489      +14     
Impacted Files Coverage Δ Complexity Δ
...ch/indexmanagement/rollup/RollupMetadataService.kt 46.76% <46.23%> (-53.24%) 14.00 <13.00> (+13.00) ⬇️
...nt/indexstatemanagement/model/destination/Chime.kt 40.90% <0.00%> (-13.64%) 2.00% <0.00%> (-2.00%)
...icsearch/indexmanagement/IndexManagementIndices.kt 63.33% <0.00%> (-3.34%) 10.00% <0.00%> (ø%)
...anagement/indexstatemanagement/model/Transition.kt 64.61% <0.00%> (-3.08%) 5.00% <0.00%> (ø%)
...ndexstatemanagement/IndexStateManagementHistory.kt 77.88% <0.00%> (+1.92%) 28.00% <0.00%> (+1.00%)
...management/rollup/model/dimension/DateHistogram.kt 72.05% <0.00%> (+4.41%) 21.00% <0.00%> (+3.00%)
...rch/indexmanagement/rollup/model/RollupMetadata.kt 44.64% <0.00%> (+16.66%) 13.00% <0.00%> (+7.00%)
...statemanagement/model/destination/CustomWebhook.kt 94.20% <0.00%> (+28.98%) 14.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 7764bae...a9c3f70. Read the comment docs.

@dbbaughe dbbaughe changed the title Serv Adds rollup metadata service that deals with initializing and crud operations Nov 17, 2020
// TODO: Could make this an extension function of DateHistogram and add to some utility file
private fun getRoundingStrategy(dateHistogram: DateHistogram): Rounding {
val intervalString = (dateHistogram.calendarInterval ?: dateHistogram.fixedInterval) as String
// TODO: Make sure the interval string is validated before getting here so we don't get errors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's double check this to confirm when is the earliest point in the code that we catch an incorrect DateHistogram interval string. If it isn't caught before here, we would enter the else statement and may not handle the case correctly.

Perhaps we could leverage the DateHistogram builder and try to enter the given interval string and catch any exceptions that are thrown. If this approach is valid, we could even put it in the init of Rollup to validate early.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will cover TODOs and any cleanups needed in follow up PRs to unblock the PRs that depend on these.

@dbbaughe dbbaughe merged commit c1e0f1f into opendistro-for-elasticsearch:master Nov 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants