Skip to content

Use SdkClient for persistence in MonitorMetadataService#2083

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

Use SdkClient for persistence in MonitorMetadataService#2083
manaswini1920 wants to merge 1 commit intoopensearch-project:remote-metadata-supportfrom
manaswini1920:feature/sdk-background-services

Conversation

@manaswini1920
Copy link
Copy Markdown
Contributor

Description

Migrates MonitorMetadataService.upsertMetadata() and getMetadata() to use SdkClient instead of direct OpenSearch client calls, as part of the remote metadata SDK migration for background services.

Changes:

  • MonitorMetadataService.upsertMetadata(): Replaced IndexRequest with PutDataObjectRequest via sdkClient.putDataObjectAsync()
  • MonitorMetadataService.getMetadata(): Replaced GetRequest with GetDataObjectRequest via sdkClient.getDataObjectAsync()
  • AlertingPlugin.kt: Set sdkClient on MonitorMetadataService after SDK client creation
  • SdkUtils.kt: Added suspend fun CompletionStage.await() helper for coroutine-safe SDK calls (same as Use SdkClient for persistence in IndexAlertingComment, IndexMonitor #2081)

Notes:

Related Issues

Part of remote metadata SDK migration for background services.

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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](https://github.com/opensearch-project/alerting/blob/main/CONTRIBUTING.md#developer-certificate
-of-origin).

Signed-off-by: Manaswini Ragamouni <ragamanu@amazon.com>
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