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

Conversation

@bowenlan-amzn
Copy link
Contributor

@bowenlan-amzn bowenlan-amzn commented Dec 11, 2020

Issue #, if available:

Description of changes:

This PR aims to remove policyID usage in ISM

Previously policyID is used like a proxy for applying and removing policy to index, now we apply/remove policy by creating/deleting job document directly.

  • notice: for remove policy API: after deleting job document, we need to try removing metadata as well.

This PR is based on get all and explain all PRs
since explain API is related to policyID

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 Dec 11, 2020

Codecov Report

Merging #357 (6cfadb6) into master (c5054c5) will increase coverage by 0.31%.
The diff coverage is 76.95%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #357      +/-   ##
============================================
+ Coverage     77.23%   77.54%   +0.31%     
  Complexity     1511     1511              
============================================
  Files           197      196       -1     
  Lines          7748     7784      +36     
  Branches       1250     1244       -6     
============================================
+ Hits           5984     6036      +52     
+ Misses         1083     1071      -12     
+ Partials        681      677       -4     
Impacted Files Coverage Δ Complexity Δ
...agement/indexstatemanagement/ManagedIndexRunner.kt 55.38% <ø> (+0.33%) 41.00 <0.00> (ø)
...temanagement/resthandler/RestChangePolicyAction.kt 93.33% <ø> (ø) 6.00 <0.00> (ø)
...transport/action/explain/TransportExplainAction.kt 88.49% <0.00%> (ø) 2.00 <0.00> (ø)
...ort/action/getpolicy/TransportGetPoliciesAction.kt 85.00% <0.00%> (ø) 3.00 <0.00> (ø)
...ent/transport/action/addpolicy/AddPolicyRequest.kt 86.66% <33.33%> (ø) 6.00 <1.00> (ø)
...t/action/indexpolicy/TransportIndexPolicyAction.kt 76.71% <33.33%> (ø) 4.00 <0.00> (ø)
...action/changepolicy/TransportChangePolicyAction.kt 77.39% <50.00%> (+0.66%) 4.00 <0.00> (ø)
...action/removepolicy/TransportRemovePolicyAction.kt 72.85% <67.30%> (-0.73%) 2.00 <0.00> (ø)
...sport/action/addpolicy/TransportAddPolicyAction.kt 72.50% <67.79%> (-2.11%) 3.00 <1.00> (+1.00) ⬇️
...nt/indexstatemanagement/ManagedIndexCoordinator.kt 76.68% <87.50%> (+1.30%) 42.00 <6.00> (-4.00) ⬆️
... and 15 more

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 c5054c5...8e418d7. Read the comment docs.

@bowenlan-amzn bowenlan-amzn marked this pull request as ready for review January 28, 2021 20:20
private val request: AddPolicyRequest
) {
private lateinit var startTime: Instant
private val indicesToAdd = mutableMapOf<String, String>() // uuid: name
Copy link
Contributor

Choose a reason for hiding this comment

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

We should take advantage of typealiases for this stuff since it's confusing just seeing string :P
But, can do that in later PR

@bowenlan-amzn bowenlan-amzn merged commit cf7881f into opendistro-for-elasticsearch:master Feb 1, 2021
@bowenlan-amzn bowenlan-amzn deleted the refactorpolicyid branch February 9, 2021 17:20
@bowenlan-amzn bowenlan-amzn added the breaking change A change in one part of a software system that causes other parts to fail, require user change label Feb 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

breaking change A change in one part of a software system that causes other parts to fail, require user change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants