Skip to content

Use SdkClient for persistence in GetAlerts, DeleteComment, GetWorkflo…#2061

Merged
eirsep merged 1 commit intoopensearch-project:remote-metadata-supportfrom
manaswini1920:feature/sdk-persistence-batch3
Apr 1, 2026
Merged

Use SdkClient for persistence in GetAlerts, DeleteComment, GetWorkflo…#2061
eirsep merged 1 commit intoopensearch-project:remote-metadata-supportfrom
manaswini1920:feature/sdk-persistence-batch3

Conversation

@manaswini1920
Copy link
Copy Markdown
Contributor

Description

Use SdkClient for persistence in 4 more transport actions:

  • TransportGetAlertsAction: sdkClient.getDataObject() + searchDataObjectAsync()
  • TransportDeleteAlertingCommentAction: sdkClient.deleteDataObject() + searchDataObject()
  • TransportGetWorkflowAlertsAction: sdkClient.searchDataObject() x2
  • TransportExecuteMonitorAction: sdkClient.getDataObjectAsync()

Related Issues

Follows pattern from #2053, #2060

Check List

  • New functionality includes testing.
  • Commits are signed per the DCO using --signoff.

…wAlerts, ExecuteMonitor

Replace direct client calls with sdkClient equivalents:
- TransportGetAlertsAction: sdkClient.getDataObject() + searchDataObjectAsync()
- TransportDeleteAlertingCommentAction: sdkClient.deleteDataObject() + searchDataObject()
- TransportGetWorkflowAlertsAction: sdkClient.searchDataObject() x2
- TransportExecuteMonitorAction: sdkClient.getDataObjectAsync()

Signed-off-by: Manaswini Ragamouni <ragamanu@amazon.com>
@manaswini1920 manaswini1920 force-pushed the feature/sdk-persistence-batch3 branch from 414cf51 to 0e2d0ef Compare March 28, 2026 05:30
Copy link
Copy Markdown
Member

@eirsep eirsep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to make client changes in query and bucket level monitor and ppl monitor.
we also need changes in alert history metadata cleanup jobs.

@eirsep eirsep merged commit b7dcd09 into opensearch-project:remote-metadata-support Apr 1, 2026
18 checks passed

override fun onFailure(t: Exception) {
actionListener.onFailure(AlertingException.wrap(t))
if (!getResponse.isSourceEmpty) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz add else block. this will cause a listener leak and thread will hang forever causing node drops.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


if (!getResponse.isSourceEmpty) {
    // ... existing parse + executeMonitor logic
} else {
    actionListener.onFailure(
        AlertingException.wrap(
            OpenSearchStatusException("Monitor source is empty for id: ${execMonitorRequest.monitorId}", RestStatus.NOT_FOUND)
        )
    )
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants