Skip to content

Add Target object for external data source support on Monitor and Alert models.#916

Merged
riysaxen-amzn merged 1 commit intoopensearch-project:mainfrom
manaswini1920:feature/workspace-datasource-fields
Mar 25, 2026
Merged

Add Target object for external data source support on Monitor and Alert models.#916
riysaxen-amzn merged 1 commit intoopensearch-project:mainfrom
manaswini1920:feature/workspace-datasource-fields

Conversation

@manaswini1920
Copy link
Copy Markdown
Contributor

@manaswini1920 manaswini1920 commented Mar 19, 2026

Description

Add Target object for external data source support on Monitor and Alert models.

  • New Target data class in common-utils with type (enum: LOCAL, AOSS_COLLECTION, AOS_DOMAIN) and endpoint (URL of remote collection/domain)
  • Monitor: added target: Target field (defaults to {type: LOCAL})
  • Alert: added target: Target? field, copied from parent Monitor at alert creation time across all 5 Monitor-taking constructors
  • All new fields are optional with defaults for backward compatibility
  • Target only serialized when non-LOCAL (conditional toXContent)
  • StreamInput/writeTo version-gated to V_3_6_0 for rolling upgrade safety
  • Includes TargetTests with 7 unit tests covering serialization, parsing, validation, and enum handling

Related Issues

Resolves

Testing

  • 7 new unit tests in TargetTests — default construction, AOSS/AOS targets, endpoint validation, stream roundtrip, XContent roundtrip, enum parsing
  • All existing tests pass — backward compatibility verified

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.

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

Labels

None yet