-
Notifications
You must be signed in to change notification settings - Fork 105
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
Reference get monitor and search monitor action / request / responses from common-utils #1305
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2e46dde
Use get monitor action / req / resp from common-utils
ohltyler 762efda
Clean up remaining references
ohltyler 9d05072
Refactor search monitor action/request also
ohltyler 15464b2
Rewrite get monitor and search monitor transport action requests
ohltyler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
alerting/src/main/kotlin/org/opensearch/alerting/action/GetMonitorAction.kt
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
alerting/src/main/kotlin/org/opensearch/alerting/action/GetMonitorRequest.kt
This file was deleted.
Oops, something went wrong.
133 changes: 0 additions & 133 deletions
133
alerting/src/main/kotlin/org/opensearch/alerting/action/GetMonitorResponse.kt
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
alerting/src/main/kotlin/org/opensearch/alerting/action/SearchMonitorAction.kt
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
alerting/src/main/kotlin/org/opensearch/alerting/action/SearchMonitorRequest.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,6 @@ import org.opensearch.action.search.SearchRequest | |
import org.opensearch.action.search.SearchResponse | ||
import org.opensearch.action.support.ActionFilters | ||
import org.opensearch.action.support.HandledTransportAction | ||
import org.opensearch.alerting.action.GetMonitorAction | ||
import org.opensearch.alerting.action.GetMonitorRequest | ||
import org.opensearch.alerting.action.GetMonitorResponse | ||
import org.opensearch.alerting.alerts.AlertIndices.Companion.ALL_FINDING_INDEX_PATTERN | ||
import org.opensearch.alerting.opensearchapi.suspendUntil | ||
import org.opensearch.alerting.settings.AlertingSettings | ||
|
@@ -35,6 +32,8 @@ import org.opensearch.common.xcontent.XContentType | |
import org.opensearch.commons.alerting.action.AlertingActions | ||
import org.opensearch.commons.alerting.action.GetFindingsRequest | ||
import org.opensearch.commons.alerting.action.GetFindingsResponse | ||
import org.opensearch.commons.alerting.action.GetMonitorRequest | ||
import org.opensearch.commons.alerting.action.GetMonitorResponse | ||
import org.opensearch.commons.alerting.model.Finding | ||
import org.opensearch.commons.alerting.model.FindingDocument | ||
import org.opensearch.commons.alerting.model.FindingWithDocs | ||
|
@@ -167,7 +166,7 @@ class TransportGetFindingsSearchAction @Inject constructor( | |
) | ||
val getMonitorResponse: GetMonitorResponse = | ||
[email protected] { | ||
execute(GetMonitorAction.INSTANCE, getMonitorRequest, it) | ||
execute(AlertingActions.GET_MONITOR_ACTION_TYPE, getMonitorRequest, it) | ||
} | ||
indexName = getMonitorResponse.monitor?.dataSources?.findingsIndex ?: ALL_FINDING_INDEX_PATTERN | ||
} | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rewrite request to avoid serialization issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is following strategies of your previous refactoring PRs - see https://github.com/opensearch-project/alerting/pull/606/files
Could you explain more what the potential issue could be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/opensearch-project/alerting/blob/main/alerting/src/main/kotlin/org/opensearch/alerting/transport/TransportIndexMonitorAction.kt#L121-L123
we had faced ser/deserialization issues due to different plugins not sharing the same classloader amongst themselves
so, although these tests may pass now, the plugin invoking get monitor request would fail if the request is not transformed and re-deserialized in the transport layer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks for the clarification. Updated the transport actions in latest commit, and did another round of manual verification on the changed APIs