-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add alerting tools IT; fix missing system index bug of SearchMonitorsTool #135
Conversation
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
01beed9
to
58eadc5
Compare
Note these integ tests will fail until opensearch-project/alerting#1382 is merged and published to sonatype, so the CI can pick up the updated alerting dependency. The CI can be reran when that happens. In the meantime confirmed everything passes locally using a locally-published version with the alerting bug fix. |
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
TODOs: add/improve integ tests. Tracked in separate issue and mentioned in source code comments: #136 |
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #135 +/- ##
============================================
- Coverage 80.83% 80.65% -0.19%
- Complexity 195 198 +3
============================================
Files 13 13
Lines 1002 1013 +11
Branches 133 133
============================================
+ Hits 810 817 +7
- Misses 141 145 +4
Partials 51 51 ☔ View full report in Codecov by Sentry. |
// TODO: Add IT to test against sample monitor data | ||
|
||
@SneakyThrows | ||
private void createMonitorsSystemIndex(String monitorId, String monitorName) { |
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.
We are trying to create the system index for alerting. The best way to do this is to create a dummy monitor, so that the schema mapping of the index is setup correctly and would be better to test for an integration test.
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.
Agreed - this was an interim test fn that is actually currently not used. I'll remove and leave the TODO, as this will be grouped with the added tests in the followup issue #136. Thanks for the suggestion, I will likely create dummy monitors and alerts for testing the populated results of the search monitors and search alerts tools respectively.
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
…Tool (opensearch-project#135) (opensearch-project#141) (cherry picked from commit 3e4d451) Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Description
This PR adds improvements to the existing SearchAlertsTool and SearchMonitors tools:
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.