-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add default for EnginePlugin.getEngineFactory #2419
Conversation
Adds default implementation for getEngineFactory in EnginePlugin. The default just returns Optional.empty(), allowing plugin developers to implement this plugin without implementing this method. Signed-off-by: John Mazanec <[email protected]>
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test for this that creates an instance without overriding this method.
@jmazanec15 does other plugins will have to make any change on their end as well to incorporate this? |
Signed-off-by: John Mazanec <[email protected]>
No change needed. Adding default will just allow plugin implementors to skip implementing getEngineFactory as noop. |
@jmazanec15 can you create an issue to add tests for the other methods present in EnginePlugin.java? Thanks |
start gradle check |
@jmazanec15 @owaiskazi19 there is a large number of tests under |
@reta I can move the unit test to EngineConfigFactory, but what would the benefit be? It is not testing the functionality of the EngineConfigFactory, its more so testing the default of the interface works as expected. Also, @reta @owaiskazi19 do you have any ideas on why "org.opensearch.cluster.allocation.ClusterRerouteIT.testDelayWithALargeAmountOfShards" is failing? It seems to be unrelated, but I cannot find reference elsewhere or similar failures on other PRs. Scanning the log, I see this:
but not much else. Also, I was not able to repro locally:
|
@jmazanec15 it's a flaky test. We have an issue for it: #1561. Let me start the gradle check again. |
start gradle check |
If you look at this test case, |
Signed-off-by: John Mazanec <[email protected]>
@reta got it! Just moved the test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Adds default implementation for getEngineFactory in EnginePlugin. The
default just returns Optional.empty(), allowing plugin developers to
implement this plugin without implementing this method.
Related issues: #1805
Issues Resolved
#2418
Check List
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.