Skip to content

[Backport 2.x] Allow extended plugins to be optional (#16909)#16946

Merged
reta merged 2 commits intoopensearch-project:2.xfrom
cwperks:backport-16909-to-2.x
Jan 4, 2025
Merged

[Backport 2.x] Allow extended plugins to be optional (#16909)#16946
reta merged 2 commits intoopensearch-project:2.xfrom
cwperks:backport-16909-to-2.x

Conversation

@cwperks
Copy link
Copy Markdown
Member

@cwperks cwperks commented Jan 4, 2025

Manual backport of #16909 to 2.x

* Make extended plugins optional

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Make extended plugins optional

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Load extensions for classpath plugins

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Ensure only single instance for each classpath extension

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add test for classpath plugin extended plugin loading

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Modify test to allow optional extended plugin

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Only optional extended plugins

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add additional warning message

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add tag to make extended plugin optional

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Only send plugin names when serializing PluginInfo

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Keep track of optional extended plugins in separate set

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Include in ser/de of PluginInfo

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Change to 3_0_0

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 845fbfa)
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 4, 2025

❕ Gradle check result for 7ec164b: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 4, 2025

Codecov Report

Attention: Patch coverage is 68.96552% with 9 lines in your changes missing coverage. Please review.

Project coverage is 71.81%. Comparing base (1d479c3) to head (7ec164b).
Report is 3 commits behind head on 2.x.

Files with missing lines Patch % Lines
...c/main/java/org/opensearch/plugins/PluginInfo.java 75.00% 2 Missing and 3 partials ⚠️
...in/java/org/opensearch/plugins/PluginsService.java 55.55% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #16946      +/-   ##
============================================
- Coverage     71.85%   71.81%   -0.04%     
+ Complexity    65543    65506      -37     
============================================
  Files          5314     5314              
  Lines        305443   305467      +24     
  Branches      44503    44509       +6     
============================================
- Hits         219465   219370      -95     
- Misses        67681    67797     +116     
- Partials      18297    18300       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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