Skip to content

PPL Alerting: PPL Dependencies and Utils#2114

Merged
toepkerd merged 5 commits intoopensearch-project:mainfrom
toepkerd:pr
May 7, 2026
Merged

PPL Alerting: PPL Dependencies and Utils#2114
toepkerd merged 5 commits intoopensearch-project:mainfrom
toepkerd:pr

Conversation

@toepkerd
Copy link
Copy Markdown
Collaborator

@toepkerd toepkerd commented May 1, 2026

Description

SQL/PPL Plugin dependencies and the interface for cross-plugin communication.

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.

@toepkerd toepkerd force-pushed the pr branch 2 times, most recently from 65caee5 to 5d24d90 Compare May 1, 2026 20:23
Setting.Property.NodeScope, Setting.Property.Dynamic
)

val NOTIFICATION_SUBJECT_SOURCE_MAX_LENGTH = Setting.intSetting(
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.

Is this part of a bug fix? Wouldnt adding this validation cause a breaking change?

Copy link
Copy Markdown
Collaborator Author

@toepkerd toepkerd May 1, 2026

Choose a reason for hiding this comment

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

These checks are only made against PPL Triggers when PPL Monitors are being created, they're not applied to existing Monitor types.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Setting.Property.NodeScope, Setting.Property.Dynamic
)

val NOTIFICATION_MESSAGE_SOURCE_MAX_LENGTH = Setting.intSetting(
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.

Is this part of a bug fix? Wouldnt adding this validation cause a breaking change?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

These checks are only made against PPL Triggers when PPL Monitors are being created, they're not applied to existing Monitor types.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Comment thread alerting/build.gradle

// SQL/PPL plugin dependencies are included in alerting-core
api project(":alerting-core")
implementation 'org.json:json:20240303'
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.

  1. where are we using this and why not jackson?
  2. check if opensearch is providing any org.json dep

@@ -1,6 +1,6 @@
{
"_meta" : {
"schema_version": 8
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.

why??

Comment thread core/build.gradle
}
}

def sqlJarDirectory = "$buildDir/dependencies/opensearch-sql-plugin"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Taking a dependency on all of the PPL/SQL seems intensive just to get a reference to TransportPPLQueryRequest. It also forces/couples alerting to care about the version of PPL running in the system. Do we know how other plugins are handling a dependency on PPL/SQL?

Are there further dependencies than TransportPPLQueryRequest that are needed in coming changes?

Are we able to interact with the PPL plugin without this dependency? Perhaps via a rest or HTTP request - or simply passing a generic object for the request instead of an explicit TransportPPLQueryRequest

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The approach used here models after the ml-commons's skills plugin: https://github.com/opensearch-project/skills/blob/main/build.gradle. They also use Transport calls to call SQL/PPL plugin for executing PPL queries.

In addition to TransportPPLQueryRequest, TransportPPLQueryResponse and PPLQueryAction are also needed.

Other plugins make PPL queries via REST. However, moving away from using a transport call may have consequences outside of OpenSource.

Signed-off-by: Dennis Toepker <toepkerd@amazon.com>
Signed-off-by: Dennis Toepker <toepkerd@amazon.com>
Signed-off-by: Dennis Toepker <toepkerd@amazon.com>
Signed-off-by: Dennis Toepker <toepkerd@amazon.com>
Signed-off-by: Dennis Toepker <toepkerd@amazon.com>
@toepkerd toepkerd merged commit 1a96c1f into opensearch-project:main May 7, 2026
19 of 20 checks passed
@toepkerd toepkerd deleted the pr branch May 7, 2026 23:33
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.

5 participants