From 2005185fcbbd36e41dc8344ab5a8c717c3043a1a Mon Sep 17 00:00:00 2001 From: Surya Sashank Nistala Date: Thu, 20 Oct 2022 13:07:32 -0700 Subject: [PATCH] change transport ack alerts action to accept Action Request and recreate as AckAlertRequest (#618) Signed-off-by: Surya Sashank Nistala Signed-off-by: Surya Sashank Nistala --- .../alerting/transport/TransportAcknowledgeAlertAction.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeAlertAction.kt b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeAlertAction.kt index 152f114c2..4e6ee8bbf 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeAlertAction.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportAcknowledgeAlertAction.kt @@ -11,6 +11,7 @@ import kotlinx.coroutines.launch import org.apache.logging.log4j.LogManager import org.opensearch.ResourceNotFoundException import org.opensearch.action.ActionListener +import org.opensearch.action.ActionRequest import org.opensearch.action.bulk.BulkRequest import org.opensearch.action.bulk.BulkResponse import org.opensearch.action.delete.DeleteRequest @@ -65,7 +66,7 @@ class TransportAcknowledgeAlertAction @Inject constructor( val settings: Settings, val xContentRegistry: NamedXContentRegistry, val transportGetMonitorAction: TransportGetMonitorAction -) : HandledTransportAction( +) : HandledTransportAction( AlertingActions.ACKNOWLEDGE_ALERTS_ACTION_NAME, transportService, actionFilters, ::AcknowledgeAlertRequest ) { @@ -78,7 +79,7 @@ class TransportAcknowledgeAlertAction @Inject constructor( override fun doExecute( task: Task, - acknowledgeAlertRequest: AcknowledgeAlertRequest, + acknowledgeAlertRequest: ActionRequest, actionListener: ActionListener ) { val request = acknowledgeAlertRequest as? AcknowledgeAlertRequest