Skip to content

Support automatic plugin loading in Data Prepper core.#6882

Open
dlvenable wants to merge 1 commit into
opensearch-project:mainfrom
dlvenable:4838-plugins-within-plugins
Open

Support automatic plugin loading in Data Prepper core.#6882
dlvenable wants to merge 1 commit into
opensearch-project:mainfrom
dlvenable:4838-plugins-within-plugins

Conversation

@dlvenable
Copy link
Copy Markdown
Member

Description

This change allows plugin authors to load other plugins by defining @UsesDataPrepperPlugin on a field with a different type. It will automatically load the plugin using the PluginFactory and give the main plugin the desired plugin instance that they are looking for.

For backward compatibility, if the target type is PluginModel this will not attempt to load the plugin.

The overall approach I took was to add custom deserialization in the Jackson ObjectMapper to load the plugin.

This updates the sqs source to use this new capability for its InputCodec defined by the codec property.

Issues Resolved

Resolves #4838

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

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.

This change allows plugin authors to load other plugins by defining @UsesDataPrepperPlugin on a field with a different type. It will automatically load the plugin using the PluginFactory and give the main plugin the desired plugin instance that they are looking for.

This updates the sqs source to use this new capability for its InputCodec defined by the codec property.

Resolves opensearch-project#4838

Signed-off-by: David Venable <dlv@amazon.com>
@dlvenable dlvenable force-pushed the 4838-plugins-within-plugins branch from 525f096 to 163d99c Compare May 22, 2026 16:08
Copy link
Copy Markdown
Contributor

@Davidding4718 Davidding4718 left a comment

Choose a reason for hiding this comment

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

LGTM! I think this will be helpful

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.

Support automatic plugin loading in Data Prepper core

2 participants