Skip to content

Use SdkClient for persistence in 4 transport actions#2060

Open
manaswini1920 wants to merge 1 commit intoopensearch-project:remote-metadata-supportfrom
manaswini1920:feature/sdk-persistence-batch2
Open

Use SdkClient for persistence in 4 transport actions#2060
manaswini1920 wants to merge 1 commit intoopensearch-project:remote-metadata-supportfrom
manaswini1920:feature/sdk-persistence-batch2

Conversation

@manaswini1920
Copy link
Contributor

Description

Use SdkClient for persistence in 4 transport actions:

  • TransportDeleteMonitorAction: sdkClient.getDataObject() in getMonitor()
  • TransportSearchMonitorAction: sdkClient.searchDataObjectAsync() in search()
  • TransportGetDestinationsAction: sdkClient.searchDataObjectAsync() in search()
  • TransportSearchAlertingCommentAction: sdkClient.searchDataObjectAsync() in search()

Walk full cause chain for IndexNotFoundException handling.
Add unit tests for SearchMonitor and GetDestinations SDK paths.

Related Issues

Follows pattern from #2053

Check List

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

@manaswini1920 manaswini1920 changed the base branch from main to remote-metadata-support March 26, 2026 18:54
…ons, SearchComments

Replace direct client.get/search calls with sdkClient equivalents:
- TransportDeleteMonitorAction: sdkClient.getDataObject() in getMonitor()
- TransportSearchMonitorAction: sdkClient.searchDataObjectAsync() in search()
- TransportGetDestinationsAction: sdkClient.searchDataObjectAsync() in search()
- TransportSearchAlertingCommentAction: sdkClient.searchDataObjectAsync() in search()

Walk full cause chain for IndexNotFoundException handling.
Add unit tests for SearchMonitor and GetDestinations SDK paths.

Signed-off-by: Manaswini Ragamouni <ragamanu@amazon.com>
actionListener.onFailure(
AlertingException.wrap(
OpenSearchStatusException("Monitor with $monitorId is not found", RestStatus.NOT_FOUND)
)
Copy link
Member

Choose a reason for hiding this comment

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

return statement??

Copy link
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 ensure we finish loop after listener.onResponse/Failure statements.

and transversely we need to make sure listener.onResponse/Failure statements. is present everywhere

we have had a lot of pain with this in past ... plz add unit tests with 100% coverage for action classes.

rest changes are LGTM

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.

2 participants