-
Notifications
You must be signed in to change notification settings - Fork 24.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
[ML][Data Frame] Add support for allow_no_match for endpoints #43490
[ML][Data Frame] Add support for allow_no_match for endpoints #43490
Conversation
Adds support for: * Get Transforms * Get Transforms stats * stop transforms
Pinging @elastic/ml-core |
I suggest we drop the paradigm we followed for jobs and datafeeds and adopt |
@dimitris-athanasiou I am all for it. I will adjust this PR :) |
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.
There are a few places, admittedly not user facing, where the old names are still used. But for the sake of maintainers I think it would be nice to make all the names consistent.
@@ -40,6 +41,7 @@ public static GetDataFrameTransformRequest getAllDataFrameTransformsRequest() { | |||
|
|||
private final List<String> ids; | |||
private PageParams pageParams; | |||
private Boolean allowNoTransforms; |
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.
It would be less confusing to also rename the member variable.
@@ -29,6 +29,7 @@ | |||
public class GetDataFrameTransformStatsRequest implements Validatable { | |||
private final String id; | |||
private PageParams pageParams; | |||
private Boolean allowNoTransforms; |
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.
It would be less confusing to also rename the member variable.
@@ -31,6 +31,7 @@ | |||
private final String id; | |||
private Boolean waitForCompletion; | |||
private TimeValue timeout; | |||
private Boolean allowNoTransforms; |
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.
It would be less confusing to also rename the member variable.
@@ -55,6 +55,7 @@ public Response newResponse() { | |||
public static class Request extends BaseTasksRequest<Request> { | |||
private final String id; | |||
private PageParams pageParams = PageParams.defaultParams(); | |||
private boolean allowNoResources = true; |
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.
Rename allowNoResources
to allowNoMatch
throughout this file, including the getter and setter.
@@ -56,15 +57,17 @@ public Response newResponse() { | |||
private final String id; | |||
private final boolean waitForCompletion; | |||
private final boolean force; | |||
private final boolean allowNoResources; |
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.
Rename allowNoResources
to allowNoMatch
throughout this file, including the getter and setter.
@elasticmachine update branch |
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
…c#43490) * [ML][Data Frame] Add support for allow_no_match parameter in endpoints Adds support for: * Get Transforms * Get Transforms stats * stop transforms
I opted for the name
allow_no_transforms
in the APIs. This is for parity with ml jobs and datafeeds.The only peculiar endpoint is
_stats
. If nothing is found, the current behavior is NOT to throw, but to return empty. Do we want to support this parameter in that API and do we want it to cause that endpoint to return a 404? I basically added the parameter, but it does not do much really.closes #42766