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

Remove notifications completely in reports scheduler #221

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,6 @@ public enum Metrics {
REPORT_FROM_DEFINITION_ID_SYSTEM_ERROR("on_demand_from_definition.create.system_error", new RollingCounter()),


// Notifications: POST _plugins/_reports/on_demand/{reportDefinitionId} and scheduled jobs
REPORT_NOTIFICATIONS_TOTAL("report_notifications.send.total", new BasicCounter()),
REPORT_NOTIFICATIONS_ERROR("report_notifications.send.error", new RollingCounter()),


REPORT_SECURITY_PERMISSION_ERROR("es_security_permission_error", new RollingCounter()),
REPORT_PERMISSION_USER_ERROR("permission_user_error", new RollingCounter());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
*/
package org.opensearch.reportsscheduler

import org.opensearch.OpenSearchStatusException
import org.opensearch.jobscheduler.spi.JobSchedulerExtension
import org.opensearch.jobscheduler.spi.ScheduledJobParser
import org.opensearch.jobscheduler.spi.ScheduledJobRunner
Expand Down Expand Up @@ -56,7 +55,6 @@ import org.opensearch.reportsscheduler.settings.PluginSettings
import org.opensearch.action.ActionRequest
import org.opensearch.action.ActionResponse
import org.opensearch.client.Client
import org.opensearch.client.node.NodeClient
import org.opensearch.cluster.metadata.IndexNameExpressionResolver
import org.opensearch.cluster.node.DiscoveryNodes
import org.opensearch.cluster.service.ClusterService
Expand All @@ -71,11 +69,9 @@ import org.opensearch.env.Environment
import org.opensearch.env.NodeEnvironment
import org.opensearch.plugins.ActionPlugin
import org.opensearch.plugins.Plugin
import org.opensearch.reportsscheduler.notifications.NotificationsActions
import org.opensearch.repositories.RepositoriesService
import org.opensearch.rest.RestController
import org.opensearch.rest.RestHandler
import org.opensearch.rest.RestStatus
import org.opensearch.script.ScriptService
import org.opensearch.threadpool.ThreadPool
import org.opensearch.watcher.ResourceWatcherService
Expand Down Expand Up @@ -122,12 +118,6 @@ class ReportsSchedulerPlugin : Plugin(), ActionPlugin, JobSchedulerExtension {
PluginSettings.addSettingsUpdateConsumer(clusterService)
ReportDefinitionsIndex.initialize(client, clusterService)
ReportInstancesIndex.initialize(client, clusterService)
(client as? NodeClient)?.let { NotificationsActions.initialize(it) } ?: run {
throw OpenSearchStatusException(
"Unable to cast client to NodeClient for Notifications call",
RestStatus.INTERNAL_SERVER_ERROR
)
}
return emptyList()
}

Expand Down

This file was deleted.

This file was deleted.