Skip to content
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

Don't try to delete watcher history backing indices in ESRestTestCase.wipeAllIndices(...) #106144

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

joegallo
Copy link
Contributor

@joegallo joegallo commented Mar 8, 2024

Closes #93848
Closes #99517

See also #100694 and #64521 for the history of this DELETE.

@joegallo joegallo added >test Issues or PRs that are addressing/adding tests :Data Management/Data streams Data streams and their lifecycles Team:Data Management Meta label for data/management team labels Mar 8, 2024
@joegallo joegallo requested a review from masseyke March 8, 2024 22:16
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@@ -1103,8 +1103,8 @@ protected static void wipeAllIndices() throws IOException {
protected static void wipeAllIndices(boolean preserveSecurityIndices) throws IOException {
boolean includeHidden = clusterHasFeature(RestTestLegacyFeatures.HIDDEN_INDICES_SUPPORTED);
try {
// remove all indices except ilm and slm history which can pop up after deleting all data streams but shouldn't interfere
final List<String> indexPatterns = new ArrayList<>(List.of("*", "-.ds-ilm-history-*", "-.ds-.slm-history-*"));
// remove all indices except data stream backing indices, since they have to be removed their own special way, anyway
Copy link
Member

Choose a reason for hiding this comment

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

Should we just add -.ds-.watcher-history-* as a smaller step that would still fix these two tests? The problem is that watcher history is written asynchronously. That's not necessarily the case with every datastream

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, that's fine. I'll change it to that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done via d353c5b.

@joegallo joegallo changed the title Don't try to delete data stream backing indices in ESRestTestCase.wipeAllIndices(...) Don't try to delete watch history backing indices in ESRestTestCase.wipeAllIndices(...) Mar 9, 2024
@joegallo joegallo requested a review from masseyke March 9, 2024 01:08
@joegallo joegallo changed the title Don't try to delete watch history backing indices in ESRestTestCase.wipeAllIndices(...) Don't try to delete watcher history backing indices in ESRestTestCase.wipeAllIndices(...) Mar 11, 2024
Copy link
Member

@masseyke masseyke left a comment

Choose a reason for hiding this comment

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

LGTM

@joegallo joegallo merged commit cebb94d into elastic:main Mar 11, 2024
14 checks passed
@joegallo joegallo deleted the fix-wipe-all-indices branch March 11, 2024 13:34
@joegallo
Copy link
Contributor Author

ARGH. Of course I meant "-.ds-.watcher-history-*" and not the opposite. A pox upon me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Data streams Data streams and their lifecycles Team:Data Management Meta label for data/management team >test Issues or PRs that are addressing/adding tests v8.14.0
Projects
None yet
3 participants