From f6a130a3745aef50a35d12e3b0c8253c4eac7ed2 Mon Sep 17 00:00:00 2001 From: bowenlan-amzn Date: Tue, 4 Feb 2025 15:52:10 -0800 Subject: [PATCH] Apply suggestions from code review Signed-off-by: bowenlan-amzn --- build.gradle | 2 -- .../indexstatemanagement/step/restore/AttemptRestoreStep.kt | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index e124dd852..cdc5f617d 100644 --- a/build.gradle +++ b/build.gradle @@ -586,7 +586,6 @@ integTest { excludeTestsMatching "org.opensearch.indexmanagement.indexstatemanagement.action.NotificationActionIT" } exclude 'org/opensearch/indexmanagement/indexstatemanagement/MetadataRegressionIT.class' - exclude 'org/opensearch/indexmanagement/indexstatemanagement/ConvertIndexToRemoteIT.class' } // TODO: raise issue in Core, this is because of the test framework @@ -648,7 +647,6 @@ task integTestRemote(type: RestIntegTestTask) { // Snapshot action integration tests rely on node level setting path.repo which we can't set remotely exclude 'org/opensearch/indexmanagement/indexstatemanagement/action/SnapshotActionIT.class' - exclude 'org/opensearch/indexmanagement/indexstatemanagement/action/ConvertIndexToRemoteIT.class' } // === Set up BWC tests === diff --git a/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt b/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt index 435b58372..3eba51f1c 100644 --- a/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt +++ b/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt @@ -136,7 +136,7 @@ class AttemptRestoreStep(private val action: ConvertIndexToRemoteAction) : Step( ): String { val contextMap = managedIndexMetaData.convertToMap().filterKeys { key -> - key in AttemptSnapshotStep.validTopContextFields + key in validTopContextFields } val compiledValue = scriptService.compile(template, TemplateScript.CONTEXT)