-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[7.x] Delete mounted indices after test case in ESRestTestCase #73555
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
Conversation
Pinging @elastic/es-distributed (Team:Distributed) |
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 wonder if we should deal with this in ESRestTestCase
instead. Otherwise we will have to manually add this cleanup to any new frozen-related REST tests and get extra noisy logging+failures when running other test failure?
|
||
- do: | ||
indices.delete: | ||
index: cold-docs |
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.
NIT in case my comment below does not make sense: I think index: [cold-docs, frozen-docs]
should work here as well, no need for separate delete calls?
@original-brownbear |
Yea I figured something along those lines would be nice to have and more in line with what we did for other similar resources in tests+rest tests right? |
@original-brownbear indeed, let's do like you suggest, this is more in line with what we did for other resources (but I don't like it :)) |
@original-brownbear sorry - took me a bit of time to get this right. Can you have another look please? I'll forward port to master if it's LGTM. |
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
@@ -591,6 +600,13 @@ private void wipeCluster() throws Exception { | |||
} | |||
} | |||
|
|||
// Clean up searchable snapshots indices before deleting snapshots and repositories | |||
if (hasXPack() && nodeVersions.first().onOrAfter(Version.V_7_8_0)) { | |||
if (preserveSearchableSnapshotsIndicesUponCompletion() == false) { |
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.
NIT: could be joined into a single if
with the outer if
Github Webhooks were down: |
This commit adds some clean up logic to ESRestTestCase so that searchable snapshots indices are deleted after test case executions, before the snapshot and repositories are wipe out. Backport of #73555
This commit adds some clean up logic to ESRestTestCase so that searchable snapshots indices are deleted after test case executions, before the snapshot and repositories are wipe out. Backport of #73555
Thanks Armin! |
In #73555 we updated ESRestTestCase so that it cleans up the searchable snapshots indices before cleaning up the snapshots and repositories. This test does not require to delete resources itself and can let ESRestTestCase do the clean up in the correct order.
In elastic#73555 we updated ESRestTestCase so that it cleans up the searchable snapshots indices before cleaning up the snapshots and repositories. This test does not require to delete resources itself and can let ESRestTestCase do the clean up in the correct order.
In elastic#73555 we updated ESRestTestCase so that it cleans up the searchable snapshots indices before cleaning up the snapshots and repositories. This test does not require to delete resources itself and can let ESRestTestCase do the clean up in the correct order.
In #73555 we updated ESRestTestCase so that it cleans up the searchable snapshots indices before cleaning up the snapshots and repositories. This test does not require to delete resources itself and can let ESRestTestCase do the clean up in the correct order.
In #73555 we updated ESRestTestCase so that it cleans up the searchable snapshots indices before cleaning up the snapshots and repositories. This test does not require to delete resources itself and can let ESRestTestCase do the clean up in the correct order.
This commit adds some clean up logic to ESRestTestCase so that searchable snapshots indices are deleted after test case executions, before the snapshot and repositories are wipe out.