-
Notifications
You must be signed in to change notification settings - Fork 25k
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
[ML] modularize x-pack plugins ml and autoscaling #95057
Conversation
Add module-info.java files for x-pack plugins ml and autoscaling
Pinging @elastic/ml-core (Team:ML) |
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ |
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.
This is the wrong license header - it mentions SSPL which is not an alternative for X-Pack files.
It should be the same license header as the other file in this PR.
Hi @edsavage, I've created a changelog YAML for you. |
… modularize_xpack_plugin_ml
Attempt to fix current verification failures. There may be more to come.
@@ -16,6 +16,10 @@ | |||
public class MlAutoscalingExtension implements AutoscalingExtension { | |||
private final MachineLearning plugin; | |||
|
|||
public MlAutoscalingExtension() { | |||
this.plugin = null; |
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.
Please do it like this:
Line 22 in 2b3dbde
throw new IllegalStateException("Provider must be constructed using PluginsService"); |
Otherwise, if anyone did ever call this constructor they'd be setting up a subsequent null pointer exception.
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
In elastic#95057 we turned ML into a proper module, but omitted a `requires` directive that IntelliJ reports as a compilation error. This commit adds the missing directive.
In #95057 we turned ML into a proper module, but omitted a `requires` directive that IntelliJ reports as a compilation error. This commit adds the missing directive.
Add module-info.java files for x-pack plugins ml and autoscaling.
A slight restructure was needed to place the
exact.properties
resource file into a path name corresponding to a package name. Theutils
package was chosen as the resource file is required by theDomainSplitFunction
class residing there.