Skip to content

Added change to support dependency of other plugins on a plugin other…#18738

Open
shrugarg-amzn wants to merge 6 commits intoopensearch-project:mainfrom
shrugarg-amzn:feature/dependentplugins
Open

Added change to support dependency of other plugins on a plugin other…#18738
shrugarg-amzn wants to merge 6 commits intoopensearch-project:mainfrom
shrugarg-amzn:feature/dependentplugins

Conversation

@shrugarg-amzn
Copy link
Copy Markdown
Contributor

@shrugarg-amzn shrugarg-amzn commented Jul 14, 2025

Description

This PR adds support for specifying other plugins (in addition to OpenSearch) as dependencies in the plugin-descriptor.properties file.

Currently, the dependencies field in the descriptor only supports opensearch. This change enhances the plugin framework to allow a plugin to explicitly declare dependencies on other OpenSearch plugins. This will enable better plugin modularization and dependency resolution during plugin loading.

Changes include:

  • Extended PluginInfo and PluginDescriptor parsing to support plugin-to-plugin dependencies.
  • Modified PluginsService to validate and resolve inter-plugin dependencies during initialization.
  • Added relevant test coverage to ensure correctness and backward compatibility.

Related Issues

Fixes #18719

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

… than opensearch

Signed-off-by: Shruti Garg <shrugarg@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for c6b76e0: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Shruti Garg <shrugarg@amazon.com>
@shrugarg-amzn shrugarg-amzn force-pushed the feature/dependentplugins branch from 4f0566e to 01fd3b0 Compare July 14, 2025 13:29
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for 01fd3b0: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Shruti Garg <shrugarg@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for 29c644f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Shruti Garg <shrugarg@amazon.com>
@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Plugins labels Jul 14, 2025
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for 3edf909: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Shruti Garg <shrugarg@amazon.com>
Signed-off-by: Shruti Garg <shrugarg@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for d5d8ea6: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@shrugarg-amzn shrugarg-amzn marked this pull request as ready for review July 14, 2025 16:56
@shrugarg-amzn shrugarg-amzn requested a review from a team as a code owner July 14, 2025 16:56
@shrugarg-amzn
Copy link
Copy Markdown
Contributor Author

Screenshot 2025-07-14 at 10 26 13 PM Flaky test

@shrugarg-amzn
Copy link
Copy Markdown
Contributor Author


> [2568-07-14T21:33:26,838][INFO ][o.o.t.OpenSearchTestClusterRule] [testMultipleSources] [UpdateByQueryBasicTests#testMultipleSources]: cleaned up after test
  2> REPRODUCE WITH: ./gradlew ':modules:reindex:test' --tests 'org.opensearch.index.reindex.UpdateByQueryBasicTests.testMultipleSources' -Dtests.seed=9D8D508AC36FF40E -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=th-TH -Dtests.timezone=Asia/Ashgabat -Druntime.java=24
  2> java.lang.AssertionError: 
    Expected: an empty iterable
         but: [<UnavailableShardsException[[test0][7] primary shard is not active Timeout: [1m]]>,<UnavailableShardsException[[test0][5] primary shard is not active Timeout: [1m]]>,<UnavailableShardsException[[test0][5] primary shard is not active Timeout: [1m]]>,<UnavailableShardsException[[test0][7] primary shard is not active Timeout: [1m]]>,<UnavailableShardsException[[test0][8] primary shard is not active Timeout: [1m]]>]
        at __randomizedtesting.SeedInfo.seed([9D8D508AC36FF40E:1A247C9E29255A5A]:0)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
        at org.junit.Assert.assertThat(Assert.java:964)
        at org.junit.Assert.assertThat(Assert.java:930)
        at org.opensearch.test.OpenSearchIntegTestCase.indexRandom(OpenSearchIntegTestCase.java:1626)
        at org.opensearch.test.OpenSearchIntegTestCase.indexRandom(OpenSearchIntegTestCase.java:1539)
        at org.opensearch.test.OpenSearchIntegTestCase.indexRandom(OpenSearchIntegTestCase.java:1523)
        at org.opensearch.index.reindex.UpdateByQueryBasicTests.testMultipleSources(UpdateByQueryBasicTests.java:146)
  1> [2568-07-14T21:33:26,879][INFO ][o.o.t.OpenSearchTestClusterRule] [testSlices] [UpdateByQueryBasicTests#testSlices]: setting up test
  1> [2568-07-14T21:33:26,991][INFO ][o.o.p.PluginsService     ] [node_s2] PluginService:onIndexModule index:[p7qfnucQTQ6va6w6nJrHbQ/w7uJzJ4PRRa3wSxp0R9ZJw]
  1> [2568-07-14T21:33:26,

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for d5d8ea6: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

This PR is stalled because it has been open for 30 days with no activity.

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

Labels

enhancement Enhancement or improvement to existing feature or request Plugins stalled Issues that have stalled

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support to add other plugins as dependency in plugin-descriptor.properties

1 participant