opensearch-project / alerting

📟 Get notified when your data meets certain conditions by setting up monitors, alerts, and notifications
https://opensearch.org/docs/latest/monitoring-plugins/alerting/index/
Apache License 2.0
58 stars 99 forks source link

log error messages and clean up monitor when indexing doc level queri… #1478

Closed goyamegh closed 2 months ago

goyamegh commented 3 months ago

…es or metadata creation fails (#900)

Issue #, if available:

Description of changes:

CheckList:

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.

engechas commented 3 months ago

CI is failing

REPRODUCE WITH: ./gradlew ':alerting:integTest' --tests "org.opensearch.alerting.DocumentMonitorRunnerIT.test execute monitor generates alerts and findings with per alert execution for actions" -Dtests.seed=D611385684093386 -Dtests.security.manager=false -Dtests.locale=lt -Dtests.timezone=America/Paramaribo -Druntime.java=17
org.opensearch.alerting.DocumentMonitorRunnerIT > test execute monitor generates alerts and findings with per alert execution for actions FAILED
    java.util.NoSuchElementException: List is empty.
        at __randomizedtesting.SeedInfo.seed([D611385684093386:28F5267A0603560E]:0)
        at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:212)
        at org.opensearch.alerting.DocumentMonitorRunnerIT.test execute monitor generates alerts and findings with per alert execution for actions(DocumentMonitorRunnerIT.kt:259)

Will rerun once

engechas commented 3 months ago

Same test failed again (there's also a number of other failures)

org.opensearch.alerting.DocumentMonitorRunnerIT > test execute monitor generates alerts and findings with per alert execution for actions FAILED
    java.util.NoSuchElementException: List is empty.
        at __randomizedtesting.SeedInfo.seed([340552357EBF6165:CAE14C19FCB504ED]:0)
        at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:212)
        at org.opensearch.alerting.DocumentMonitorRunnerIT.test execute monitor generates alerts and findings with per alert execution for actions(DocumentMonitorRunnerIT.kt:259)
REPRODUCE WITH: ./gradlew ':alerting:integTest' --tests "org.opensearch.alerting.DocumentMonitorRunnerIT.test execute monitor generates alerts and findings with per alert execution for actions" -Dtests.seed=340552357EBF6165 -Dtests.security.manager=false -Dtests.locale=hr-HR -Dtests.timezone=Australia/Darwin -Druntime.java=17
engechas commented 2 months ago

Backports for 2.7 were previously completed. Closing this PR