-
Notifications
You must be signed in to change notification settings - Fork 25k
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
remove old doc placeholder and migrate ilm docs to top-level #34615
Conversation
Pinging @elastic/es-core-infra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I'd like @debadair to look over the docs changes to make sure the new structure is in line with the way the docs will be structured going forward
thanks for the review @colings86 |
LGTM as well - and the extra cleanup of ILM will be nice. |
@@ -441,6 +456,46 @@ private void waitForPendingRollupTasks() throws Exception { | |||
}); | |||
} | |||
|
|||
private static void removePoliciesFromAllIndexes() throws IOException { | |||
Response response = adminClient().performRequest(new Request("GET", "/_all")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a bit broad.
|
||
try { | ||
Response response = adminClient().performRequest(new Request("GET", "/_ilm")); | ||
policies = ESRestTestCase.entityAsMap(response); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is caught here because of #34881
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
try { | ||
Response response = adminClient().performRequest(new Request("GET", "/_ilm")); | ||
policies = entityAsMap(response); | ||
} catch (ResponseException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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