remove old doc placeholder and migrate ilm docs to top-level#34615
remove old doc placeholder and migrate ilm docs to top-level#34615talevy merged 17 commits intoelastic:index-lifecyclefrom
Conversation
|
Pinging @elastic/es-core-infra |
|
thanks for the review @colings86 |
|
LGTM as well - and the extra cleanup of ILM will be nice. |
| } | ||
|
|
||
| private static void removePoliciesFromAllIndexes() throws IOException { | ||
| Response response = adminClient().performRequest(new Request("GET", "/_all")); |
There was a problem hiding this comment.
I think we'll usually have wiped the indices already. Do we need to do this in that case?
There was a problem hiding this comment.
oh, you're right. this is unnecessary
| try { | ||
| adminClient().performRequest(new Request("DELETE", indexName + "/_ilm/")); | ||
| } catch (Exception e) { | ||
| // ok |
There was a problem hiding this comment.
OK because we're racing? Maybe we should add the ignore parameter to the request in that case.
There was a problem hiding this comment.
We're really only ok with 404s here, right?
| Response response = adminClient().performRequest(new Request("GET", "/_ilm")); | ||
| policies = ESRestTestCase.entityAsMap(response); | ||
| } catch (Exception e) { | ||
| return; |
|
|
||
| try { | ||
| Response response = adminClient().performRequest(new Request("GET", "/_ilm")); | ||
| policies = ESRestTestCase.entityAsMap(response); |
There was a problem hiding this comment.
You are already in ESRestTestCase so you don't need the to reference the class.
| try { | ||
| adminClient().performRequest(new Request("DELETE", "/_ilm/" + policyName)); | ||
| } catch (Exception e) { | ||
| // ok |
There was a problem hiding this comment.
Same comment as before about why this is ok.
| try { | ||
| Response response = adminClient().performRequest(new Request("GET", "/_ilm")); | ||
| policies = entityAsMap(response); | ||
| } catch (ResponseException e) { |
There was a problem hiding this comment.
Maybe add a comment referencing the issue and your intention to remove this once it is fixed. That'd be nice for someone reading the code after the fact I think.
|
#34657 was merged into master, so I will begin work to update and version-guard the deletion of policies to version of ES that contain ILM |
This reverts commit 870655e.
|
I will use 870655e for the backport to 6.x |
| try { | ||
| Response response = adminClient().performRequest(new Request("GET", "/_ilm")); | ||
| policies = entityAsMap(response); | ||
| } catch (ResponseException e) { |
There was a problem hiding this comment.
Maybe add a comment referencing the issue and your intention to remove this once it is fixed. That'd be nice for someone reading the code after the fact I think.
|
thanks for the review @nik9000, the other PR was merged, so I will just remove the |
|
test this please |
we are restructuring the docs, this migrates ILM docs outside of the x-pack doc structure.
Looks like we are restructuring the docs, this migrates ILM docs outside of the x-pack doc structure.
This is related to the initiative to move x-pack cleanup to ESRestTestCase #34530