From c6217aae95cc4d08a55cfc65cd583c450f083e64 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 1 Aug 2023 09:50:00 -0400 Subject: [PATCH 1/7] fix ci Signed-off-by: Derek Ho --- .../opensearch/reportsscheduler/ReportsSchedulerPlugin.kt | 2 +- .../opensearch/reportsscheduler/action/PluginBaseAction.kt | 4 ++-- .../reportsscheduler/action/ReportDefinitionActions.kt | 2 +- .../reportsscheduler/action/ReportInstanceActions.kt | 2 +- .../org/opensearch/reportsscheduler/model/BaseResponse.kt | 2 +- .../reportsscheduler/model/CreateReportDefinitionRequest.kt | 6 +++--- .../model/CreateReportDefinitionResponse.kt | 6 +++--- .../reportsscheduler/model/DeleteReportDefinitionRequest.kt | 6 +++--- .../model/DeleteReportDefinitionResponse.kt | 6 +++--- .../model/GetAllReportDefinitionsRequest.kt | 6 +++--- .../model/GetAllReportDefinitionsResponse.kt | 4 ++-- .../reportsscheduler/model/GetAllReportInstancesRequest.kt | 6 +++--- .../reportsscheduler/model/GetAllReportInstancesResponse.kt | 4 ++-- .../reportsscheduler/model/GetReportDefinitionRequest.kt | 6 +++--- .../reportsscheduler/model/GetReportDefinitionResponse.kt | 6 +++--- .../reportsscheduler/model/GetReportInstanceRequest.kt | 6 +++--- .../reportsscheduler/model/GetReportInstanceResponse.kt | 6 +++--- .../reportsscheduler/model/InContextReportCreateRequest.kt | 6 +++--- .../reportsscheduler/model/InContextReportCreateResponse.kt | 6 +++--- .../reportsscheduler/model/OnDemandReportCreateRequest.kt | 6 +++--- .../reportsscheduler/model/OnDemandReportCreateResponse.kt | 6 +++--- .../opensearch/reportsscheduler/model/ReportDefinition.kt | 2 +- .../reportsscheduler/model/ReportDefinitionDetails.kt | 2 +- .../org/opensearch/reportsscheduler/model/ReportInstance.kt | 2 +- .../org/opensearch/reportsscheduler/model/SearchResults.kt | 2 +- .../reportsscheduler/model/UpdateReportDefinitionRequest.kt | 6 +++--- .../model/UpdateReportDefinitionResponse.kt | 6 +++--- .../model/UpdateReportInstanceStatusRequest.kt | 6 +++--- .../model/UpdateReportInstanceStatusResponse.kt | 6 +++--- .../resthandler/OnDemandReportRestHandler.kt | 2 +- .../resthandler/ReportDefinitionListRestHandler.kt | 2 +- .../resthandler/ReportDefinitionRestHandler.kt | 2 +- .../resthandler/ReportInstanceListRestHandler.kt | 2 +- .../resthandler/ReportInstanceRestHandler.kt | 2 +- .../reportsscheduler/resthandler/ReportStatsRestHandler.kt | 2 +- .../resthandler/RestResponseToXContentListener.kt | 2 +- .../reportsscheduler/security/UserAccessManager.kt | 2 +- .../kotlin/org/opensearch/reportsscheduler/util/Helpers.kt | 4 ++-- 38 files changed, 78 insertions(+), 78 deletions(-) diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/ReportsSchedulerPlugin.kt b/src/main/kotlin/org/opensearch/reportsscheduler/ReportsSchedulerPlugin.kt index 9ed1e493..3062d8d3 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/ReportsSchedulerPlugin.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/ReportsSchedulerPlugin.kt @@ -11,12 +11,12 @@ import org.opensearch.client.Client import org.opensearch.cluster.metadata.IndexNameExpressionResolver import org.opensearch.cluster.node.DiscoveryNodes import org.opensearch.cluster.service.ClusterService -import org.opensearch.common.io.stream.NamedWriteableRegistry import org.opensearch.common.settings.ClusterSettings import org.opensearch.common.settings.IndexScopedSettings import org.opensearch.common.settings.Setting import org.opensearch.common.settings.Settings import org.opensearch.common.settings.SettingsFilter +import org.opensearch.core.common.io.stream.NamedWriteableRegistry import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.env.Environment import org.opensearch.env.NodeEnvironment diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/PluginBaseAction.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/PluginBaseAction.kt index 1b56c97a..ca4315fa 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/PluginBaseAction.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/PluginBaseAction.kt @@ -16,17 +16,17 @@ import org.opensearch.action.ActionResponse import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.HandledTransportAction import org.opensearch.client.Client -import org.opensearch.common.io.stream.Writeable import org.opensearch.common.util.concurrent.ThreadContext import org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT import org.opensearch.commons.authuser.User +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.rest.RestStatus import org.opensearch.index.IndexNotFoundException import org.opensearch.index.engine.VersionConflictEngineException import org.opensearch.indices.InvalidIndexNameException import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.util.logger -import org.opensearch.rest.RestStatus import org.opensearch.tasks.Task import org.opensearch.transport.TransportService import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportDefinitionActions.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportDefinitionActions.kt index a3c30a1d..c3812fe6 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportDefinitionActions.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportDefinitionActions.kt @@ -7,6 +7,7 @@ package org.opensearch.reportsscheduler.action import org.opensearch.OpenSearchStatusException import org.opensearch.commons.authuser.User +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.index.ReportDefinitionsIndex import org.opensearch.reportsscheduler.metrics.Metrics @@ -23,7 +24,6 @@ import org.opensearch.reportsscheduler.model.UpdateReportDefinitionRequest import org.opensearch.reportsscheduler.model.UpdateReportDefinitionResponse import org.opensearch.reportsscheduler.security.UserAccessManager import org.opensearch.reportsscheduler.util.logger -import org.opensearch.rest.RestStatus import java.time.Instant /** diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportInstanceActions.kt b/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportInstanceActions.kt index 37f32280..c2751ab0 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportInstanceActions.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/action/ReportInstanceActions.kt @@ -7,6 +7,7 @@ package org.opensearch.reportsscheduler.action import org.opensearch.OpenSearchStatusException import org.opensearch.commons.authuser.User +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.index.ReportDefinitionsIndex import org.opensearch.reportsscheduler.index.ReportInstancesIndex @@ -25,7 +26,6 @@ import org.opensearch.reportsscheduler.model.UpdateReportInstanceStatusRequest import org.opensearch.reportsscheduler.model.UpdateReportInstanceStatusResponse import org.opensearch.reportsscheduler.security.UserAccessManager import org.opensearch.reportsscheduler.util.logger -import org.opensearch.rest.RestStatus import java.time.Instant /** diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/BaseResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/BaseResponse.kt index fbcc155c..2bc10fe9 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/BaseResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/BaseResponse.kt @@ -7,10 +7,10 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionResponse import org.opensearch.common.xcontent.XContentFactory +import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder -import org.opensearch.rest.RestStatus /** * Base response which give REST status. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt index c41621b4..e853845a 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt @@ -7,14 +7,14 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt index 89ce2df5..41468dfd 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt @@ -5,12 +5,12 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt index d6676c78..457dd913 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt @@ -7,14 +7,14 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt index 77065e11..8d7f8578 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt @@ -5,12 +5,12 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt index b247d13b..f12506f2 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt @@ -7,14 +7,14 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsResponse.kt index a95ecdb7..1002022e 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsResponse.kt @@ -5,9 +5,9 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt index 33c2e7f6..90f946f7 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt @@ -7,14 +7,14 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt index 34bc9444..acbb94b1 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt @@ -5,8 +5,8 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt index 308cce23..d35db2cb 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt @@ -7,14 +7,14 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt index 9e5ef74d..0e88992f 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt index 877b8166..946ce3f0 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt @@ -7,14 +7,14 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt index 0a8714ad..445e2926 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt index e95b9ea0..7e1cc6db 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt @@ -7,14 +7,14 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt index 5ea88c6f..eec21ad6 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt index 9176ebde..897cce1f 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt @@ -7,14 +7,14 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt index 1a4002b9..43376890 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinition.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinition.kt index bbfd4449..5aed866c 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinition.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinition.kt @@ -6,11 +6,11 @@ package org.opensearch.reportsscheduler.model import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.jobscheduler.spi.schedule.Schedule import org.opensearch.jobscheduler.spi.schedule.ScheduleParser import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetails.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetails.kt index 8a88f111..352427d9 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetails.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportDefinitionDetails.kt @@ -6,11 +6,11 @@ package org.opensearch.reportsscheduler.model import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContent.EMPTY_PARAMS import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.jobscheduler.spi.ScheduledJobParameter import org.opensearch.jobscheduler.spi.schedule.Schedule import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstance.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstance.kt index 81c20bd5..1a9ef222 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstance.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/ReportInstance.kt @@ -6,11 +6,11 @@ package org.opensearch.reportsscheduler.model import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.ACCESS_LIST_FIELD import org.opensearch.reportsscheduler.model.RestTag.BEGIN_TIME_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/SearchResults.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/SearchResults.kt index b53b0acc..ecf74062 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/SearchResults.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/SearchResults.kt @@ -11,13 +11,13 @@ import org.apache.lucene.search.TotalHits.Relation.EQUAL_TO import org.apache.lucene.search.TotalHits.Relation.GREATER_THAN_OR_EQUAL_TO import org.opensearch.action.search.SearchResponse import org.opensearch.common.xcontent.LoggingDeprecationHandler -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.common.xcontent.XContentType import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent.Params import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REST_OUTPUT_PARAMS import org.opensearch.reportsscheduler.util.logger diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt index 4f5fce20..4adf7b53 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt @@ -7,14 +7,14 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt index e10352b4..47b93a43 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt @@ -5,12 +5,12 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt index 83cb9615..bb8ca3bd 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt @@ -7,14 +7,14 @@ package org.opensearch.reportsscheduler.model import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput import org.opensearch.common.xcontent.XContentFactory -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt index ba358efc..09a803c9 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt @@ -5,12 +5,12 @@ package org.opensearch.reportsscheduler.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/OnDemandReportRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/OnDemandReportRestHandler.kt index 492aa346..483ff762 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/OnDemandReportRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/OnDemandReportRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.InContextReportCreateAction @@ -22,7 +23,6 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.POST import org.opensearch.rest.RestRequest.Method.PUT -import org.opensearch.rest.RestStatus /** * Rest handler for creating on-demand report instances. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionListRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionListRestHandler.kt index 3ea8fcd4..6a813ddc 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionListRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionListRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.GetAllReportDefinitionsAction @@ -20,7 +21,6 @@ import org.opensearch.rest.RestHandler.ReplacedRoute import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET -import org.opensearch.rest.RestStatus /** * Rest handler for getting list of report definitions. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionRestHandler.kt index 0a8c9221..6a3abf4d 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportDefinitionRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.CreateReportDefinitionAction @@ -28,7 +29,6 @@ import org.opensearch.rest.RestRequest.Method.DELETE import org.opensearch.rest.RestRequest.Method.GET import org.opensearch.rest.RestRequest.Method.POST import org.opensearch.rest.RestRequest.Method.PUT -import org.opensearch.rest.RestStatus /** * Rest handler for report definitions lifecycle management. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceListRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceListRestHandler.kt index a3eaef1a..a5094bbe 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceListRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceListRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.GetAllReportInstancesAction @@ -20,7 +21,6 @@ import org.opensearch.rest.RestHandler.ReplacedRoute import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET -import org.opensearch.rest.RestStatus /** * Rest handler for getting list of report instances. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceRestHandler.kt index 5f3a6d99..1400d7a3 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportInstanceRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.action.GetReportInstanceAction @@ -22,7 +23,6 @@ import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET import org.opensearch.rest.RestRequest.Method.POST -import org.opensearch.rest.RestStatus /** * Rest handler for report instances lifecycle management. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportStatsRestHandler.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportStatsRestHandler.kt index 1900c7b6..0a19975e 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportStatsRestHandler.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/ReportStatsRestHandler.kt @@ -5,6 +5,7 @@ package org.opensearch.reportsscheduler.resthandler import org.opensearch.client.node.NodeClient +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.reportsscheduler.metrics.Metrics @@ -15,7 +16,6 @@ import org.opensearch.rest.RestHandler.ReplacedRoute import org.opensearch.rest.RestHandler.Route import org.opensearch.rest.RestRequest import org.opensearch.rest.RestRequest.Method.GET -import org.opensearch.rest.RestStatus /** * Rest handler for getting reporting backend stats diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/RestResponseToXContentListener.kt b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/RestResponseToXContentListener.kt index 207487a7..a0cf270d 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/RestResponseToXContentListener.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/resthandler/RestResponseToXContentListener.kt @@ -5,13 +5,13 @@ package org.opensearch.reportsscheduler.resthandler +import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.BaseResponse import org.opensearch.rest.BytesRestResponse import org.opensearch.rest.RestChannel import org.opensearch.rest.RestResponse -import org.opensearch.rest.RestStatus import org.opensearch.rest.action.RestToXContentListener /** diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/security/UserAccessManager.kt b/src/main/kotlin/org/opensearch/reportsscheduler/security/UserAccessManager.kt index a7ee17c9..9f25831f 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/security/UserAccessManager.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/security/UserAccessManager.kt @@ -7,9 +7,9 @@ package org.opensearch.reportsscheduler.security import org.opensearch.OpenSearchStatusException import org.opensearch.commons.authuser.User +import org.opensearch.core.rest.RestStatus import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.settings.PluginSettings -import org.opensearch.rest.RestStatus /** * Class for checking/filtering user access. diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt b/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt index dd8f7634..1eb08116 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt @@ -7,15 +7,15 @@ package org.opensearch.reportsscheduler.util import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.xcontent.XContentParserUtils import org.opensearch.common.xcontent.XContentType +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.xcontent.DeprecationHandler import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token import org.opensearch.reportsscheduler.model.ReportInstance import org.opensearch.rest.RestRequest From e87da124e11647fd87aab27ea2e1a6fc389a926b Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 1 Aug 2023 10:05:57 -0400 Subject: [PATCH 2/7] update kotlin version Signed-off-by: Derek Ho --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index cbd1ede8..de73a693 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ buildscript { common_utils_version = System.getProperty("common_utils.version", opensearch_build) job_scheduler_version = System.getProperty("job_scheduler.version", opensearch_build) - kotlin_version = System.getProperty("kotlin.version", "1.6.0") + kotlin_version = System.getProperty("kotlin.version", "1.8.2") jackson_version = "2.14.1" } From ff0c4a0fadfc2c5e285bb82f4bb7ad827e253a97 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 1 Aug 2023 10:10:06 -0400 Subject: [PATCH 3/7] update build.gradle Signed-off-by: Derek Ho --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index de73a693..ace21cdb 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ buildscript { common_utils_version = System.getProperty("common_utils.version", opensearch_build) job_scheduler_version = System.getProperty("job_scheduler.version", opensearch_build) - kotlin_version = System.getProperty("kotlin.version", "1.8.2") + kotlin_version = System.getProperty("kotlin.version", "1.8.21") jackson_version = "2.14.1" } @@ -42,7 +42,7 @@ buildscript { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}" classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlin_version}" classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.22.0" - classpath "org.jacoco:org.jacoco.agent:0.8.5" + classpath "org.jacoco:org.jacoco.agent:0.8.8" } } From d0c00523439dfd87b118c1ffe25d26a0648b31e5 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 1 Aug 2023 10:18:05 -0400 Subject: [PATCH 4/7] ktlint Signed-off-by: Derek Ho --- .../reportsscheduler/model/CreateReportDefinitionRequest.kt | 2 +- .../reportsscheduler/model/CreateReportDefinitionResponse.kt | 2 +- .../reportsscheduler/model/DeleteReportDefinitionRequest.kt | 2 +- .../reportsscheduler/model/DeleteReportDefinitionResponse.kt | 2 +- .../reportsscheduler/model/GetAllReportDefinitionsRequest.kt | 2 +- .../reportsscheduler/model/GetAllReportInstancesRequest.kt | 2 +- .../reportsscheduler/model/GetAllReportInstancesResponse.kt | 2 +- .../reportsscheduler/model/GetReportDefinitionRequest.kt | 2 +- .../reportsscheduler/model/GetReportDefinitionResponse.kt | 4 ++-- .../reportsscheduler/model/GetReportInstanceRequest.kt | 2 +- .../reportsscheduler/model/GetReportInstanceResponse.kt | 2 +- .../reportsscheduler/model/InContextReportCreateRequest.kt | 2 +- .../reportsscheduler/model/InContextReportCreateResponse.kt | 2 +- .../reportsscheduler/model/OnDemandReportCreateRequest.kt | 2 +- .../reportsscheduler/model/OnDemandReportCreateResponse.kt | 4 ++-- .../reportsscheduler/model/UpdateReportDefinitionRequest.kt | 2 +- .../reportsscheduler/model/UpdateReportDefinitionResponse.kt | 2 +- .../model/UpdateReportInstanceStatusRequest.kt | 2 +- .../model/UpdateReportInstanceStatusResponse.kt | 2 +- .../kotlin/org/opensearch/reportsscheduler/util/Helpers.kt | 2 +- 20 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt index e853845a..c3000dd0 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionRequest.kt @@ -14,8 +14,8 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt index 41468dfd..2d0342aa 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/CreateReportDefinitionResponse.kt @@ -10,8 +10,8 @@ import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt index 457dd913..6c50e501 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionRequest.kt @@ -14,8 +14,8 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt index 8d7f8578..144fb1ca 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/DeleteReportDefinitionResponse.kt @@ -10,8 +10,8 @@ import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt index f12506f2..258b15ac 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportDefinitionsRequest.kt @@ -14,8 +14,8 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.FROM_INDEX_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt index 90f946f7..5863e368 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesRequest.kt @@ -14,8 +14,8 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.FROM_INDEX_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt index acbb94b1..c76ff856 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetAllReportInstancesResponse.kt @@ -5,9 +5,9 @@ package org.opensearch.reportsscheduler.model +import org.opensearch.common.xcontent.XContentFactory import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentFactory import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt index d35db2cb..07271272 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionRequest.kt @@ -14,8 +14,8 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt index 0e88992f..6e361e66 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportDefinitionResponse.kt @@ -5,14 +5,14 @@ package org.opensearch.reportsscheduler.model +import org.opensearch.common.xcontent.XContentFactory import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentFactory import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.util.createJsonParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt index 946ce3f0..cc2282be 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceRequest.kt @@ -14,8 +14,8 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt index 445e2926..293c022c 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/GetReportInstanceResponse.kt @@ -11,8 +11,8 @@ import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_FIELD import org.opensearch.reportsscheduler.util.createJsonParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt index 7e1cc6db..24031014 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateRequest.kt @@ -14,8 +14,8 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.ReportInstance.Status diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt index eec21ad6..4aa9be58 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/InContextReportCreateResponse.kt @@ -11,8 +11,8 @@ import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_FIELD import org.opensearch.reportsscheduler.util.createJsonParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt index 897cce1f..b1402222 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateRequest.kt @@ -14,8 +14,8 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt index 43376890..d4cd36f4 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/OnDemandReportCreateResponse.kt @@ -5,14 +5,14 @@ package org.opensearch.reportsscheduler.model +import org.opensearch.common.xcontent.XContentFactory import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentFactory import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_FIELD import org.opensearch.reportsscheduler.util.createJsonParser diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt index 4adf7b53..fc6df23c 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionRequest.kt @@ -14,8 +14,8 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt index 47b93a43..75d63203 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportDefinitionResponse.kt @@ -10,8 +10,8 @@ import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.RestTag.REPORT_DEFINITION_ID_FIELD diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt index bb8ca3bd..47da69c3 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusRequest.kt @@ -14,8 +14,8 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.metrics.Metrics import org.opensearch.reportsscheduler.model.ReportInstance.Status diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt index 09a803c9..a19d51bf 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/model/UpdateReportInstanceStatusResponse.kt @@ -10,8 +10,8 @@ import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LOG_PREFIX import org.opensearch.reportsscheduler.model.RestTag.REPORT_INSTANCE_ID_FIELD import org.opensearch.reportsscheduler.util.logger diff --git a/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt b/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt index 1eb08116..08e35a89 100644 --- a/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt +++ b/src/main/kotlin/org/opensearch/reportsscheduler/util/Helpers.kt @@ -15,8 +15,8 @@ import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.reportsscheduler.model.ReportInstance import org.opensearch.rest.RestRequest import java.net.URI From eb2ccf4189e800599b910db73d159b0ece21fff8 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 1 Aug 2023 10:26:02 -0400 Subject: [PATCH 5/7] version bump Signed-off-by: Derek Ho --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ace21cdb..954e0d0c 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { opensearch_group = "org.opensearch" isSnapshot = "true" == System.getProperty("build.snapshot", "true") - opensearch_version = System.getProperty("opensearch.version", "2.9.0-SNAPSHOT") + opensearch_version = System.getProperty("opensearch.version", "2.10.0-SNAPSHOT") buildVersionQualifier = System.getProperty("build.version_qualifier", "") // 2.0.0-rc1-SNAPSHOT -> 2.0.0.0-rc1-SNAPSHOT version_tokens = opensearch_version.tokenize('-') From 9ee0f97f26b5edf542cbd61e3dd0076dbc07ff1a Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 1 Aug 2023 10:27:26 -0400 Subject: [PATCH 6/7] update workflow Signed-off-by: Derek Ho --- .github/workflows/draft-release-notes-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/draft-release-notes-workflow.yml b/.github/workflows/draft-release-notes-workflow.yml index 1713f5c7..e321a271 100644 --- a/.github/workflows/draft-release-notes-workflow.yml +++ b/.github/workflows/draft-release-notes-workflow.yml @@ -16,6 +16,6 @@ jobs: with: config-name: draft-release-notes-config.yml tag: (None) - version: 2.9.0.0 + version: 2.10.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1d02fa97de13cc77e917cf6e0311121dd529507d Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 1 Aug 2023 10:32:15 -0400 Subject: [PATCH 7/7] fix imports in tests Signed-off-by: Derek Ho --- .../integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt | 2 +- .../integTest/rest/InContextMenuReportGenerationIT.kt | 2 +- .../org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt | 2 +- .../kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt | 2 +- .../kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt b/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt index e1eb7550..875ab509 100644 --- a/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt @@ -7,12 +7,12 @@ package org.opensearch.integTest.bwc import org.junit.Assert import org.opensearch.common.settings.Settings +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.constructReportDefinitionRequest import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus import java.time.Instant class ReportsSchedulerBackwardsCompatibilityIT : PluginRestTestCase() { diff --git a/src/test/kotlin/org/opensearch/integTest/rest/InContextMenuReportGenerationIT.kt b/src/test/kotlin/org/opensearch/integTest/rest/InContextMenuReportGenerationIT.kt index 07e8c243..f3956d41 100644 --- a/src/test/kotlin/org/opensearch/integTest/rest/InContextMenuReportGenerationIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/rest/InContextMenuReportGenerationIT.kt @@ -6,6 +6,7 @@ package org.opensearch.integTest.rest import org.junit.Assert +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.jsonify import org.opensearch.integTest.validateErrorResponse @@ -13,7 +14,6 @@ import org.opensearch.integTest.validateTimeRecency import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus import java.time.Instant class InContextMenuReportGenerationIT : PluginRestTestCase() { diff --git a/src/test/kotlin/org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt b/src/test/kotlin/org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt index 399d144e..7decd12a 100644 --- a/src/test/kotlin/org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/rest/OnDemandReportGenerationIT.kt @@ -6,6 +6,7 @@ package org.opensearch.integTest.rest import org.junit.Assert +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.jsonify import org.opensearch.integTest.validateErrorResponse @@ -14,7 +15,6 @@ import org.opensearch.integTest.validateTimeRecency import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus import java.time.Duration import java.time.Instant diff --git a/src/test/kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt b/src/test/kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt index 15385396..434580c7 100644 --- a/src/test/kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/rest/ReportDefinitionIT.kt @@ -6,13 +6,13 @@ package org.opensearch.integTest.rest import org.junit.Assert +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.constructReportDefinitionRequest import org.opensearch.integTest.validateErrorResponse import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus class ReportDefinitionIT : PluginRestTestCase() { fun `test create, get, update, delete report definition`() { diff --git a/src/test/kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt b/src/test/kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt index 926cd8ff..8ec9bfa0 100644 --- a/src/test/kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt +++ b/src/test/kotlin/org/opensearch/integTest/rest/ReportInstanceIT.kt @@ -6,13 +6,13 @@ package org.opensearch.integTest.rest import org.junit.Assert +import org.opensearch.core.rest.RestStatus import org.opensearch.integTest.PluginRestTestCase import org.opensearch.integTest.constructReportDefinitionRequest import org.opensearch.integTest.validateErrorResponse import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.BASE_REPORTS_URI import org.opensearch.reportsscheduler.ReportsSchedulerPlugin.Companion.LEGACY_BASE_REPORTS_URI import org.opensearch.rest.RestRequest -import org.opensearch.rest.RestStatus class ReportInstanceIT : PluginRestTestCase() { fun `test update on-demand report definition status to success after creation`() {