From 31aaa7de1e66f074d9a4d06804c0d3cb96ef9ad3 Mon Sep 17 00:00:00 2001 From: Niels Bauman <33722607+nielsbauman@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:10:29 +0100 Subject: [PATCH] Fix `TimeSeriesDataStreamsIT.testShrinkActionInPolicyWithoutHotPhase` (#123153) This test was muted, got fixed, and then was muted again but the issue wasn't reopened (by accident it seems). Since that was 4 years ago, I'm going to unmute this test and if it's still an issue, the new test automation will open a new issue for it using the current muting mechanism. Relates #70595 (cherry picked from commit 4b31293b6f9e57c80aefa83eee9661ab38caa27f) --- .../java/org/elasticsearch/xpack/TimeSeriesRestDriver.java | 3 +++ .../org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java b/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java index 3949139db033b..5a132eb370e6c 100644 --- a/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java +++ b/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java @@ -457,6 +457,9 @@ public static String waitAndGetShrinkIndexName(RestClient client, String origina "GET", SHRUNKEN_INDEX_PREFIX + "*" + originalIndex + "," + originalIndex + "/_ilm/explain" ); + // Sometimes, the original index might already have been deleted, so we need to ignore unavailable (concrete) indices. + explainRequest.addParameter("ignore_unavailable", Boolean.toString(true)); + explainRequest.addParameter("expand_wildcards", "open,hidden"); explainRequest.addParameter("only_errors", Boolean.toString(false)); explainRequest.addParameter("only_managed", Boolean.toString(false)); Response response = client.performRequest(explainRequest); diff --git a/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java b/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java index 88fcef854d2d5..d48bc47c71c3b 100644 --- a/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java +++ b/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java @@ -119,7 +119,6 @@ public void testRolloverIsSkippedOnManualDataStreamRollover() throws Exception { ); } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/70595") public void testShrinkActionInPolicyWithoutHotPhase() throws Exception { createNewSingletonPolicy(client(), policyName, "warm", new ShrinkAction(1, null, false)); createComposableTemplate(client(), template, dataStream + "*", getTemplate(policyName));