Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] Cleanup interfaces around ExtensionManager (#7374) #7451

Merged

Conversation

peternied
Copy link
Member

@peternied peternied commented May 5, 2023

Description

ExtensionsManager has a whole lot of functionality that shouldn't be exposed to external classes, marked much of this package protected for a cleaner interface. Then updated the Noop version to override all public functions to remove extraneous feature flag checks.

Note; I didn't go so far to remove all getters/setters that were unused but that could be a good follow up in the future.

Signed-off-by: Peter Nied [email protected]
(cherry picked from commit 3687d01)

Related Issues

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

* Cleanup interfaces around ExtensionManager

ExtensionsManager has a whole lot of functionality that shouldn't be
exposed to external classes, marked much of this package protected for a
cleaner interface.  Then updated the Noop version to override all public
functions to remove extranious feature flag checks.

Note; I didn't go so far to remove all getters/setters that were unused
but that could be a good follow up in the future.

Signed-off-by: Peter Nied <[email protected]>
(cherry picked from commit 3687d01)
@peternied
Copy link
Member Author

FYI @cwperks Once this is merged and built it will unblock opensearch-project/security#2743

@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2023

Gradle Check (Jenkins) Run Completed with:

@peternied
Copy link
Member Author

Same test failed 4 times, looks unrelated, to this change, but could be a break on the 2.x line

org.opensearch.search.aggregations.bucket.terms.SignificantTextAggregatorTests.testSupportedFieldTypes

Error Details
java.lang.AssertionError: Aggregator [significant_text] supports field type [unsigned_long] but executing against the field threw an exception: [Value [0] is out of range for an unsigned long]

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.SearchWeightedRoutingIT.testStrictWeightedRoutingWithCustomString

@codecov-commenter
Copy link

Codecov Report

Merging #7451 (4eb2148) into 2.x (708b28c) will increase coverage by 0.15%.
The diff coverage is 60.60%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##                2.x    #7451      +/-   ##
============================================
+ Coverage     70.11%   70.26%   +0.15%     
- Complexity    59775    59849      +74     
============================================
  Files          4873     4873              
  Lines        288130   288053      -77     
  Branches      41885    41879       -6     
============================================
+ Hits         202018   202401     +383     
+ Misses        69168    68711     -457     
+ Partials      16944    16941       -3     
Impacted Files Coverage Δ
...a/org/opensearch/extensions/ExtensionsManager.java 45.34% <18.18%> (+1.94%) ⬆️
...g/opensearch/extensions/NoopExtensionsManager.java 66.66% <66.66%> (-33.34%) ⬇️
server/src/main/java/org/opensearch/node/Node.java 86.58% <91.66%> (+1.74%) ⬆️
...in/java/org/opensearch/indices/IndicesService.java 68.92% <100.00%> (+4.86%) ⬆️

... and 489 files with indirect coverage changes

@peternied peternied merged commit cb63ee0 into opensearch-project:2.x May 9, 2023
@peternied peternied deleted the backport/backport-7374-to-2.x branch May 9, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants